Skip to main content


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

https://github.com/user-attachments/assets/1a6d02af-22a3-44a0-ada7-a771a1c4818d

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

Metadata

Release files for mcp-server-gusantong 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcp-server-gusantong 0.0.7
File Size Uploaded Provenance
mcp_server_gusantong-0.0.7.tar.gz 15.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mcp-server-gusantong 0.0.7
File Interpreter ABI Platform
mcp_server_gusantong-0.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 30.8 kB

Release files / mcp_server_gusantong-0.0.7.tar.gz

Download URL mcp_server_gusantong-0.0.7.tar.gz
Size 15.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b03d7ed23c708e9ca8783f9afd05ce98d4d514f5a8f00bf759957b65618fa3de
BLAKE2b-256 checksum
How to use checksums
4c7bae33420b229722bc9ea9c28e5ec94df52c6d7ccf09dadd8f55433d8d51bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.13

Release files / mcp_server_gusantong-0.0.7-py3-none-any.whl

Download URL mcp_server_gusantong-0.0.7-py3-none-any.whl
Size 15.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3bddd93138d66f1bc7a5e4fb35b8de1a3559a85eb06fa30afa040e1c555e5a4e
BLAKE2b-256 checksum
How to use checksums
6abc37daa6e7d1245b22e89caf20bb73fb12b974391a25a3d02dbfa18ed8f994
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.13

Security for mcp-server-gusantong 0.0.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.7 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page