Self-hosted MCP server providing guarded trading and market data via Capital.com Open API with two-phase trade execution and demo-first mode.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent โ or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag โ we're steadily working through the catalog.
๐ก Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by Capitalcom 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.
โ ๏ธ 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.
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:
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.
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.
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.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) /
%APPDATA%\Claude\claude_desktop_config.json (Windows):
~/.cursor/mcp.json (global) or .cursor/mcp.json (project):
.vscode/mcp.json โ note the root key is servers and type: "stdio":
~/.codeium/windsurf/mcp_config.json:
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.
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.
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.
| Tool | What it does |
|---|---|
cap_session_status | Current login/session state. |
cap_session_login | Authenticate (optionally force=true). |
cap_session_ping | Keep-alive / liveness check. |
cap_session_logout | End the session. |
cap_session_switch_account | Switch the active trading account. |
cap_account_list | List accounts and the active account id. |
cap_account_preferences_get | Read account preferences (e.g. hedging mode). |
cap_account_preferences_set | Update preferences (confirm required). |
cap_account_history_activity | Account activity history. |
cap_account_history_transactions | Transaction history. |
cap_account_demo_topup | Top up a demo balance (confirm required). |
| Tool | What it does |
|---|---|
cap_market_search | Search instruments by term. |
cap_market_get | Full market details + snapshot for an EPIC. |
cap_market_navigation_root | Top-level market navigation nodes. |
cap_market_navigation_node | Drill into a navigation node. |
cap_market_prices | Historical OHLC candles. |
cap_market_sentiment | Client long/short positioning. |
| Tool | What it does |
|---|---|
cap_trade_positions_list | Open positions. |
cap_trade_positions_get | One position by deal id. |
cap_trade_orders_list | Working (pending) orders. |
cap_trade_confirm_get | Fetch a deal confirmation by reference. |
cap_trade_confirm_wait | Poll until a deal confirms (or times out). |
cap_trade_preview_position | Phase 1: validate a market position (no execution). |
cap_trade_preview_working_order | Phase 1: validate a working order. |
cap_trade_execute_position | Phase 2: execute a previewed position (confirm). |
cap_trade_execute_working_order | Phase 2: place a previewed working order (confirm). |
cap_trade_positions_close | Close a position (confirm). |
cap_trade_orders_cancel | Cancel a working order (confirm). |
cap_trade_positions_amend | Amend stop/limit on a position (confirm). |
cap_trade_orders_amend | Amend a working order (confirm). |
| Tool | What it does |
|---|---|
cap_watchlists_list | List watchlists. |
cap_watchlists_get | Get one watchlist's markets. |
cap_watchlists_create | Create a watchlist (confirm). |
cap_watchlists_add_market | Add an EPIC (confirm). |
cap_watchlists_remove_market | Remove an EPIC (confirm). |
cap_watchlists_delete | Delete a watchlist (confirm). |
CAP_WS_ENABLED=true)| Tool | What it does |
|---|---|
cap_stream_prices | Live bid/ask updates for EPICs. |
cap_stream_candles | Live OHLC candle updates. |
cap_stream_alerts | Threshold price alerts. |
cap_stream_portfolio | Live position/P&L updates. |
| Tool | What it does |
|---|---|
search | Read-only instrument search (ChatGPT connector contract). |
fetch | Read-only instrument fetch by id (ChatGPT connector contract). |
| URI | What it returns |
|---|---|
cap://status | Session/connection status snapshot. |
cap://risk-policy | Active risk policy (trading flag, caps). |
cap://allowed-epics | The trading EPIC allowlist. |
cap://market-cache/{epic} | Cached market snapshot for an EPIC. |
Factual signals from GitHub, npm, and our automated checks โ not a rating.
No reviews yet โ be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/simontarara62-capitalcom-mcp-server)<a href="https://allmcps.com/mcp/simontarara62-capitalcom-mcp-server"><img src="https://allmcps.com/api/badge/simontarara62-capitalcom-mcp-server?style=directory" alt="Capitalcom MCP Server on AllMCPs" /></a>