Get the FREE Ultimate OpenClaw Setup Guide →

FinanceMCP

这是一个金融领域相关的mcp,本项目通过集成 Tushare API 和 Binance API 为语言模型(如Claude)提供全面的实时金融数据访问能力,支持股票、基金、债券、宏观经济指标、稳定币、虚拟货币等多维度金融数据分析。其中也包含了金融数据查询、财经新闻查询、国家统计局数据查询等

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio guangxiangdebizi-financemcp npx -y finance-mcp \
  --env TUSHARE_TOKEN="your_tushare_token_here (replace with your actual token)"

How to use

FinanceMCP is a specialized MCP server that wraps Tushare-backed financial data into a streamable HTTP / SSE capable service. It exposes a suite of tools for real-time market data, indicators, news, macro data, and company analyses, enabling Claude and other assistants to query and analyze financial information with natural language or structured requests. The server supports a broad set of capabilities including current price data, multiple technical indicators (MACD, RSI, KDJ, BOLL, MA), macroeconomic metrics, stock and index data across major markets, company fundamentals, news, and fund/bond analytics. To use it, start the server via your preferred deployment method, then point your MCP client at the provided endpoints (e.g., the built-in /mcp endpoint in streamable HTTP mode). Configure your Tushare API token to unlock full access and higher rate limits. The repository suggests two deployment modes: a local stdio/CLI-like mode and a cloud-friendly HTTP mode, giving you flexibility depending on your environment.

How to install

Prerequisites:

  • Node.js v18+ installed on your machine
  • A Tushare API token (obtain from tushare.pro) with appropriate permissions

Installation options:

Option A: Globally via npm (recommended for quick start)

# Global install
npm install -g finance-mcp

# Run (stdio/CLI mode by default)
finance-mcp

Option B: Local installation

# Install in your project
npm install finance-mcp

# Run (if installed locally, use npx or a script to start)
# npx finance-mcp

Option C: Smithery deployment (alternative install path)

npx -y @smithery/cli install @guangxiangdebizi/FinanceMCP --client claude

Option D: Manual local build (from repository)

# 1. Clone the repository
git clone https://github.com/guangxiangdebizi/FinanceMCP.git
cd FinanceMCP

# 2. Install dependencies
npm install

# 3. Configure API key
echo "TUSHARE_TOKEN=your_token_here" > .env
# or edit src/config.ts directly

# 4. Build the project (if applicable)
npm run build

Starting the service (Streamable HTTP mode recommended):

npm run build
node build/httpServer.js
# or
npm run start:http

Claude/Client configuration (example):

{
  "mcpServers": {
    "finance-mcp": {
      "disabled": false,
      "timeout": 600,
      "type": "streamableHttp",
      "url": "http://localhost:3000/mcp",
      "headers": {
        "X-Tushare-Token": "your_tushare_token_here"
      }
    }
  }
}

Notes: The repository also documents an SSE mode for local usage. Depending on your deployment choice, you may run the SSE variant instead of HTTP. Ensure your environment variables include TUSHARE_TOKEN for full data access.

Additional notes

Tips and common considerations:

  • Set TUSHARE_TOKEN to unlock full data access and higher rate limits; without it you may experience restricted data or rate limits.
  • If using the HTTP/Streamable mode, point your MCP client to http://<host>:3000/mcp and ensure CORS if accessing from a browser-based client.
  • For production, prefer HTTP mode for cloud deployments and ensure proper authentication/whitelisting if exposing endpoints publicly.
  • The provided example configurations show how to enable the X-Tushare-Token header for Claude desktop integration; adjust headers if your client uses a different authentication flow.
  • Regularly update dependencies to keep up with Tushare API changes and MCP protocol updates.
  • If you encounter token-related errors, verify token permissions and that the token is not expired.
  • When running locally, ensure port 3000 is available or adjust the start scripts to bind a different port as needed.

Related MCP Servers

Sponsor this space

Reach thousands of developers