stock-mcp-server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_stock_quoteA | 获取单只 A 股股票的实时行情。 默认自动选源(新浪优先,失败后回退腾讯);也可用 source 强制指定数据源。 Args: symbol: 股票代码,如 "600519"(贵州茅台)、"000001"(平安银行)。 source: 数据源,"auto"(默认,自动回退)| "sina" | "tencent"。 |
| get_stock_quotesA | 批量获取多只 A 股股票的实时行情(最多 10 只)。 Args: symbols: 逗号分隔的股票代码,如 "600519,000001,000858"。中英文逗号均可。 |
| get_stock_historyA | 获取单只 A 股的历史 K 线数据(前复权)。 Args: symbol: 股票代码,如 "600519"。 period: 周期,"daily"(日K,默认)| "weekly"(周K)| "monthly"(月K)。 count: 返回的 K 线根数,默认 30,最大 320。 |
| get_stock_fundamentalsB | 获取单只 A 股的估值与基本面指标。 返回:市盈率(TTM)、市净率、总市值、流通市值、换手率、振幅、涨跌停价等。 Args: symbol: 股票代码,如 "600519"。 |
| get_market_indexA | 获取 A 股大盘指数实时行情(上证指数、深证成指、创业板指、沪深300 等)。 Args: codes: 可选,逗号分隔的指数代码,如 "sh000001,sz399001"。 留空则返回上证指数 / 深证成指 / 创业板指 / 沪深300。 |
| search_stockA | 按关键字搜索 A 股股票(支持名称、代码、拼音首字母模糊匹配)。 Args: keyword: 搜索词,如 "茅台"、"600519"、"PAYH"(平安银行拼音首字母)。 |
| get_usage_statsA | 获取本 MCP 服务器的工具调用统计(本地记录)。 返回最近 N 天的调用总数、错误数、各工具调用次数、按天分布。 统计只覆盖有写入日志文件的实例;日志路径可用环境变量 STOCK_MCP_USAGE_LOG 指定。 Args: days: 统计最近多少天,默认 7,最大 365。 |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 7 tools
Each stock-related tool targets a distinct purpose (index, fundamentals, history, single quote, batch quote, search), with singular/plural clearly distinguishing get_stock_quote from get_stock_quotes. The only unrelated tool, get_usage_stats, is clearly named and separate from the stock domain.
All tools use a consistent snake_case verb_noun pattern (get_* and search_*). No mixed conventions or ambiguous verb styles are present.
Seven tools is well within the ideal range for a focused A-share data server. Each tool earns its place, covering real-time quotes, history, fundamentals, index, and search without redundancy.
The surface covers core market data: real-time quotes, historical K-lines, fundamentals, index quotes, and stock search. Minor gaps exist for advanced data like minute-level bars, financial statements, or news, but the core domain is well served.