ashare-mcp
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
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_three_statementsA | 拉取 A 股某只股票某年的年报三大财务报表(资产负债表 / 利润表 / 现金流量表)。 参数: stock_code: A 股代码,支持多种格式 —— '000001' / 'SZ000001' / 'sz.000001' / '000001.SZ'。 year: 年份(整数),如 2024。仅支持年报(报告期 12-31)。 返回: { "stock_code": "SZ000001", "company_name": "平安银行", "report_date": "2024-12-31", "currency": "CNY", "unit": "yuan (元)", "balance_sheet": {...}, # 字段如 TOTAL_ASSETS / LOAN_ADVANCE / ACCEPT_DEPOSIT "income_statement": {...}, # 字段如 OPERATE_INCOME / NETPROFIT / PARENT_NETPROFIT "cash_flow_statement": {...}, # 字段如 NETCASH_OPERATE / NETCASH_INVEST / NETCASH_FINANCE } 数据源: 东方财富(via akshare)。字段名为东方财富原始英文(SCREAMING_SNAKE_CASE)。 单位: 人民币元。 缓存: 进程内存缓存,同一只股票多次查询(不同年份)只走一次网络。 |
| cross_check_balanceA | 跑财务勾稽校验,检测三大表数据是否互相自洽。返回每条校验的 passed/failed/skipped 状态与误差。 参数: stock_code: A 股代码,支持多种格式(同 get_three_statements)。 year: 年份,如 2024。仅支持年报。 返回: { "stock_code": "SZ000001", "company_name": "平安银行", "report_date": "2024-12-31", "checks": [ { "name": "balance_sheet_equation", "label": "资产负债平衡", "formula": "TOTAL_ASSETS = TOTAL_LIABILITIES + TOTAL_EQUITY", "lhs_value": 5769270000000.0, "rhs_value": 5769270000000.0, "diff": 0.0, "tolerance": 10000.0, "status": "passed" }, ... ], "summary": {"total": 3, "passed": 3, "failed": 0, "skipped": 0} } 当前 v1 包含 3 条行业通用勾稽:
容忍度 1 万元(财报舍入)。字段缺失时该条 status='skipped',不影响其它校验。 |
| compare_peersA | 同业 N 家公司同年年报横向对比,自动算排名 / 最大最小 / 均值 / 标准差,加派生指标 ROE。 参数: stock_codes: 公司代码列表,如 ['000001', '600036', '601398']。建议 2-10 家。 支持各种格式:'000001' / 'SZ000001' / 'sz.000001' / '000001.SZ'。 year: 年份。 metrics: 可选,自定义对比字段。默认包括: TOTAL_ASSETS / TOTAL_OPERATE_INCOME / PARENT_NETPROFIT / NETCASH_OPERATE / TOTAL_EQUITY。 派生指标 ROE = PARENT_NETPROFIT / TOTAL_EQUITY 总是会算上。 银行业 TOTAL_OPERATE_INCOME 缺失时自动 fallback 到 OPERATE_INCOME(在 fallbacks 字段里标注)。 返回: { "year": 2024, "report_date": "2024-12-31", "metrics": ["TOTAL_ASSETS", ..., "ROE"], "companies": [ { "stock_code": "SZ000001", "company_name": "平安银行", "values": {metric: number}, "ranks": {metric: rank}, # 1 = 最大 "fallbacks": {original_key: actual_key} | null } ], "summary": { metric: {"max", "min", "avg", "std", "count"} }, "errors": [ {"stock_code": "...", "error": "..."} # 单家失败不挂整体 ] } 并发实现: ThreadPoolExecutor(max_workers=8),N 家公司并行拉。 缓存联动: 已经查过的公司走 lru cache,< 1ms 复用。 |
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 3 tools
Each tool has a clear, distinct purpose: retrieving financial statements, cross-checking consistency, and comparing peers. There is no overlap or ambiguity.
All tool names follow a consistent snake_case verb_noun pattern (compare_peers, cross_check_balance, get_three_statements), making them predictable and clear.
Three tools is minimal but sufficient for the focused domain of A-share annual financial analysis. The count feels well-scoped without being overly thin.
The tools cover core workflows: data retrieval, internal consistency checks, and peer comparison. Minor gaps like quarterly data or individual ratio lookups exist, but the surface is largely complete for annual report analysis.