
Capital.com MCP Server
io.github.SimonTarara62由 GitHub 账号 SimonTarara62 发布v0.3.4更新于 Oct 27, 2026
Unofficial community MCP for the Capital.com Open API. Guarded two-phase trades; demo-first.
发布方自己的服务:capital.new mandate draft tools
概览
非官方的本地 MCP 服务器,连接 Capital.com 交易 API,让助手获取行情、管理自选列表并执行带防护的两阶段交易。
- 可以做什么
- 查看会话与账户状态、列出和切换账户、读取偏好与活动及交易记录、为模拟账户充值
- 搜索市场、读取市场详情与快照、浏览导航节点、获取历史 K 线及客户多空持仓
- 列出持仓与挂单,预览持仓或挂单,再经确认后执行、修改、平仓或撤单
- 创建、读取、修改和删除自选列表及其中的市场
- 启用后通过 WebSocket 推送实时价格、K 线、价格提醒和组合盈亏
- 提供行情扫描、交易提案、持仓复盘和实时监控等引导式提示,以及只读的 search 与 fetch 适配器
- 适用场景
- 适合让助手研究 Capital.com 的交易品种、复盘持仓与挂单,或在明确防护下准备并执行交易,建议先在模拟账户试用。不适合需要官方厂商支持集成的场景。
- 运行要求
- 以 Python 包形式本地运行(uvx 或 pipx,stdio,也可用 HTTP 远程托管)。需要 Capital.com 的 API key、API 密码和账户标识,可内联提供、通过 .env 文件路径提供,或用命令方式读取密钥。交易需开启 CAP_ALLOW_TRADING 并配置 EPIC 白名单;流式数据需开启 CAP_WS_ENABLED。需能访问 Capital.com API。
安装
在 SourceWeft 中
- 打开 控制台中的 Capital.com MCP Server,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Capital.com MCP Server
Self-hosted Model Context Protocol (MCP) server for the Capital.com Open
API, written in Python on FastMCP. It
exposes 42 safe, guarded trading and market-data tools — two-phase
execution, allowlists, demo-first — to any MCP client, over stdio or HTTP. Built
on the tested capitalcom-cli
broker engine (SDK).
Works with Claude Desktop · Claude Code · Cursor · VS Code (Copilot) · Windsurf · ChatGPT — any MCP client.
[PyPI version] [Python versions] [CI] [License: Apache-2.0] [MCP Registry] [Glama quality score] [PyPI downloads]
⚠️ Unofficial & educational. Not affiliated with Capital.com. Trading is risky and this is not financial advice. Trading is disabled by default; all trades are two-phase (preview → confirm → execute) with allowlists and size/rate limits. Start on a demo account. Apache-2.0 licensed.
Install
No clone required — uvx runs it in an isolated, throwaway environment and
always fetches the latest tested release:
Or install a persistent command with pipx:
Pinning for production / real-money use
uvx capitalcom-mcp always runs the latest published release. That is fine
for trying it out, but for production or real-money use, pin the exact
version so an unexpected update can't change tool behavior under you:
The CLI form is uvx capitalcom-mcp==0.3.4 run …. Pin to a version you have
reviewed, and bump deliberately after reading the CHANGELOG.
1. Add your credentials (once)
Get an API key in the Capital.com app: Settings → API integrations (make a
demo key first). Then run the wizard — it writes a 0600 file and prints
the exact client snippet:
This writes ~/.config/capital-mcp/.env. Verify any time (no secrets printed):
Inspect the full effective configuration (redacted, offline) or confirm your credentials actually authenticate:
Prefer a secret manager? Set CAP_API_KEY_CMD / CAP_IDENTIFIER_CMD /
CAP_API_PASSWORD_CMD to a command that prints the secret (e.g.
op read op://vault/..., pass ...). The secret is fetched at launch and never
written to disk or to your client config.
2. Add the server to your client
Every client uses the same command/args/env shape. Pasting
"CAP_ENV_FILE": "<path from init>" keeps secrets out of the client file; or
put CAP_API_KEY/CAP_IDENTIFIER/CAP_API_PASSWORD directly in env.
Claude Desktop
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) /
%APPDATA%\Claude\claude_desktop_config.json (Windows):
Claude Code
Cursor
~/.cursor/mcp.json (global) or .cursor/mcp.json (project):
VS Code (Copilot)
.vscode/mcp.json — note the root key is servers and type: "stdio":
Windsurf
~/.codeium/windsurf/mcp_config.json:
ChatGPT
ChatGPT requires a remote server (stdio is not supported) — see
Remote / VPS hosting. Once your server is reachable over
HTTPS, enable Developer Mode (Settings → Connectors → Advanced) and add the
server URL ending in /mcp. ChatGPT Deep Research connectors call two
read-only tools, search and fetch, which this server implements; full custom
tools require Developer Mode.
Remote / VPS hosting
Run with streamable-HTTP instead of stdio:
Or via env (handy in systemd): CAP_MCP_TRANSPORT=http, CAP_MCP_HOST,
CAP_MCP_PORT. Put it behind a TLS-terminating reverse proxy for any public use.
What's inside — tools, resources & prompts
This server exposes 42 tools, 4 resources, and 7 guided prompts. All
tool names are prefixed cap_ except the two ChatGPT Deep Research adapters
(search, fetch). Mutating tools require confirm=true; trades are two-phase.
The full surface is a stable contract — see API stability.
Session & account
Market data
Trading (read → preview → execute → manage)
Watchlists
Streaming (WebSocket; requires CAP_WS_ENABLED=true)
ChatGPT Deep Research adapters
Resources
Guided prompts
Prompts are reusable workflows your client can launch by name. They emit step-by-step guidance that orchestrates the tools above — they never trade on their own.
Safety model
- Trading off unless
CAP_ALLOW_TRADING=trueand the EPIC is inCAP_ALLOWED_EPICS(orALL). - Two-phase execution;
confirm=truerequired for mutations. - Size, open-position, and daily-order caps;
CAP_DRY_RUN=trueblocks all executions. ATIMEOUTconfirmation is ambiguous — reconcile, don't blindly retry.
Development
End-to-end tests drive every tool through the MCP against the demo API
(read, watchlists, account switch, preview/execute/amend/close/cancel, streaming).
They place real demo orders and clean up after themselves, so use a demo .env
with trading + streaming enabled:
Contributing
Contributions are welcome — this is a community project. Start with CONTRIBUTING.md, browse good first issues, and see the roadmap for where it's heading. The architecture and a worked "add a tool" example are in docs/extending.md.
License
来源:README.md,提交 d16c071
工具
0版本历史
1- v0.3.4最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
其他 Capital 集成
capital.new mandate draft tools
new.capital官方发布者
让助手构建并校验 Capital Authority Mandate 草案文件(重算 SHA-256 摘要),而铸造仍由人工仪式完成。
CRE Capital: capital stack calculator
capital.cre官方发布者
远程商业地产资本结构计算器,让助手测算优先级贷款、夹层、优先股与普通股各层,并给出成本、覆盖率与 IRR。
Issuerwire — capital markets news for AI agents
由 GitHub 账号 allooloo 发布
一个远程 MCP 服务器,为助手提供已上市发行人的带签名资本市场新闻条目,包括申报、公告和第三方报道。
Canli Capital
由 GitHub 账号 arhancanli 发布
提供 442 个金融工具的服务器,涵盖量化分析、SEC 文件、宏观数据、回测与模拟交易,通过三个检索与执行工具调用。

Evercraft Deck Capital Fit
由 GitHub 账号 jgaethle10 发布
一个远程 MCP 端点,用于资金匹配度研究与创始人准备度评估,并提供经人工确认的结账步骤。