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.
demo.mp4
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
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
}
}
}
}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-hostHost to bind SSE server to (default: localhost)--sse-portPort 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.
Set the PROVIDER environment variable to specify your provider:
- tushare
dailyGet unadjusted daily stock market data.
stock_basicGet stock basic information including name, code, etc.stock_companyGet listed company basic information.bak_basicGet fundamental data for specific stocks within a given time range.
incomeGet company income statement data.balancesheetGet company balance sheet data.cashflowGet company cash flow statement data.
shibor_lprGet Loan Prime Rate (LPR) data.cn_gdpGet Gross Domestic Product (GDP) data.cn_cpiGet Consumer Price Index (CPI) data.cn_ppiGet Producer Price Index (PPI) data.cn_mGet Money Supply data.sf_monthGet Social Financing data.cn_pmiGet Purchasing Managers' Index (PMI) data.
This project is open-sourced by DataCanvas

