Get the FREE Ultimate OpenClaw Setup Guide →

finData

FinData enables your AI agents retrieve financial data from different providers like Tushare, Wind, and DataYes.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio zlinzzzz-findata-mcp-server uv --directory /ABSOLUTE/PATH/TO/PARENT/FOLDER/finData-mcp-server/src/findata run server.py \
  --env PROVIDER="tushare" \
  --env DATA_API_TOKEN=""

How to use

FinData is an MCP server that exposes financial data via the Model Context Protocol to enable LLM-based applications to query market, fundamentals, and macro data from multiple providers. It supports common data providers such as Tushare (default in the docs) and can be extended to others like Wind or DataYes by setting the PROVIDER environment variable. The server can be consumed over both Stdio and SSE transports, providing flexibility for local development or hosted deployments. Use the Stdio flow when running inside a local or container environment that invokes the MCP server directly, and use SSE to serve data over HTTP for client integrations that expect server-sent events.

To use FinData, configure the MCP client to connect to the finData MCP server. For Stdio, the client runs the server via uv in a separate process and points to the finData server path. For SSE, ensure the environment variables DATA_API_TOKEN and PROVIDER are set to the appropriate API token and provider, then start the server with uv run server.py --transport sse. Once running, point your MCP client to the FinData SSE endpoint (e.g., http://localhost:8000/sse) and load the finData configuration through your client’s MCPServers section. The Tools section of FinData exposes market data (daily), fundamental data (stock_basic, stock_company, bak_basic, etc.), financial data (income, balancesheet, cashflow), and macro data (shibor_lpr, cn_gdp, cn_cpi, cn_ppi, cn_m, sf_month, cn_pmi) via Tushare when configured.

In practice, you will pass the provider via the PROVIDER environment variable and supply an API token via DATA_API_TOKEN. Queries issued by the MCP client will be routed to the configured provider and returned through the MCP interface, enabling LLMs to request specific datasets such as daily market data, income statements, or GDP figures as part of their reasoning and response generation.

How to install

Prerequisites:

  • Python 3.11 installed
  • pip installed and up to date
  • uv (the microservice runner) installed
  • Optional: mcp-cli (for MCP workflow) and pandas

Step-by-step installation:

  1. Prepare a virtual environment (recommended): python -m venv venv source venv/bin/activate # Linux/macOS venv\Scripts\activate # Windows

  2. Install required Python packages (adjust as needed for your environment): pip install uv mcp-cli pandas

  3. Obtain or clone the FinData MCP server repository/files into your working directory, ensuring you have the findata server script available at the path referenced in the configuration (src/findata/server.py or equivalent).

  4. Install optional data providers as needed, for example to use Tushare: pip install tushare>=1.4.21

  5. Prepare your environment variables for the server (see mcp_config example for required vars). Create or edit the configuration file that will instruct the MCP client to run the server using uv.

  6. Run the server using the MCP client configuration (see mcp_config example). Example for starting the server via the MCP client: uv --directory /ABSOLUTE/PATH/TO/PARENT/FOLDER/finData-mcp-server/src/findata run server.py

  7. If you want to use SSE, start the server with the transport flag: uv run server.py --transport sse

  8. Verify the server is reachable. For SSE, connect to http://localhost:8000/sse (or the port you configured).

  9. In your MCP client configuration, register the finData server under mcpServers with the correct transport and base URL.

Additional notes

Tips and common issues:

  • Ensure the PROVIDER environment variable matches the data provider you want to use (e.g., tushare). The DATA_API_TOKEN must be set to a valid API token for the chosen provider.
  • If you encounter path issues, verify the --directory path points to the directory containing server.py and that run server.py executes correctly under uv.
  • Some providers require additional dependencies or license agreements; install optional providers (e.g., tushare) as needed.
  • When using SSE, ensure the host/port are accessible by the MCP clients and that firewalls allow connections to the configured port.
  • Backwards compatibility: configuration keys in MCP clients may vary slightly; align your client configuration with the server’s expected mcpServers structure and fields (name, type, baseUrl).
  • If you switch providers, remember to update PROVIDER and refresh any cached tokens or permissions as required by the data provider.

Related MCP Servers

Sponsor this space

Reach thousands of developers