MCP 工具概览
MCP 工具是给 LLM Agent 用的 REST 适配器。它不重写业务逻辑,只重新组织参数与 响应形态,让 LLM 在对话中更容易选对工具、传对参数、解析返回值。
- 薄包装原则:工具实现层只调 REST router,不直接访问 service 层。
- 数据语义一致:MCP 与 REST 共享同一套后端 capability,字段含义完全相同。
- 错误透传:REST 错误体
{code, message, request_id}原样回传给客户端。
鉴权
| 形态 | 入口 | 鉴权 |
|---|---|---|
| 托管 MCP Server | 上游网关代理 | 网关校验 X-api-key header |
| 自托管 / 本地调试 | 通过 MCP 客户端本地启动 | 环境变量 API_KEY 注入 |
export API_KEY="<your-api-key>"
API Key 与 REST API 共用,可在 API Key 管理 页签发。
调用频率与限流
本服务当前不限制累计调用次数。为保障服务稳定性,请根据业务场景合理控制请求频率,避免短时间内集中或高并发调用。服务可能依据实时负载动态调整限流策略;HTTP 429 响应或 code=4001 均表示触发限流。此时请降低并发量和请求频率,避免立即连续重试,并在稍后重新发起请求。
MCP 服务与访问端点
按数据域拆分为七个 MCP 服务,MCP 端点 host 为 fuyao.aicubes.cn:
| MCP 服务 | 标的宇宙 | MCP 访问端点 |
|---|---|---|
fuyao-a-share-mcp | A 股标的宇宙 | https://fuyao.aicubes.cn/mcp/a-share |
fuyao-news-mcp | 资讯事件 | https://fuyao.aicubes.cn/mcp/news |
fuyao-a-share-index-mcp | A 股同花顺指数 | https://fuyao.aicubes.cn/mcp/a-share-index |
fuyao-fund-mcp | 公募基金 | https://fuyao.aicubes.cn/mcp/fund |
fuyao-futures-mcp | 期货 | https://fuyao.aicubes.cn/mcp/futures |
fuyao-options-mcp | 期权 | https://fuyao.aicubes.cn/mcp/options |
fuyao-meta-mcp | 跨宇宙元信息 | https://fuyao.aicubes.cn/mcp/meta |
fuyao-meta-mcp 提供的标的检索是其余业务工具的前置步骤,建议与任一业务 MCP 服务
一起加载。挂载到 Claude Desktop / Cursor / 其他 MCP 客户端后即可在对话中调用以下
工具。
客户端快速配置
把下面这段 JSON 粘进 MCP 客户端的配置文件即可同时挂载这些服务。<your-api-key>
替换为在 API Key 管理 页签发的 API Key。
{
"mcpServers": {
"fuyao-a-share": {
"type": "http",
"url": "https://fuyao.aicubes.cn/mcp/a-share",
"headers": {
"X-api-key": "<your-api-key>"
}
},
"fuyao-a-share-index": {
"type": "http",
"url": "https://fuyao.aicubes.cn/mcp/a-share-index",
"headers": {
"X-api-key": "<your-api-key>"
}
},
"fuyao-fund": {
"type": "http",
"url": "https://fuyao.aicubes.cn/mcp/fund",
"headers": {
"X-api-key": "<your-api-key>"
}
},
"fuyao-meta": {
"type": "http",
"url": "https://fuyao.aicubes.cn/mcp/meta",
"headers": {
"X-api-key": "<your-api-key>"
}
}
}
}
各客户端配置文件位置:
| 客户端 | 配置文件路径 |
|---|---|
| Claude Desktop | ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) · %APPDATA%\Claude\claude_desktop_config.json (Windows) |
| Cursor | ~/.cursor/mcp.json |
| Windsurf | ~/.codeium/windsurf/mcp_config.json |
| Cline (VS Code) | 命令面板 → Cline: Open MCP Settings |
配好后重启客户端生效,在对话里可直接调用下表中的工具。
工具一览
当前共注册 88 个工具,覆盖资讯事件、A 股、指数、标的元信息、基金,以及期货期权的基础资料、持仓、基差、日程和行情。
| MCP 服务 | MCP 端点 | MCP 工具 | 中文名 | 对应 REST |
|---|---|---|---|---|
| fuyao-news-mcp | /mcp/news | get_news_events_search | 资讯事件库搜索 | GET /api/news/events/search |
| fuyao-a-share-mcp | /mcp/a-share | get_a_share_prices_snapshot | A股行情快照 | GET /api/a-share/prices/snapshot |
| fuyao-a-share-mcp | /mcp/a-share | get_a_share_prices_historical | A股历史K线 | GET /api/a-share/prices/historical |
| fuyao-a-share-mcp | /mcp/a-share | get_a_share_valuations_snapshot | A股估值快照 | GET /api/a-share/valuations/snapshot |
| fuyao-a-share-mcp | /mcp/a-share | get_a_share_corporate_actions_adjustment_factors | 复权因子事件流 | GET /api/a-share/corporate-actions/adjustment-factors |
| fuyao-a-share-mcp | /mcp/a-share | get_a_share_financials_income_statements | 利润表 | GET /api/a-share/financials/income-statements |
| fuyao-a-share-mcp | /mcp/a-share | get_a_share_financials_balance_sheets | 资产负债表 | GET /api/a-share/financials/balance-sheets |
| fuyao-a-share-mcp | /mcp/a-share | get_a_share_financials_cash_flow_statements | 现金流量表 | GET /api/a-share/financials/cash-flow-statements |
| fuyao-a-share-mcp | /mcp/a-share | get_a_share_financials_indicators | 财务指标数据 | GET /api/a-share/financials/indicators |
| fuyao-a-share-mcp | /mcp/a-share | get_a_share_calendar_trading_days | A股交易日历 | GET /api/a-share/calendar/trading-days |
| fuyao-a-share-mcp | /mcp/a-share | get_a_share_auction_snapshot | A股集合竞价快照 | GET /api/a-share/auction/snapshot |
| fuyao-a-share-mcp | /mcp/a-share | get_a_share_auction_short_term_benchmark | 短线风向标竞价基准 | GET /api/a-share/auction/short-term-benchmark |
| fuyao-a-share-mcp | /mcp/a-share | get_a_share_special_data_limit_up_pool | A股涨停池 | GET /api/a-share/special-data/limit-up-pool |
| fuyao-a-share-mcp | /mcp/a-share | get_a_share_special_data_limit_down_pool | A股跌停池 | GET /api/a-share/special-data/limit-down-pool |
| fuyao-a-share-mcp | /mcp/a-share | get_a_share_special_data_limit_break_pool | A股炸板池 | GET /api/a-share/special-data/limit-break-pool |
| fuyao-a-share-mcp | /mcp/a-share | get_a_share_special_data_limit_up_ladder | A股涨停天梯 | GET /api/a-share/special-data/limit-up-ladder |
| fuyao-a-share-mcp | /mcp/a-share | get_a_share_special_data_skyrocket_list | A股飙升榜 | GET /api/a-share/special-data/skyrocket-list |
| fuyao-a-share-mcp | /mcp/a-share | get_a_share_special_data_hot_stock_list | A股热股榜 | GET /api/a-share/special-data/hot-stock-list |
| fuyao-a-share-mcp | /mcp/a-share | get_a_share_special_data_hot_stock_list_history | A股历史热股榜 | GET /api/a-share/special-data/hot-stock-list-history |
| fuyao-a-share-mcp | /mcp/a-share | get_a_share_special_data_hot_stock_rank_trend | A股热股排名趋势 | GET /api/a-share/special-data/hot-stock-rank-trend |
| fuyao-a-share-mcp | /mcp/a-share | get_a_share_special_data_dragon_tiger_list | A股龙虎榜 | GET /api/a-share/special-data/dragon-tiger-list |
| fuyao-a-share-mcp | /mcp/a-share | get_a_share_special_data_anomaly_analysis_stock | A股个股异动原因 | GET /api/a-share/special-data/anomaly-analysis-stock |
| fuyao-a-share-index-mcp | /mcp/a-share-index | get_a_share_index_catalog_ths_index_list | THS 指数目录 | GET /api/a-share-index/catalog/ths-index-list |
| fuyao-a-share-index-mcp | /mcp/a-share-index | get_a_share_index_constituents_ths_stock_list | THS 指数成分股列表 | GET /api/a-share-index/constituents/ths-stock-list |
| fuyao-a-share-index-mcp | /mcp/a-share-index | get_a_share_index_prices_snapshot | A股指数行情快照 | GET /api/a-share-index/prices/snapshot |
| fuyao-a-share-index-mcp | /mcp/a-share-index | get_a_share_index_prices_historical | A股指数历史K线 | GET /api/a-share-index/prices/historical |
| fuyao-futures-mcp | /mcp/futures | get_futures_varieties_list | 期货品种资料 | GET /api/futures/varieties/list |
| fuyao-futures-mcp | /mcp/futures | get_futures_contracts_detail | 期货合约详情 | GET /api/futures/contracts/detail |
| fuyao-futures-mcp | /mcp/futures | get_futures_contracts_list | 期货合约基础信息列表 | GET /api/futures/contracts/list |
| fuyao-futures-mcp | /mcp/futures | get_futures_variety_plates_list | 期货品种板块 | GET /api/futures/variety-plates/list |
| fuyao-futures-mcp | /mcp/futures | get_futures_contracts_main_continuous_list | 期货主连列表 | GET /api/futures/contracts/main-continuous-list |
| fuyao-futures-mcp | /mcp/futures | get_futures_contracts_main_list | 期货主力合约列表 | GET /api/futures/contracts/main-list |
| fuyao-futures-mcp | /mcp/futures | get_futures_contracts_secondary_main_list | 期货次主力合约列表 | GET /api/futures/contracts/secondary-main-list |
| fuyao-futures-mcp | /mcp/futures | get_futures_contracts_commodity_index_list | 期货商品指数资料 | GET /api/futures/contracts/commodity-index-list |
| fuyao-futures-mcp | /mcp/futures | get_futures_positions_variety_daily | 期货品种日持仓 | GET /api/futures/positions/variety-daily |
| fuyao-futures-mcp | /mcp/futures | get_futures_positions_company_variety_daily | 公司品种日持仓 | GET /api/futures/positions/company-variety-daily |
| fuyao-futures-mcp | /mcp/futures | get_futures_positions_contract_daily | 期货合约日持仓 | GET /api/futures/positions/contract-daily |
| fuyao-futures-mcp | /mcp/futures | get_futures_positions_contract_historical | 期货合约历史持仓 | GET /api/futures/positions/contract-historical |
| fuyao-futures-mcp | /mcp/futures | get_futures_positions_company_list | 期货公司列表 | GET /api/futures/positions/company-list |
| fuyao-futures-mcp | /mcp/futures | get_futures_warehouse_receipts_historical | 期货历史仓单 | GET /api/futures/warehouse-receipts/historical |
| fuyao-futures-mcp | /mcp/futures | get_futures_basis_main_continuous_latest | 期货主连最新基差 | GET /api/futures/basis/main-continuous-latest |
| fuyao-futures-mcp | /mcp/futures | get_futures_basis_historical | 期货历史基差 | GET /api/futures/basis/historical |
| fuyao-futures-mcp | /mcp/futures | get_futures_calendar_trading_schedule | 期货交易日日程 | GET /api/futures/calendar/trading-schedule |
| fuyao-futures-mcp | /mcp/futures | get_futures_calendar_session_timeline | 期货会话时间轴 | GET /api/futures/calendar/session-timeline |
| fuyao-futures-mcp | /mcp/futures | get_futures_prices_intraday | 期货分时 | GET /api/futures/prices/intraday |
| fuyao-futures-mcp | /mcp/futures | get_futures_prices_daily | 期货K线 | GET /api/futures/prices/daily |
| fuyao-options-mcp | /mcp/options | get_options_varieties_list | 期权品种资料 | GET /api/options/varieties/list |
| fuyao-options-mcp | /mcp/options | get_options_contracts_detail | 期权合约详情 | GET /api/options/contracts/detail |
| fuyao-options-mcp | /mcp/options | get_options_contracts_list | 期权合约基础信息列表 | GET /api/options/contracts/list |
| fuyao-options-mcp | /mcp/options | get_options_calendar_session_timeline | 期权会话时间轴 | GET /api/options/calendar/session-timeline |
| fuyao-options-mcp | /mcp/options | get_options_prices_intraday | 期权分时 | GET /api/options/prices/intraday |
| fuyao-options-mcp | /mcp/options | get_options_prices_daily | 期权K线 | GET /api/options/prices/daily |
| fuyao-fund-mcp | /mcp/fund | get_fund_profile_detail | 基金基本资料 | GET /api/fund/profile/detail |
| fuyao-fund-mcp | /mcp/fund | get_fund_portfolio_holdings | 基金重仓股 | GET /api/fund/portfolio/holdings |
| fuyao-fund-mcp | /mcp/fund | get_fund_performance_nav | 基金净值 | GET /api/fund/performance/nav |
| fuyao-fund-mcp | /mcp/fund | get_fund_performance_returns | 基金区间收益 | GET /api/fund/performance/returns |
| fuyao-fund-mcp | /mcp/fund | get_fund_holders_detail | 基金持有人结构 | GET /api/fund/holders/detail |
| fuyao-fund-mcp | /mcp/fund | get_fund_market_snapshot | 基金行情快照 | GET /api/fund/market/snapshot |
| fuyao-fund-mcp | /mcp/fund | get_fund_market_historical | ETF 历史日线行情 | GET /api/fund/market/historical |
| fuyao-fund-mcp | /mcp/fund | get_fund_companies_detail | 基金公司详情 | GET /api/fund/companies/detail |
| fuyao-fund-mcp | /mcp/fund | get_fund_portfolio_industry_allocation | 基金行业配置 | GET /api/fund/portfolio/industry-allocation |
| fuyao-fund-mcp | /mcp/fund | get_fund_performance_indicators_historical | 基金历史业绩指标 | GET /api/fund/performance/indicators-historical |
| fuyao-fund-mcp | /mcp/fund | get_fund_performance_drawdowns | 基金回撤指标 | GET /api/fund/performance/drawdowns |
| fuyao-fund-mcp | /mcp/fund | get_fund_holders_top | 基金前十大持有人 | GET /api/fund/holders/top |
| fuyao-fund-mcp | /mcp/fund | get_fund_corporate_actions_dividends | 基金分红记录 | GET /api/fund/corporate-actions/dividends |
| fuyao-fund-mcp | /mcp/fund | get_fund_diagnostics_detail | 基金诊断详情 | GET /api/fund/diagnostics/detail |
| fuyao-fund-mcp | /mcp/fund | get_fund_financials_indicators | 基金财务指标 | GET /api/fund/financials/indicators |
| fuyao-fund-mcp | /mcp/fund | get_fund_financials_income_statements | 基金利润表 | GET /api/fund/financials/income-statements |
| fuyao-fund-mcp | /mcp/fund | get_fund_financials_balance_sheets | 基金资产负债表 | GET /api/fund/financials/balance-sheets |
| fuyao-fund-mcp | /mcp/fund | get_fund_backtest_result | 基金在线回测 | GET /api/fund/backtest/result |
| fuyao-fund-mcp | /mcp/fund | get_fund_backtest_indicators | 基金回测指标 | GET /api/fund/backtest/indicators |
| fuyao-fund-mcp | /mcp/fund | get_fund_indicators_line | 基金画线指标 | GET /api/fund/indicators/line |
| fuyao-fund-mcp | /mcp/fund | get_fund_indicators_table | 基金表格指标 | GET /api/fund/indicators/table |
| fuyao-fund-mcp | /mcp/fund | get_fund_quota_summary | QDII额度汇总 | GET /api/fund/quota/summary |
| fuyao-fund-mcp | /mcp/fund | get_fund_quota_list | QDII额度列表 | GET /api/fund/quota/list |
| fuyao-fund-mcp | /mcp/fund | get_fund_managers_investment_style | 基金经理投资风格 | GET /api/fund/managers/investment-style |
| fuyao-fund-mcp | /mcp/fund | get_fund_managers_performance | 基金经理业绩 | GET /api/fund/managers/performance |
| fuyao-fund-mcp | /mcp/fund | get_fund_managers_experience | 基金经理从业经历 | GET /api/fund/managers/experience |
| fuyao-fund-mcp | /mcp/fund | get_fund_managers_detail | 基金经理详情 | GET /api/fund/managers/detail |
| fuyao-fund-mcp | /mcp/fund | get_fund_news_article_list | 基金资讯列表 | GET /api/fund/news/article-list |
| fuyao-fund-mcp | /mcp/fund | get_fund_offerings_list | 基金募集列表 | GET /api/fund/offerings/list |
| fuyao-fund-mcp | /mcp/fund | get_fund_portfolio_stock_history | 基金历史股票持仓 | GET /api/fund/portfolio/stock-history |
| fuyao-fund-mcp | /mcp/fund | get_fund_portfolio_stock_report_dates | 基金股票持仓报告日期 | GET /api/fund/portfolio/stock-report-dates |
| fuyao-fund-mcp | /mcp/fund | get_fund_portfolio_bond_history | 基金历史债券持仓 | GET /api/fund/portfolio/bond-history |
| fuyao-fund-mcp | /mcp/fund | get_fund_portfolio_bond_report_dates | 基金债券持仓报告日期 | GET /api/fund/portfolio/bond-report-dates |
| fuyao-fund-mcp | /mcp/fund | get_fund_portfolio_asset_allocation | 基金资产配置 | GET /api/fund/portfolio/asset-allocation |
| fuyao-meta-mcp | /mcp/meta | get_meta_tickers_search | 标的检索(跨市场消歧) | GET /api/meta/tickers/search |
| fuyao-meta-mcp | /mcp/meta | get_meta_tickers_list | 标的目录(代码表浏览) | GET /api/meta/tickers/list |
AI Agent 跨服务调用场景
get_meta_tickers_search 是前置工具:当 LLM 不确定标准
thscode 代码时,应先调它消歧,再调数据工具。fuyao-meta-mcp 解析标的,
fuyao-a-share-mcp 取业务数据,两者配合完成完整链路。
场景一:查询股票行情
用户:"查一下贵州茅台今天的行情"
fuyao-meta-mcp→get_meta_tickers_search,q: "贵州茅台",获取thscode: 600519.SHfuyao-a-share-mcp→get_a_share_prices_snapshot,thscodes: "600519.SH",获取实时行情
场景二:获取历史走势
用户:"茅台最近一年的日 K 线走势如何?"
fuyao-meta-mcp→get_meta_tickers_search,q: "茅台",获取thscode: 600519.SH- 计算当前与一年前的毫秒时间戳
fuyao-a-share-mcp→get_a_share_prices_historical,thscode/interval/start/end/adjust
场景三:获取股票代码表
用户:"列出所有 A 股代码"
fuyao-meta-mcp→get_meta_tickers_list,asset_type: "a-share",limit: 1000,offset: 0- 若返回数量等于 limit,递增 offset 继续调用直到取尽
场景四:查询公司财务报表
用户:"茅台最近 3 年的年报利润情况"
fuyao-meta-mcp→get_meta_tickers_search,q: "茅台",获取thscode: 600519.SHfuyao-a-share-mcp→get_a_share_financials_income_statements,thscode: "600519.SH",period: "annual",limit: 3
场景五:对比多家公司资产负债
用户:"对比茅台和五粮液最近一期季报的资产负债表"
fuyao-meta-mcp→get_meta_tickers_search,q: "茅台",获取thscode: 600519.SHfuyao-meta-mcp→get_meta_tickers_search,q: "五粮液",获取thscode: 000858.SZfuyao-a-share-mcp→get_a_share_financials_balance_sheets,thscode: "600519.SH",period: "quarterly",limit: 1fuyao-a-share-mcp→get_a_share_financials_balance_sheets,thscode: "000858.SZ",period: "quarterly",limit: 1
场景六:查看交易日历
用户:"最近一年有哪些交易日"
fuyao-a-share-mcp→get_a_share_calendar_trading_days,无参数,返回近一年交易日列表(无需前置检索)
场景七:拉取概念板块成分股
用户:"白酒概念板块都有哪些股票?"
fuyao-a-share-index-mcp→get_a_share_index_catalog_ths_index_list,tag: "cn_concept", 从返回item中匹配name = "白酒概念"的thscode(例如886042.TI)fuyao-a-share-index-mcp→get_a_share_index_constituents_ths_stock_list,thscode: "886042.TI",拿到成分股清单
场景八:取沪深 300 成分股实时行情
用户:"沪深 300 成分股今天的行情"
fuyao-a-share-index-mcp→get_a_share_index_constituents_ths_stock_list,thscode: "000300.SH",拿到成分股thscode列表- 将
thscode列表逗号拼接(可分批以控制单次请求长度) fuyao-a-share-mcp→get_a_share_prices_snapshot,thscodes: "...",批量取实时行情
场景九:查询指数行情
用户:"上证综指和白酒概念今天表现如何?"
- 如不确定代码,先用
fuyao-meta-mcp→get_meta_tickers_search分别检索 "上证综指" / "白酒概念" fuyao-a-share-index-mcp→get_a_share_index_prices_snapshot,thscodes: "000001.SH,886042.TI",批量取指数快照
场景十:获取指数历史走势
用户:"白酒概念最近一年的日 K 线"
fuyao-meta-mcp→get_meta_tickers_search,q: "白酒概念",获取thscode: 886042.TI- 计算当前与一年前的毫秒时间戳
fuyao-a-share-index-mcp→get_a_share_index_prices_historical,thscode/interval/start/end
与 REST 的差异
- 认证方式:REST 在请求 header 携带
X-api-key;MCP 通过环境变量API_KEY注入。 - 调用方式:REST 通过 HTTP 客户端调用;MCP 以 MCP Server 形态供 AI Agent 调用。
- 数据完全一致:两者调用同一套后端 capability,字段、错误码、响应信封完全相同。