Repository navigation
Troubleshooting FAQ
The server can't find CAP_API_KEY / CAP_IDENTIFIER / CAP_API_PASSWORD
(directly, via a .env file, or via the CAP_*_CMD secret-exec variables).
Fix:
uvx capitalcom-mcp init # interactive wizard, writes a 0600 .env
uvx capitalcom-mcp doctor # confirm it now loads (no secrets printed)doctor reports the active environment, a redacted key/identifier, the
trading flag, and the EPIC allowlist without ever printing a secret. Add
--login to also authenticate against the Capital.com API:
uvx capitalcom-mcp doctor --loginIf credentials load but you want the full effective configuration (caps, dry-run state, where credentials are sourced from), run:
uvx capitalcom-mcp configSee Installation and Setup for the full walkthrough.
The bundle runs through uv, and Claude Desktop does not install it. Install
uv from https://docs.astral.sh/uv/getting-started/installation/, then quit
and reopen Claude Desktop. See Bundle Settings.
These are the risk limits doing their job. Daily order limit reached (20/20 today, resets at 00:00 UTC): wait for 00:00 UTC or raise
CAP_MAX_ORDERS_PER_DAY. Size 100.0 exceeds the limit of 1.0 set by CAP_MAX_POSITION_SIZE: send a smaller size or raise CAP_MAX_POSITION_SIZE /
CAP_MAX_WORKING_ORDER_SIZE. Open position limit reached (3/3): close a
position or raise CAP_MAX_OPEN_POSITIONS. In the Claude Desktop bundle, use
the matching form fields instead. On a live account, raising a limit raises
your real-money risk. Defaults and exact messages: Bundle Settings,
Safety Model.
WebSocket streaming is disabled. Set CAP_WS_ENABLED=true to enable. Turn
streaming on: CAP_WS_ENABLED=true on the command line, or the Live
streaming field in the bundle form (on by default there). See
Bundle Settings.
A desktop client started from the dock or Start menu may not have
~/.local/bin (where uvx usually lives) on its PATH. Put the absolute path
of uvx in the entry's command: run which uvx in a terminal (for example
/Users/you/.local/bin/uvx) and use that instead of "uvx".
The first launch of the bundle or of a uvx entry downloads Python packages,
which can take longer than the client waits. Start it once in a terminal so the
download is cached: uvx capitalcom-mcp==0.9.0 doctor (use the version your
entry pins).
Trading is refused unless both:
-
CAP_ALLOW_TRADING=trueis set, and - the instrument's EPIC is in
CAP_ALLOWED_EPICS(comma-separated), or that variable isALL.
An EPIC missing from the allowlist fails the preview check epic_allowed, and
is refused at execute with EPIC_NOT_ALLOWED, even with trading enabled;
missing/false CAP_ALLOW_TRADING gives TRADING_DISABLED. Trading on/off is
checked on every trading call (preview, execute, close, cancel, amend). The
allowlist is checked when a preview is made and again when it is executed;
close, cancel and amend are not checked against the allowlist, so you can
always manage what is already open. Read-only tools (market data, positions,
history) keep working regardless. Set both env vars (e.g.
CAP_ALLOW_TRADING=true, CAP_ALLOWED_EPICS=BTCUSD,GOLD) and re-check with
uvx capitalcom-mcp config. In the Claude Desktop extension, turn on Allow
trading and fill in Allowed EPICs in the extension's settings instead; the
message then names that form field. Full details in Safety Model and
Bundle Settings.
The four cap_stream_* tools (cap_stream_prices, cap_stream_candles,
cap_stream_alerts, cap_stream_portfolio) need streaming on. On the command
line that is CAP_WS_ENABLED=true, which defaults to false: set it, restart
the server (via your client), and confirm with uvx capitalcom-mcp config that
CAP_WS_ENABLED = True. In the Claude Desktop extension streaming is on by
default (the Live streaming form field); if it was turned off, turn it on
and restart the extension. See Configuration Reference, Bundle Settings
and the streaming recipe in Recipes.
Another process of the same user is holding the SDK state file (it stores
previews and session state). On a command-line install the file is shared by
every server instance and by the SDK's own CLI, so a second client, a script or
a running capctl command can hold it. The Claude Desktop extension has its
own file (~/.config/capital-mcp/bundle-state.json) that nothing else uses, so
there only a second copy of the extension can hold it. The SDK waits about 10 seconds for the lock before failing and takes
over a lock older than about 5 seconds, so wait a moment and retry. If no
other process is running and it persists, remove the lock file named in the
message.
A deal confirmation can come back TIMEOUT when the server genuinely doesn't
know whether the order reached the broker. Do not blindly retry the same
execute call — the original order may already be live, and a retry could
double it up.
Instead, reconcile:
-
cap_trade_positions_list/cap_trade_orders_list— see if the position or order actually exists, or -
cap_trade_confirm_get/cap_trade_confirm_waitwith the originaldeal_reference— poll for the real outcome.
Only decide on a next action (retry, adjust, or leave it) once you know what actually happened. See "Ambiguous confirmations" in Safety Model.
uvx capitalcom-mcp (no version) reuses the release already in its cache, so
it neither tracks the latest release nor stays fixed: what you get depends on
what was cached. Use uvx capitalcom-mcp@latest … to refresh. For production
or real-money use, pin the exact version in your client config, e.g.
"args": ["capitalcom-mcp==0.9.0"] (CLI: uvx capitalcom-mcp==0.9.0 run …).
Pin to a version you've reviewed and bump deliberately after reading the
CHANGELOG.
Separately from pinning, the tool surface itself (names, parameters, semantics) is a stable contract within a major version, enforced by an automated snapshot test — see API Stability. Pinning protects against any change, including additive ones; the stability contract protects you even if you don't pin, as long as you stay on the same major version. Before 1.0.0 a minor release may still change a default (see API Stability), so pin if you depend on today's behavior.
- Safety Model — the guardrails behind the errors above
- Error Reference — every error type the server can raise
- Configuration Reference — every environment variable and its default
- Client Setup — exact per-client config snippets
Unofficial · not affiliated with Capital.com · not financial advice · demo-first. See Safety Model.
Getting Started
Reference
- Tools Reference
- Resources Reference
- Prompts Reference
- Configuration Reference
- Error Reference
- API Stability
Guides
Contributing