loading…
Search for a command to run...
loading…
MCP server that wraps SFC financial data API into 32 tools for comprehensive A-share market data, including real-time quotes, rankings, limit-up statistics, new
MCP server that wraps SFC financial data API into 32 tools for comprehensive A-share market data, including real-time quotes, rankings, limit-up statistics, news, themes, financials, charts, research reports, and watchlists.
南财财经 (SFC) 金融数据终端 MCP 服务,将 SFC 金融数据 API 封装为 MCP 工具,提供 A 股全面的数据查询能力。
| 模块 | 工具数量 | 功能说明 |
|---|---|---|
| 📊 实时行情 | 3 | 股票报价、分时数据、K线数据 |
| 🏆 排行榜 | 4 | 个股/ETF/基金/板块涨幅榜、跌幅榜 |
| 🚀 涨停统计 | 4 | 连板情况、涨停列表、大涨主题、大涨股票 |
| 📰 资讯快讯 | 5 | 最新文章、7*24快讯、股票资讯、公司公告、搜索资讯 |
| 🏷️ 主题概念 | 7 | 主题列表、详情、成分股、产业链、主题基金、搜索、推荐 |
| 🌍 宏观经济 | 1 | GDP、CPI、PPI、PMI 等宏观数据 |
| 💰 财务数据 | 4 | 资产负债表、利润表、现金流量表、财务指标 |
| 💸 资金流向 | 1 | 个股主力资金、散户资金流向 |
| 🔍 深度分析 | 1 | 个股综合分析(行情+财务+资金+资讯) |
| 🖼️ 行情图片 | 1 | 市场指数图、涨跌分布、板块排行、分时图、K线图 |
| 📑 研报查询 | 1 | 券商研究报告 |
| ⭐ 自选股 | 1 | 自选股分组及行情 |
共计 32 个 MCP 工具
pip install -r requirements.txt
复制 .env.example 为 .env,填入你的 SFC Token:
cp .env.example .env
或者设置环境变量:
# Linux/macOS
export SFC_TOKEN=your-token-here
# Windows PowerShell
$env:SFC_TOKEN = "your-token-here"
python server.py
在 MCP 客户端配置文件中添加:
{
"mcpServers": {
"sfc-data": {
"command": "python",
"args": ["server.py"],
"cwd": "/path/to/sfc-data-mcp",
"env": {
"SFC_TOKEN": "your-token-here"
}
}
}
}
| 工具名 | 说明 | 参数 |
|---|---|---|
get_realtime_quote |
获取A股股票实时行情 | code (股票代码) |
get_minute_data |
获取股票分时数据 | code, date (可选) |
get_kline_data |
获取股票K线数据 | code, period (可选), count (可选) |
| 工具名 | 说明 | 参数 |
|---|---|---|
get_stock_ranking |
获取个股排行榜 | rank_type (gain/loss/volume/amount), count |
get_etf_ranking |
获取ETF排行榜 | rank_type, count |
get_fund_ranking |
获取基金排行榜 | rank_type, count |
get_sector_ranking |
获取板块排行榜 | sector_type (industry/concept) |
| 工具名 | 说明 | 参数 |
|---|---|---|
get_limit_up_count |
获取涨停统计(连板情况) | date (可选) |
get_limit_up_list |
获取涨停股票列表 | date, flag, page, size |
get_limit_surge_themes |
获取大涨主题库 | date (可选) |
get_limit_surge_stocks |
获取主题大涨股票 | theme_id, date, is_limit_up |
| 工具名 | 说明 | 参数 |
|---|---|---|
get_recent_news |
获取最新文章 | count |
get_flash_news |
获取7*24快讯 | keyword (可选), count |
get_stock_news |
获取股票资讯 | code, count |
get_company_notice |
获取公司公告 | code, count |
search_news |
搜索资讯 | keyword, count |
| 工具名 | 说明 | 参数 |
|---|---|---|
get_theme_list |
获取主题列表 | page, size |
get_theme_detail |
获取主题详情 | theme_id 或 theme_name |
get_theme_stocks |
获取主题成分股 | theme_id, page, size |
get_theme_industry_chain |
获取主题产业链 | theme_id |
get_theme_funds |
获取主题基金 | theme_id, page, size |
search_theme |
搜索主题 | keyword, size |
get_recommended_themes |
获取推荐主题 | theme_type (2/3/4), size |
| 工具名 | 说明 | 参数 |
|---|---|---|
get_macro_data |
获取宏观经济数据 | indicator_code (可选), category (可选) |
| 工具名 | 说明 | 参数 |
|---|---|---|
get_balance_sheet |
获取资产负债表 | code, count |
get_income_statement |
获取利润表 | code, count |
get_cash_flow |
获取现金流量表 | code, count |
get_financial_indicators |
获取主要财务指标 | code |
| 工具名 | 说明 | 参数 |
|---|---|---|
get_capital_flow |
获取个股资金流向 | code, count |
| 工具名 | 说明 | 参数 |
|---|---|---|
get_stock_analysis |
获取个股综合分析 | code |
| 工具名 | 说明 | 参数 |
|---|---|---|
generate_chart |
生成行情图片 | widget_type, code, chart_type, period |
widget_type 说明:
| 工具名 | 说明 | 参数 |
|---|---|---|
get_research_reports |
获取研究报告 | keyword (可选), count |
| 工具名 | 说明 | 参数 |
|---|---|---|
get_watchlist_groups |
获取自选股分组 | 无 |
{
"name": "get_realtime_quote",
"arguments": {
"code": "300724"
}
}
{
"name": "get_limit_up_count",
"arguments": {}
}
{
"name": "get_limit_surge_themes",
"arguments": {}
}
{
"name": "get_theme_stocks",
"arguments": {
"theme_id": "11060009"
}
}
{
"name": "get_financial_indicators",
"arguments": {
"code": "300724"
}
}
{
"name": "generate_chart",
"arguments": {
"widget_type": 5,
"code": "300724"
}
}
# 构建镜像
docker build -t sfc-data-mcp .
# 运行容器
docker run -d \
--name sfc-data-mcp \
-e SFC_TOKEN=your-token-here \
sfc-data-mcp
.env 文件所有数据来源于南方财经 (SFC) 金融数据终端。
南方财经(南方财经全媒体集团)是经中央批准的全国首家全媒体集团,由南方报业传媒集团和广东广播电视台联合发起成立。
MIT
Run in your terminal:
claude mcp add sfc-data-mcp -- npx Security
Low riskAutomated heuristic from public metadata — not a security guarantee.