Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

finData-mcp-server

MCP.Pizza Chef: zlinzzzz

FinData is an open-source MCP server that enables AI agents to retrieve professional financial data from multiple providers including Tushare, Wind, and DataYes. It integrates diverse financial datasets into LLM workflows, facilitating real-time access to market, stock, and economic data for enhanced financial analysis and decision-making.

Use This MCP server To

Retrieve real-time stock market data for analysis Access historical financial data from multiple providers Integrate financial data into AI-driven investment tools Fetch economic indicators for market trend prediction Combine data from Tushare, Wind, and DataYes in one query Enable LLMs to query financial datasets dynamically Support financial report generation with up-to-date data Automate financial data extraction for research

README


English English License Python Versions Tushare

Overview

FinData is an open-source Model Context Protocol(MCP) Server that provides professional financial data access capabilities for LLM. It supports various data providers such as Tushare, Wind, DataYes, etc. This enables AI applications to quickly retrieve financial data.

Fully supports both Stdio and SSE transports, offering flexibility for different environments.

Demonstration

demo.mp4

Quick Start

Prerequisites

Before getting started, please complete the following preparations:

  • python => 3.11
  • mcp[cli]>=1.6.0
  • pandas>=2.2.3
  • uv

Depending on your data provider, install optional packages such as:

  • tushare>=1.4.21

Configuration

Stdio Transport

You will need to edit the MCP client configuration file to add finData:

{
  "mcpServers": {
    "finData": {
      "command": "uv", 
      "args": [
        "--directory",
        "/ABSOLUTE/PATH/TO/PARENT/FOLDER/finData-mcp-server/src/findata", 
        "run",
        "server.py"
      ],
      "env": {
        "DATA_API_TOKEN": "",  // API Token for accessing data provider
        "PROVIDER": "tushare"  // Specified data provider
      }
    }
  }
}

SSE Transport

Set the environment variables DATA_API_TOKEN and PROVIDER on the server hosting the MCP Server:

Windows

 set DATA_API_TOKEN=<API Token for accessing data provider>
 set PROVIDER=<Specified data provider>

Linux

  export DATA_API_TOKEN=<API Token for accessing data provider>
  export PROVIDER=<Specified data provider>

Then, start the MCP Server:

uv run server.py --transport sse   
  • Optional Arguments:

    --sse-host Host to bind SSE server to (default: localhost)

    --sse-port Port for SSE server (default: 8000)

Once the MCP Server is running, update your MCP client's configuration with the following settings to connect to it.

{
  "mcpServers": {
    "finData": {
      "name": "finData",
      "type": "sse",
      "baseUrl": "http://localhost:8000/sse"
    }
  }
}

Note: Variable names in configuration files may vary slightly between MCP clients. Refer to each client's documentation for proper configuration.

Supported Data Providers

Set the PROVIDER environment variable to specify your provider:

  • tushare

Tools

Tushare

Market Data

  • daily Get unadjusted daily stock market data.

Fundamental Data

  • stock_basic Get stock basic information including name, code, etc.
  • stock_company Get listed company basic information.
  • bak_basic Get fundamental data for specific stocks within a given time range.

Financial Data

  • income Get company income statement data.
  • balancesheet Get company balance sheet data.
  • cashflow Get company cash flow statement data.

Macroeconomic Data

  • shibor_lpr Get Loan Prime Rate (LPR) data.
  • cn_gdp Get Gross Domestic Product (GDP) data.
  • cn_cpi Get Consumer Price Index (CPI) data.
  • cn_ppi Get Producer Price Index (PPI) data.
  • cn_m Get Money Supply data.
  • sf_month Get Social Financing data.
  • cn_pmi Get Purchasing Managers' Index (PMI) data.

DataCanvas

datacanvas

This project is open-sourced by DataCanvas

finData-mcp-server FAQ

How do I connect FinData to my AI agent?
FinData connects via the MCP protocol, allowing your AI agent to query financial data from supported providers like Tushare, Wind, and DataYes seamlessly.
What financial data providers does FinData support?
FinData supports multiple providers including Tushare, Wind, and DataYes, offering a broad range of financial datasets.
Is FinData compatible with different LLM providers?
Yes, FinData works with various LLMs such as OpenAI, Anthropic Claude, and Google Gemini through the MCP standard.
How do I install and run FinData?
You can install FinData from its GitHub repository, requiring Python 3.11, and follow the quick start guide for setup.
Can FinData handle real-time financial data queries?
Yes, FinData supports real-time data retrieval from its integrated providers to keep your AI workflows up to date.
Does FinData support multiple data formats?
FinData normalizes data from different providers into a consistent format for easy consumption by LLMs.
How secure is the data access through FinData?
FinData follows MCP principles ensuring scoped, secure, and observable interactions with financial data sources.
Can I extend FinData to add new financial data providers?
Yes, FinData is open-source and designed to be extensible for integrating additional financial data sources.