Skip to main content

agushuju-mcp — 爱股数据 MCP Server

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

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

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

工具清单(首批 12 + 1)

工具 数据
stock_basic 股票基础信息(名称/行业/上市日期)
stock_daily A 股日线行情
stock_daily_basic 每日指标(换手率/量比/市盈率/市值)
trade_calendar 交易日历(SSE/SZSE)
stock_moneyflow 个股资金流向(主力/大中小单)
stock_top_list 龙虎榜每日明细
index_daily 指数日线
fund_daily ETF/基金日线
futures_daily 期货日线
stock_fina_indicator 财务指标(EPS/ROE/营收增速)
stock_limit_list 每日涨跌停列表
stock_stk_limit 每日涨跌停价格
health_check 服务状态探活

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

安装与配置

1. 获取 token

API Key 管理页 创建你的 token。

2. 安装

# agushuju SDK 尚未发布 PyPI,先从本仓库安装(发版后此步可省略)
pip install -e sdk/python
pip install -e 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 探活;查看 服务状态页

相关链接

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agushuju_mcp-0.1.0.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agushuju_mcp-0.1.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file agushuju_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: agushuju_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.9

File hashes

Hashes for agushuju_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 112cea801c6aa71a7804a93a61616fa51116b5d1e2e05038661b3ec140999c6b
MD5 1d72d4ab9b6008fbcde1fe1124d5fa63
BLAKE2b-256 69ccf4d3cab194aaf6ee3a7fc5fc7a2d3fc962eda8a70d873520e513184fdea0

See more details on using hashes here.

File details

Details for the file agushuju_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: agushuju_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.9

File hashes

Hashes for agushuju_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8794d363eff4227faf5c03910cfa6ad0655c2b8141851ec50744729c957cc975
MD5 4f76b0ae02dee771da562144612f4b45
BLAKE2b-256 fb4d35a3a7ad3ef07d4b6c4fbd211efc81fe89b7e9f884d305ce3b9a5f3a446a

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

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