FactorHub MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@FactorHub MCP Serverlist available factors"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
FactorHub MCP Server
中文
A 股量化数据 MCP 服务器 —— 让 Claude、Cursor 等 AI 工具直接查询因子数据、行情、估值、回测。
功能列表
工具 | 说明 |
| 设置你的 API Key(可选,不设置使用免费体验额度) |
| 因子列表(分类、搜索) |
| 因子评分指标(年化收益、夏普、IC等) |
| 因子净值曲线 |
| 个股日线行情(OHLCV) |
| 指数日线(上证、沪深300等) |
| 估值指标(PE、PB、PS、股息率) |
| 个股基本信息 |
| 股票筛选 |
| 交易日历 |
| 量化策略回测 |
快速开始
方式一:免费体验(无需注册)
使用托管服务器,无需 API Key,自带免费额度(10 次/天)。
Claude Desktop —— 编辑 claude_desktop_config.json:
{
"mcpServers": {
"factorhub": {
"command": "npx",
"args": ["-y", "@smithery/cli@latest", "run", "factorhub"]
}
}
}或直接远程连接:
https://factorhub.cn/mcp/sse方式二:安装到本地(使用自己的 API Key)
注册 factorhub.cn,在 API Key 管理页 生成 Key,获得更高额度。
pip install factorhub-mcpClaude Desktop —— 编辑 claude_desktop_config.json:
{
"mcpServers": {
"factorhub": {
"command": "factorhub-mcp",
"env": {
"FACTORHUB_API_KEY": "fh_你的密钥"
}
}
}
}Cursor —— 编辑 .cursor/mcp.json,格式同上。
Claude Code —— 运行:
claude mcp add factorhub -- env FACTORHUB_API_KEY=fh_你的密钥 factorhub-mcpOpenClaw —— 添加到技能配置:
providers:
factorhub:
type: mcp
command: factorhub-mcp
env:
FACTORHUB_API_KEY: "fh_你的密钥"方式三:通过 Smithery 安装
在 Smithery 一键安装,自动配置到你的 AI 客户端。
使用示例
配置完成后,直接对你的 AI 助手说:
"查看 FactorHub 有哪些因子"
"获取动量因子的历史表现"
"帮我查一下贵州茅台最近一年的行情"
"用低估值策略回测沪深300成分股"
"对比动量因子和价值因子的夏普比率"
也可以在对话中设置自己的 Key 来获得更多额度:
"用我的 API Key fh_xxx 登录 FactorHub"
定价
方案 | API 调用/天 | 回测/天 | 价格 |
Free | 20 | 3 | ¥0 |
Pro | 10,000 | 20 | ¥99/月 |
Pro Max | 40,000 | 100 | ¥199/月 |
Ultra | 不限 | 不限 | ¥899/月 |
升级方案:factorhub.cn/pricing
架构
本 MCP 服务器是一个轻量客户端,通过 HTTPS 调用 FactorHub 公开 API,不直接访问数据库,不包含任何私有逻辑。
AI 助手 → MCP 协议 → factorhub-mcp → HTTPS → factorhub.cn/api/v1安全
API Key 存储在环境变量中,不会硬编码
所有通信使用 HTTPS 加密
本地不存储任何用户数据
服务端强制频率限制
Related MCP server: qlib-mcp
English
China A-share market data for AI agents. Query factor scores, market quotes, valuations, and run strategy backtests — all through the Model Context Protocol (MCP).
Features
Tool | Description |
| Set your API key (optional, defaults to free trial quota) |
| List factors with category/search filters |
| Factor metrics: annual return, Sharpe, max drawdown, IC, etc. |
| Factor NAV curve for trend analysis |
| Stock daily OHLCV data |
| Index daily data (SSE, CSI 300, CSI 500, etc.) |
| Valuation metrics: PE, PB, PS, dividend yield |
| Stock basic info |
| Stock screening by exchange/industry |
| Trading calendar |
| Strategy backtesting |
Quick Start
Option 1: Try Free (No Registration)
Use the hosted server directly — no API key needed, includes free trial quota (10 calls/day).
Claude Desktop — add to claude_desktop_config.json:
{
"mcpServers": {
"factorhub": {
"command": "npx",
"args": ["-y", "@smithery/cli@latest", "run", "factorhub"]
}
}
}Or connect directly via SSE:
https://factorhub.cn/mcp/sseOption 2: Install with Your API Key
For higher quotas, register at factorhub.cn and get your API key at the API Keys page.
pip install factorhub-mcpClaude Desktop — add to claude_desktop_config.json:
{
"mcpServers": {
"factorhub": {
"command": "factorhub-mcp",
"env": {
"FACTORHUB_API_KEY": "fh_your_api_key_here"
}
}
}
}Cursor — add to .cursor/mcp.json (same format as above).
Claude Code — run:
claude mcp add factorhub -- env FACTORHUB_API_KEY=fh_your_api_key_here factorhub-mcpOpenClaw — add to your skill config:
providers:
factorhub:
type: mcp
command: factorhub-mcp
env:
FACTORHUB_API_KEY: "fh_your_api_key_here"Option 3: Smithery
Install via Smithery for automatic setup with any MCP client.
Usage Examples
Once configured, ask your AI assistant:
"List all available factors on FactorHub"
"Show momentum factor performance"
"Get Kweichow Moutai stock data for the past year"
"Backtest a low-valuation strategy on CSI 300"
"Compare Sharpe ratios of momentum vs value factors"
Set your own API key mid-conversation for higher quotas:
"Set my FactorHub API key to fh_xxx"
Pricing
Plan | API Calls/Day | Backtest/Day | Price |
Free | 20 | 3 | ¥0 |
Pro | 10,000 | 20 | ¥99/mo |
Pro Max | 40,000 | 100 | ¥199/mo |
Ultra | Unlimited | Unlimited | ¥899/mo |
Upgrade at factorhub.cn/pricing.
Architecture
This MCP server is a thin client that calls the FactorHub public API. It does not access any database directly or contain proprietary logic.
AI Agent → MCP Protocol → factorhub-mcp → HTTPS → factorhub.cn/api/v1Security
API key is stored in environment variables, never hardcoded
All communication uses HTTPS
No user data is stored locally
Rate limiting is enforced server-side
License
MIT
Available Tools
11 toolsget_factor_scoresB
获取单个因子的详细评分指标:年化收益、夏普比率、最大回撤、波动率、Alpha、Beta、IC均值等。
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| start_date | No | ||
| end_date | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. The description lists key output metrics but does not disclose behavior such as date range handling, error conditions, or performance implications. It adds value by detailing output but lacks depth.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence that effectively communicates the tool's purpose. It is front-loaded with the key action and resource. While not overly lengthy, it could be slightly more structured (e.g., breaking out parameters).
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, so the description need not explain return values in detail, but the tool has 3 parameters and no annotations. The description provides a list of key metrics but omits context like default date range, authentication needs, or data completeness. It is adequate but not comprehensive.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, meaning the description does not explain any parameter. It implies 'code' identifies the factor but gives no details on 'start_date' or 'end_date' (e.g., format, default behavior). The description does not compensate for the schema gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves detailed scoring indicators for a single factor and lists specific metrics (annualized return, Sharpe ratio, etc.). It distinguishes the tool from siblings like list_factors (which lists all factors) and get_factor_nav (which likely returns net asset value). However, it does not explicitly contrast with siblings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives no guidance on when to use this tool versus alternatives, nor any prerequisites or restrictions. It lacks exclusions or context like 'only for single factor' which is implicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_index_dailyC
获取指数日线行情。常用:000001.SH(上证)、399001.SZ(深证)、000300.SH(沪深300)、000905.SH(中证500)。
| Name | Required | Description | Default |
|---|---|---|---|
| ts_code | No | ||
| start_date | No | ||
| end_date | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, and the description does not disclose behavioral traits such as read/write nature, rate limits, or error handling. It simply describes the action without additional context beyond the basic functionality.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is very brief (two sentences), which is concise but may be too short given the lack of parameter documentation. It is front-loaded but under-specified for a tool with three parameters.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite having an output schema, the description fails to cover parameter semantics or usage context. With three parameters and no parameter descriptions, the description is incomplete for effective tool invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description does not explain any parameter meanings. It only provides example values for ts_code, leaving start_date and end_date completely undocumented. The description adds negligible value over the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'get index daily market data' (获取指数日线行情) and provides common index codes. It is specific about the resource (indices) but does not explicitly differentiate from sibling tools like get_market_daily, though the context strongly implies it is for indices only.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description offers no guidance on when to use this tool vs alternatives, no prerequisites, and no exclusions. It merely lists common index codes without explaining when to use each.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_market_dailyB
获取个股日线行情数据(OHLCV + 涨跌幅)。ts_code 如 000001.SZ、600519.SH。
| Name | Required | Description | Default |
|---|---|---|---|
| ts_code | Yes | ||
| start_date | No | ||
| end_date | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so the description must carry the burden. It does not disclose whether the tool is read-only, any side effects, authentication needs, or rate limits. Only the data content (OHLCV + 涨跌幅) is mentioned.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise: two short sentences. The first states purpose and output, the second provides an example. No unnecessary text.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite having an output schema, the description lacks explanation of return format, date handling, and usage context. For a tool with 3 parameters and no annotations, this is insufficient.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description should compensate but only provides a ts_code example. The format for start_date and end_date is not explained, and no default values or valid formats are given.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: '获取个股日线行情数据' (get daily stock market data) with specific fields (OHLCV + 涨跌幅). It distinguishes from siblings like get_index_daily by focusing on individual stocks.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool over alternatives (e.g., get_index_daily for indices) or prerequisites. The example only shows ts_code format, lacking context like date range conventions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_stock_infoB
获取单只股票基本信息:名称、行业、上市日期、市场板块等。
| Name | Required | Description | Default |
|---|---|---|---|
| ts_code | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Description only lists output fields without disclosing behavioral traits such as error handling, data freshness, or prerequisites. Since no annotations exist, the description should provide this context but fails to do so.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Description is a single, efficient sentence that directly conveys purpose. No redundant information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite having an output schema, the description lacks crucial context: no usage guidelines, no error handling info, no authentication requirements. For a simple tool, more completeness is expected.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The required parameter 'ts_code' is not explained in the description. While its name suggests a stock ticker, the format (exchange suffix, numeric range) is not specified. With 0% schema description coverage, the description should clarify parameter semantics but fails to do so.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states it retrieves basic information for a single stock, listing specific fields (name, industry, listing date, market sector), which differentiates it from sibling tools like get_stock_list (list all stocks) and get_market_daily (daily trading data).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Description provides no usage guidelines, such as when to prefer this tool over siblings like get_stock_list or get_valuation. It does not specify prerequisites or context for use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_stock_listC
按条件筛选股票列表。可按交易所(SSE/SZSE)、行业筛选。
| Name | Required | Description | Default |
|---|---|---|---|
| exchange | No | ||
| industry | No | ||
| page | No | ||
| page_size | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided. Description does not mention behavioral traits such as read-only nature, rate limits, or pagination behavior despite having page parameters.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences efficiently convey purpose without waste.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite output schema existing, description lacks details on pagination, industry value formats, and the tool's overall return structure.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema descriptions are missing (0% coverage). Description adds meaning for exchange (SSE/SZSE) and industry filters, but ignores page and page_size parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states it filters stock list by exchange and industry, distinguishing from sibling tools that focus on single stock info or indices.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this vs other tools like get_stock_info. No mention of prerequisites or alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_trade_datesB
获取交易日历,查询指定时间段内的交易日列表。
| Name | Required | Description | Default |
|---|---|---|---|
| start_date | No | ||
| end_date | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description must fully convey behavior. It indicates a read-only query operation returning a list of trading days, which is sufficient for a simple retrieval tool. However, it does not disclose any constraints (e.g., date format, holiday treatment) or side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, concise and front-loaded. No redundant words. However, it omits details that could be added without much bloat, like date format.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given there is an output schema (context signal), the description does not need to explain return values. The tool has two simple parameters with no required fields. The description is minimally adequate for a straightforward query tool, but lacks details on parameter constraints.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so description must compensate. It mentions '指定时间段' (specified time period) linking to start_date and end_date, but provides no format, default behavior, or meaning beyond what the parameter names imply. Minimal added value.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states the tool retrieves a list of trading days within a date range ('获取交易日历,查询指定时间段内的交易日列表'). It specifies both the verb (query) and the resource (trade dates), and it is distinguishable from sibling tools that deal with factors, indices, or stock info.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives, no prerequisites or exclusions mentioned. The description only states the function without contextual usage direction.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_valuationC
获取股票估值指标:PE、PB、PS、股息率、总市值、流通市值、换手率等。
| Name | Required | Description | Default |
|---|---|---|---|
| ts_code | No | ||
| trade_date | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, and the description does not disclose behavioral traits such as read-only status, authentication needs, or response format. It adds no value beyond the basic purpose.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence, front-loading the verb. However, it lacks structure (e.g., separating purpose from usage) and could be expanded with minimal additional detail.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the absence of required parameters and presence of an output schema, the description should guide on output format or common parameter combinations. It does not, leaving the agent underinformed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%. The description does not explain the meaning of the two parameters (ts_code, trade_date), leaving the agent without guidance on how to specify them. The tool name offers a weak hint, but it is insufficient.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves stock valuation indicators (PE, PB, PS, etc.), providing a specific verb and resource. However, it does not distinguish from sibling tools like get_factor_nav or get_index_daily, which might have overlapping purposes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives, no prerequisites or when-not-to-use conditions. The description only states what it does, leaving the agent to infer context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_factorsA
获取因子列表。支持按分类和关键词搜索。返回因子代码、名称、分类、年化收益、夏普比率等。
| Name | Required | Description | Default |
|---|---|---|---|
| category | No | ||
| search | No | ||
| page | No | ||
| page_size | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It discloses return fields (code, name, category, annualized return, Sharpe ratio) but omits behavioral traits such as pagination behavior, rate limits, or read-only nature. The description does not contradict any missing annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences in Chinese, no redundant information. Every sentence adds value: what the tool does, how to filter, and what is returned. Ideal length for quick comprehension.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the existence of an output schema (not shown), the return field list in the description adds useful context. However, pagination behavior and parameter semantics are underspecified. The description is minimally adequate for a simple list tool but lacks guidance on handling result sets.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%. The description only mentions two parameters (category and search) but does not clarify their format, allowed values, or behavior. Pagination parameters (page, page_size) are ignored, leaving the agent without semantic guidance beyond parameter names.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves a factor list with support for category and keyword search, and explicitly lists return fields (code, name, category, annualized return, Sharpe ratio). This distinguishes it from sibling tools like `get_factor_nav` or `get_factor_scores` which target specific factor metrics.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description mentions search capabilities (category and keyword), providing some usage context, but lacks explicit guidance on when to use this tool versus alternatives, or when not to use it. No prerequisites or exclusions are noted.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
run_backtestB
执行量化策略回测。内置策略:limit_up_first_board(涨停首板)、low_valuation(低估值)、momentum(动量)、mean_reversion(均值回归)。返回年化收益、夏普比率、最大回撤等。
| Name | Required | Description | Default |
|---|---|---|---|
| strategy_type | No | ||
| strategy_params | No | ||
| universe | No | hs300 | |
| start | No | 20220101 | |
| end | No | 20241231 | |
| initial_capital | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must carry the full burden of behavioral disclosure. It lists built-in strategies and return metrics, but does not mention side effects (e.g., modification of state), authorization requirements, or rate limits. The description gives a moderate level of transparency but lacks critical behavioral details.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is short (two sentences) and front-loads the primary purpose. However, it lacks structure such as separating usage from parameters. It could be more concise about parameter details, but overall it is reasonably compact.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has 6 parameters with no schema descriptions, no annotations, and an output schema is present but not detailed, the description is incomplete. It does not explain parameter formats, dependencies, or how to properly configure a backtest. The high-level overview is insufficient for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description should explain all parameters. It only mentions strategy_type by listing built-in strategies, but does not describe strategy_params, universe, start, end, or initial_capital. This is insufficient for parameter understanding.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: '执行量化策略回测' (execute quantitative strategy backtest). It lists built-in strategies and key output metrics, making the verb and resource unambiguous. This distinguishes it from sibling tools which are primarily data retrieval functions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. While siblings are data retrieval tools, the description does not explicitly state that this tool is for backtesting simulation, nor does it mention prerequisites or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
set_api_keyA
设置你的 FactorHub API Key。注册获取:https://factorhub.cn/api-keys。设置后本次会话将使用你的专属额度。
| Name | Required | Description | Default |
|---|---|---|---|
| api_key | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, and the description does not disclose important behavioral details such as whether the key is overwritten if already set, security implications, or persistence across sessions. It only mentions session-level effect.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise: a single clear sentence and a URL. It is front-loaded with the purpose and minimally worded, with no superfluous content.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (single parameter, no nested objects, output schema exists), the description is adequate but lacks details on error handling, key validation, and response behavior. It covers the core function minimally.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The only parameter 'api_key' is a string with no description in the schema (0% coverage). The description implies it's the API key but does not specify format, length, or validation rules, adding minimal value beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: setting the FactorHub API Key. It uses a specific verb ('设置') and resource ('FactorHub API Key'), and distinguishes it from sibling tools which are all data retrieval or analysis tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides context for when to use the tool (first-time setup, '设置后本次会话将使用你的专属额度') and includes a registration URL. However, it does not explicitly state when not to use it or mention alternatives, though no alternative exists among siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
11 tool updates
v0.1.1- First observed
get_factor_nav - First observed
get_factor_scores - First observed
get_index_daily - First observed
get_market_daily - First observed
get_stock_info - First observed
get_stock_list - First observed
get_trade_dates - First observed
get_valuation - First observed
list_factors - First observed
run_backtest - First observed
set_api_key
TDQS
Each tool targets a distinct aspect of financial data analysis: factor performance vs scores, index vs stock data, stock info vs list, valuation, backtesting, and configuration. No two tools serve the same purpose.
All tool names follow a consistent verb_noun pattern in snake_case (e.g., get_factor_nav, list_factors, run_backtest). The conventions are uniform across all 11 tools.
With 11 tools, the server covers core operations for factor analysis, stock data, index data, backtesting, and configuration. The count is well-scoped without being overwhelming or insufficient.
The tool set covers essential CRUD-like operations for factor data, stocks, indices, and backtesting. Minor gaps exist, such as lack of bulk data retrieval or more customizable backtest parameters, but the core workflows are well-supported.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
China A-share market data for research, backtesting and AI agents via MCP.
MCP server giving AI agents one-connection access to China A-share market intelligence: financials,
Read-only China A-share data for AI agents: market, limit-up, capital flow and disclosures.
Research-only MCP server: turn your AI into a quant research desk — backtests, no trades.
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server that provides access to Chinese stock market data using akshare-one49225MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server for the Microsoft Qlib quantitative research platform that enables AI agents to perform financial data queries, factor analysis, and strategy backtesting. It supports A-share and US stock markets through Qlib expressions and built-in analytical tools.3MIT
- FlicenseNot gradedqualityDmaintenanceMCP 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.-
- FlicenseNot gradedqualityDmaintenanceMCP server for A-share stock technical analysis and AI prediction, enabling LLM-based interaction to analyze stocks.341-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/michaelfeng/factorhub-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server