ashareapi/ashareapi-dsh-plugin ↗★ 0
ashareapi-dsh-plugin
提供 24 个 A股行情、财务及选股数据工具 适合需要在 DSH 对话中直接查询 A 股实时行情、K 线、财务及资金流向的用户。
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:ashareapi/ashareapi-dsh-plugin说明文档
阅读完整 README ↗配置 API Key
上面 5 个免费工具不用配任何东西就能用。
要用其余 19 个工具(盘口 / 财务 / 资金 / 龙虎榜 / 板块 / 选股 / 宏观…),需要一个 Key:获取 Key(体验版 ¥9.9 起,24 个工具全开)。
方式一:环境变量(最省事)
在 ~/.dsh/.env 里加一行($DSH_HOME 改过就放那儿):
ASHAREAPI_KEY=ct-你的KEY
方式二:写进 profile
编辑对应 profile 的 cordis.patch.yml —— Web UI / 命令行是 ~/.dsh/profiles/web/cordis.patch.yml,桌面端是 ~/.dsh/profiles/desktop/cordis.patch.yml(桌面端的目录要先打开一次桌面端才会生成)。加一条按 id 覆盖的补丁:
- id: mcp-ashareapi
name: ashareapi-dsh-plugin
config:
apiKey: ct-你的KEY
⚠️ 这条补丁会整块替换该条目的
config,所以只写你要改的字段即可 —— 其余字段(端点、命名空间)用插件内置默认值。
可配置项
| 字段 | 默认值 | 说明 |
|---|---|---|
apiKey | 读环境变量 ASHAREAPI_KEY | 不填则走匿名,只有 5 个免费工具可用 |
url | https://api.ashareapi.com/mcp | 走自建代理时改这里 |
serverName | ashareapi | 工具名前缀,即 mcp__ashareapi__*;[A-Za-z0-9_-]{1,32} |
headers | {} | 额外请求头,与上面的 Key 合并 |
其余字段(toolCallTimeoutMs、failOnStartupError 等)原样透传给 DSH 自带的 MCP 客户端。