Stock Data MCP Server
English | 中文
MCP 服务器,提供 A股/港股/美股、加密货币数据查询,支持多数据源自动故障转移。
安装
PyPI
- MCP 配置
{
"mcpServers": {
"stock-data": {
"command": "uvx",
"args": ["stock-data-mcp"]
}
}
}
Docker
docker run -p 8808:8808 ghcr.io/stockmcp/stock-data-mcp
- MCP 配置
{
"mcpServers": {
"stock-data": {
"url": "http://0.0.0.0:8808/mcp" # Streamable HTTP
}
}
}
Git 源码(开发版,会实时更新)
- MCP 配置
{
"mcpServers": {
"stock-data": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/stockmcp/stock-data-mcp",
"stock-data-mcp"
]
}
}
}
环境变量(可选)
| 变量 | 说明 |
|---|---|
TUSHARE_TOKEN |
Tushare Pro API Token(A股高优先数据源) |
ALPHA_VANTAGE_API_KEY |
Alpha Vantage API Key(美股数据增强,不配置则使用 yfinance 免费源) |
OKX_BASE_URL |
OKX API 代理地址 |
BINANCE_BASE_URL |
Binance API 代理地址 |
NEWSNOW_CHANNELS |
NewsNow 财经快讯频道列表(默认:wallstreetcn-quick,cls-telegraph,jin10) |
Claude Code
claude mcp add stock-data \
-e TUSHARE_TOKEN=your_token \
-e ALPHA_VANTAGE_API_KEY=your_key \
-e OKX_BASE_URL=https://okx.4url.cn\
-e BINANCE_BASE_URL=https://bian.4url.cn \
-- uvx stock-data-mcp
工具列表
| 工具 | 说明 |
|---|---|
search |
股票搜索 |
stock_info |
股票信息 |
stock_prices |
历史价格+技术指标 |
stock_realtime |
实时行情 |
stock_batch_realtime |
批量实时行情 |
stock_chip |
筹码分布 |
stock_fund_flow |
个股资金流向 |
stock_period_stats |
多周期统计 |
stock_sector_spot |
个股所属板块 |
stock_board_cons |
板块成分股 |
stock_news |
个股新闻 |
stock_news_global |
全球财经快讯 |
stock_indicators_a |
A股财务指标 |
stock_indicators_hk |
港股财务指标 |
stock_indicators_us |
美股财务指标 |
stock_zt_pool_em |
A股涨停股池 |
stock_zt_pool_strong_em |
A股强势股池 |
stock_lhb_ggtj_sina |
A股龙虎榜 |
stock_sector_fund_flow_rank |
板块资金流 |
stock_overview_us |
美股公司概览(Alpha Vantage / yfinance) |
stock_financials_us |
美股财务报表(Alpha Vantage / yfinance) |
stock_news_us |
美股新闻情绪(需 Alpha Vantage API key) |
stock_earnings_us |
美股盈利数据(Alpha Vantage / yfinance) |
stock_insider_us |
美股内部交易(Alpha Vantage / yfinance) |
stock_tech_indicators_us |
美股技术指标(需 Alpha Vantage API key) |
okx_prices |
加密货币K线 |
okx_loan_ratios |
加密货币借贷比 |
okx_taker_volume |
加密货币买卖量 |
binance_ai_report |
加密货币AI分析 |
get_current_time |
系统时间及交易日 |
data_source_status |
数据源状态 |
License
MIT
Tools 31
searchSearch for stocksstock_infoGet detailed stock informationstock_pricesRetrieve historical prices and technical indicatorsstock_realtimeGet real-time market data for a stockstock_batch_realtimeGet real-time data for multiple stocksstock_chipAnalyze chip distributionstock_fund_flowTrack individual stock fund flowstock_period_statsGet multi-period statisticsstock_sector_spotIdentify sectors for a specific stockstock_board_consList constituent stocks of a boardstock_newsFetch news for a specific stockstock_news_globalGet global financial newsstock_indicators_aGet A-share financial indicatorsstock_indicators_hkGet Hong Kong stock financial indicatorsstock_indicators_usGet US stock financial indicatorsstock_zt_pool_emGet A-share limit-up poolstock_zt_pool_strong_emGet A-share strong limit-up poolstock_lhb_ggtj_sinaGet A-share dragon and tiger liststock_sector_fund_flow_rankRank sectors by fund flowstock_overview_usGet US company overviewstock_financials_usGet US financial statementsstock_news_usGet US stock news sentimentstock_earnings_usGet US earnings datastock_insider_usGet US insider trading datastock_tech_indicators_usGet US technical indicatorsokx_pricesGet cryptocurrency K-line dataokx_loan_ratiosGet crypto loan ratiosokx_taker_volumeGet crypto taker volumebinance_ai_reportGet AI-generated crypto analysisget_current_timeGet system time and trading day statusdata_source_statusCheck status of data sourcesEnvironment Variables
TUSHARE_TOKENTushare Pro API Token for A-share dataALPHA_VANTAGE_API_KEYAlpha Vantage API Key for US stock dataOKX_BASE_URLProxy URL for OKX APIBINANCE_BASE_URLProxy URL for Binance APINEWSNOW_CHANNELSList of financial news channels