Provides real-time financial data using the Tushare API.
Language: English | įŽäŊ䏿
Welcome to FinanceMCP - A professional financial data server based on Model Context Protocol (MCP)! This project integrates Tushare API to provide comprehensive real-time financial data access for language models (like Claude), supporting multi-dimensional financial data analysis including stocks, funds, bonds, macroeconomic indicators, and more.
đĨ Complete Usage Tutorial: FinanceMCP - Comprehensive Financial Data Query Super MCP Tool Based on Tushare Data Interface
Watch our detailed bilibili video tutorial to learn how to:
Support stock data queries from major global markets:
Get data for major market indices like Shanghai Composite Index, Shenzhen Component Index, etc.
Get financial news content from mainstream financial media through real search API, supporting intelligent search with single or multiple keywords:
Get comprehensive financial data for listed companies with smart data filtering and batch display:
Performance optimized with 85% speed improvement (from 5.2s to 0.8s):
Query detailed information by fund manager name:
Get key macroeconomic indicator data with full Chinese localization:
Get comprehensive non-market data for convertible bonds:
Get detailed block trade data:
Get individual stock and market money flow data:
Get comprehensive margin trading data from multiple sources:
Get current time information for China timezone (UTC+8):
Seamless integration with MCP-compatible clients (like Claude) for intelligent financial analysis.
This server provides 12 professional financial tools:
Tool Name | Function Description | Key Features |
---|---|---|
đ current_timestamp | Current timestamp | China timezone, multiple formats |
đ° finance_news | Financial news search | Smart keyword search, multi-media sources |
đ stock_data | Stock data query | Global multi-market, 9 financial instruments |
đ index_data | Index data query | Major market indices |
đ macro_econ | Macroeconomic data | 11 economic indicators, Chinese optimized |
đĸ company_performance | Company financial analysis | Financial statements integrated, management info |
đ° fund_data | Fund data query | 5 major fund data types, performance optimized |
đ¨âđŧ fund_manager_by_name | Fund manager query | Query detailed info by name |
đĒ convertible_bond | Convertible bond data | Basic info + issuance data |
đ block_trade | Block trade data | Trade details + business department info |
đš money_flow | Money flow data | Individual stock + market money flow |
đ° margin_trade | Margin trade data | 4 APIs: Securities list + Trading summary/details + Market making |
Tool | Tushare API | Description |
---|---|---|
đ Timestamp | current_timestamp | Current time information |
đ° Financial News | Search API | Smart news search |
đ Stock Data | daily , us_daily , hk_daily , etc. | Multi-market stock data |
đ Index Data | index_daily | Market indices |
đ Macro Economics | shibor , gdp , cpi , etc. | Economic indicators |
đĸ Company Performance | income , balancesheet , cashflow , stk_managers , etc. | Financial statements + management info |
đ° Fund Data | fund_basic , fund_nav , etc. | Fund information |
đ¨âđŧ Fund Manager | fund_manager | Fund manager information |
đĒ Convertible Bond | cb_basic , cb_issue | Convertible bond data |
đ Block Trade | block_trade | Block trade data |
đš Money Flow | moneyflow | Money flow data |
đ° Margin Trade | margin_secs , margin , margin_detail , slb_len_mm | Multiple margin trading APIs |
Before getting started, please ensure you have:
Node.js and npm
Tushare API Token
Tushare provides 2000 free credits for student users, covering basic stock/index/futures/options/fund/convertible bond information, daily market data, and financial reports.
How to Get Student Credits:
Follow on Xiaohongshu (Little Red Book)
Join Student QQ Group
Complete Profile on Tushare
Submit for Credits
Tushare provides 5000 free credits for university teachers with higher data permissions and support.
How to Get Teacher Credits:
Add WeChat Contact
Complete Profile
Student Template (Optional)
If you're using Claude Desktop, you can quickly install via Smithery:
npx -y @smithery/cli install @guangxiangdebizi/finance-mcp --client claude
Get the code
git clone https://github.com/guangxiangdebizi/FinanceMCP.git
cd FinanceMCP
Install dependencies
npm install
Configure Tushare API Token
.env
file in the project root directoryTUSHARE_TOKEN=Your_Tushare_API_Token
src/config.ts
fileBuild the project
npm run build
There are two ways to start the server:
node build/index.js
npx supergateway --stdio "node build/index.js" --port 3100
To use this server in Claude or other MCP clients, you need the following configuration:
Add the following to Claude's configuration file:
{
"mcpServers": {
"finance-data-server": {
"url": "http://localhost:3100/sse", // If using Supergateway
"type": "sse",
}
}
}
If using stdio mode directly (without Supergateway), configure as follows:
{
"mcpServers": {
"finance-data-server": {
"command": "C:/path/to/FinanceMCP/build/index.js", // Modify to actual path
"type": "stdio",
"disabled": false,
"autoApprove": [
"current_timestamp",
"finance_news",
"stock_data",
"index_data",
"macro_econ",
"company_performance",
"fund_data",
"fund_manager_by_name",
"convertible_bond",
"block_trade",
"money_flow",
"margin_trade"
]
}
}
}
Once configured, you can ask Claude natural language questions about financial data:
Claude will automatically call the appropriate tools and provide comprehensive analysis based on the requested data.
The project currently integrates the following Tushare API interfaces:
Function | Tushare Interface | Description |
---|---|---|
Current Timestamp | current_timestamp | Get current China timezone (UTC+8) time information âī¸ |
A-share Data | daily | Get A-share daily market data |
US Stock Data | us_daily | Get US stock daily market data |
HK Stock Data | hk_daily | Get Hong Kong stock daily market data |
Forex Data | fx_daily | Get forex daily market data âī¸ Fixed |
Futures Data | fut_daily | Get futures daily market data |
Fund Data | fund_daily | Get fund daily market data |
Index Data | index_daily | Get index daily market data |
Financial News | Search API | Smart search mainstream financial websites âī¸ |
Shibor Rates | shibor_data | Get Shanghai Interbank Offered Rate |
LPR Rates | lpr_data | Get Loan Prime Rate |
GDP | cn_gdp | Get Gross Domestic Product data |
CPI | cn_cpi | Get Consumer Price Index data |
PPI | cn_ppi | Get Producer Price Index data âī¸ Fixed |
Money Supply | cn_m | Get money supply data (M0, M1, M2) |
PMI Index | cn_pmi | Get Purchasing Managers Index data âī¸ Optimized |
Social Financing | cn_sf | Get Total Social Financing data |
Shibor Quotes | shibor_quote | Get Shibor bank quote data (bid, ask) |
Libor Rates | libor | Get London Interbank Offered Rate |
Hibor Rates | hibor | Get Hong Kong Interbank Offered Rate |
Bond Repos | repo_daily | Get bond repo daily market data |
Convertible Bonds | cb_daily | Get convertible bond daily market data |
Options Data | opt_daily | Get options daily market data |
Income Statement | income | Get listed company income statement data âī¸ Integrated |
Balance Sheet | balancesheet | Get listed company balance sheet data âī¸ Integrated |
Cash Flow Statement | cashflow | Get listed company cash flow statement data âī¸ Integrated |
Earnings Forecast | forecast | Get listed company earnings forecast data |
Earnings Express | express | Get listed company earnings express data |
Financial Indicators | fina_indicator | Get listed company financial indicator data |
Dividends & Distribution | dividend | Get listed company dividend and distribution data |
Main Business | fina_mainbz | Get main business composition data |
Shareholder Count | stk_holdernumber | Get shareholder count data |
Shareholder Trading | stk_holdertrade | Get shareholder trading data |
Fund List | fund_basic | Get public fund basic information âī¸ Optimized |
Fund NAV | fund_nav | Get fund net asset value data âī¸ Optimized |
Fund Dividends | fund_div | Get fund dividend and distribution data âī¸ Fixed |
Fund Holdings | fund_portfolio | Get fund holdings details âī¸ Optimized |
Fund Managers | fund_manager | Get fund manager information âī¸ Independent Tool |
Convertible Bond Basic | cb_basic | Get convertible bond basic information âī¸ |
Convertible Bond Issue | cb_issue | Get convertible bond issuance data âī¸ |
Block Trade | block_trade | Get block trade data âī¸ New |
Money Flow | moneyflow | Get individual stock and market money flow data âī¸ New |
Margin Securities | margin_secs | Get margin trading eligible securities list âī¸ Enhanced |
Margin Summary | margin | Get margin trading summary data âī¸ Enhanced |
Margin Details | margin_detail | Get detailed margin trading records âī¸ Enhanced |
Securities Lending | slb_len_mm | Get market making securities lending data âī¸ Enhanced |
Future plans include integrating more Tushare data interfaces, including but not limited to:
See the tushare-interfaces.md
file for more potential data interfaces that could be integrated.
This project is licensed under the MIT License. See the LICENSE file for details.
Welcome to submit Issues and Pull Requests to improve this project!
If this project helps you, please give us a Star! Your support is our motivation for continuous improvement.
Manage and query databases, tenants, users, auth using LLMs
A production-ready MCP server for Customer Relationship Management (CRM) functionality, built with TypeScript and SQLite.
BigQuery database integration with schema inspection and query capabilities
Securely access BigQuery datasets with intelligent caching, schema tracking, and query analytics via Supabase integration.
Read and write access to your Baserow tables.
Create, manage, and update applications on InstantDB, the modern Firebase.
Enables AI assistants to interact with the Hive blockchain through the Model Context Protocol.
An MCP server for the Chroma embedding database, providing persistent, searchable working memory for AI-assisted development with features like automated context recall and codebase indexing.
Interact with the Neon serverless Postgres platform
Leverages your Schemas and Access Patterns to interact with your DynamoDB Database using natural language.