Skip to main content

agushuju-mcp — 爱股数据 MCP Server

在 Claude Desktop、Cursor 等 MCP 客户端里用自然语言查 A 股/指数/期货/涨跌停数据:

"平安银行最近的日线行情" · "今天涨停的股票有哪些" · "螺纹钢主力合约这个月的走势"

底层封装爱股数据 REST API(复用 agushuju Python SDK), 使用你自己的平台 token——鉴权、限流、计费全部走平台既有体系,与本 Server 无关。

工具清单(8 + 1)

工具 数据
stock_basic 股票基础信息(名称/行业/上市日期)
stock_daily A 股日线行情
stock_daily_basic 每日指标(换手率/量比/市盈率/市值)
trade_calendar 交易日历(SSE/SZSE)
stock_moneyflow 个股资金流向(主力/大中小单)
index_daily 指数日线
futures_daily 期货日线
stock_limit_pool_daily 涨跌停四池(涨停/炸板/跌停,含连板筛选)
health_check 服务状态探活

v0.1.3(2026-10-31):移除指向已退役端点的 5 个工具(stock_top_list / fund_daily / stock_fina_indicator / stock_stk_limit / stock_limit_list, 2026-10-05 平台端点退役后旧版调用一律 404),涨跌停查询改挂 stock_limit_pool_daily。请升级到 0.1.3+。

参数约定:日期一律 YYYY-MM-DD;代码带交易所后缀(股票 000001.SZ、指数 000001.SH、期货 RB2601.SHF);返回 markdown 表格,默认 10 行、单次最多 50 行,offset 翻页。

安装与配置

1. 获取 token

在 API Key 管理页 创建你的 token。

2. 安装

pip install agushuju-mcp
# 依赖 agushuju SDK 自动从 PyPI 安装

# 开发模式(本仓库源码)
pip install -e sdk/python
pip install -e sdk/mcp

发版:python sdk/publish.py(与 SDK 同流程,自动保证 SDK 先于 MCP 上传)。

3. Claude Desktop 配置

claude_desktop_config.json(Claude Desktop → 设置 → Developer → Edit Config):

{
  "mcpServers": {
    "agushuju": {
      "command": "agushuju-mcp",
      "env": {
        "AGUSHUJU_TOKEN": "你的token"
      }
    }
  }
}

Windows 下 command 可能需要写 python 可执行文件完整路径,用 python -c "import sys; print(sys.executable)" 查出后配置为:

{
  "mcpServers": {
    "agushuju": {
      "command": "C:\\Users\\你\\...\\python.exe",
      "args": ["-m", "agushuju_mcp.server"],
      "env": { "AGUSHUJU_TOKEN": "你的token" }
    }
  }
}

4. Cursor 配置

.cursor/mcp.json:

{
  "mcpServers": {
    "agushuju": {
      "command": "agushuju-mcp",
      "env": { "AGUSHUJU_TOKEN": "你的token" }
    }
  }
}

配置后重启客户端,工具列表出现「爱股数据」即接入成功;先问一句 "查一下服务状态" 跑 health_check 验证链路。

环境变量

变量 说明
AGUSHUJU_TOKEN 平台 API Key(必填)
AGUSHUJU_API_BASE 服务地址,默认 https://www.agushuju.com(本地调试可指 http://127.0.0.1:8181)

错误排查

现象 处理
未设置 AGUSHUJU_TOKEN 检查 mcpServers 配置的 env 字段
code=401 token 无效/过期,到 API Key 页重建
code=429 触发限流(免费档每接口 200 次/日),见 定价页
服务不可达 用 health_check 探活;查看 服务状态页

相关链接

Metadata

Release files for agushuju-mcp 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agushuju-mcp 0.1.3
File Size Uploaded Provenance Actions
agushuju_mcp-0.1.3.tar.gz 8.2 kB Without provenance Details for agushuju_mcp-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for agushuju-mcp 0.1.3
File Interpreter ABI Platform Actions
agushuju_mcp-0.1.3-py3-none-any.whl Python 3 none any Details for agushuju_mcp-0.1.3-py3-none-any.whl

Total release size: 15.4 kB

Release files / agushuju_mcp-0.1.3.tar.gz

Download URL agushuju_mcp-0.1.3.tar.gz
Size 8.2 kB
Tags Source
SHA-256 checksum
How to use checksums
01a9f3f15e3c96cb5fe4d4e8cb65c7fa1d85b4bed1b1eb79c067d62d1227f076
BLAKE2b-256 checksum
How to use checksums
e7f9d13ef8116bace1150614483fd36273d921b1cab39cf4babef84792b8275b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Release files / agushuju_mcp-0.1.3-py3-none-any.whl

Download URL agushuju_mcp-0.1.3-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d20eb35b043afce19a11b8c764f579fb1b17c278b89d2f4e6b054f071e8288ec
BLAKE2b-256 checksum
How to use checksums
33d6475b1cd6286f6528e7bab07257bccbaa101cd173f86e12dfb0607e9c2331
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Security for agushuju-mcp 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page