Repository navigation
Client Setup
This page has the exact config for each MCP client. Every client uses the
same command / args / env shape; only the file location (and, for VS
Code, the root key) differs. Commands are written uvx capitalcom-mcp <subcommand>;
after pipx install capitalcom-mcp or pip install capitalcom-mcp you can drop
the uvx prefix.
The first run, in this order:
-
uvx capitalcom-mcp initcreates~/.config/capital-mcp/.env(owner-only). -
uvx capitalcom-mcp doctorchecks it. It finds that file without any extra variable. - Add the server with one of:
uvx capitalcom-mcp setup --client <name> --write; the Cursor or VS Code link below (the entry it adds reads theinitfile by default); or the Claude Desktop bundle (it uses only the values typed into its form and never reads any.env, so steps 1 and 2 do not apply to it).
The CLI looks for credentials in this order: CAP_ENV_FILE, then ./.env in
the working directory, then the init file, then the SDK's own
~/.config/capital-cli/.env. Putting "CAP_ENV_FILE": "<path from init>" in
a client's env keeps secrets out of the client config file; you can instead
put CAP_API_KEY / CAP_IDENTIFIER / CAP_API_PASSWORD directly in env,
though CAP_ENV_FILE (or the CAP_*_CMD secret-exec variables) is the safer
default. See Installation and Setup for why.
Download capitalcom-mcp-v0.9.0.mcpb
from the latest GitHub Release
and open it in Claude Desktop (Settings → Extensions also works). Fill in the
form: API key, identifier and API password, the environment (demo or
live; live is real money, start with demo), and optionally trading.
Trading is off by default and needs Allowed EPICs to be set. The bundle
needs uv on your machine if Claude Desktop does not provide it (not yet
confirmed either way). It is new in this release, and it never reads a .env
file: it uses only the values you enter in the client.
The bundle is provided as a convenience and is not part of the stability promise; its format is still experimental upstream.
Cursor: paste this link into your browser's address bar; Cursor opens its install prompt.
cursor://anysphere.cursor-deeplink/mcp/install?name=capitalcom&config=eyJjb21tYW5kIjoidXZ4IiwiYXJncyI6WyJjYXBpdGFsY29tLW1jcD09MC45LjAiLCJydW4iLCItLXRyYW5zcG9ydCIsInN0ZGlvIl19
VS Code: Add to VS Code
The links add the server entry only, pinned to this release, and carry no
credentials. The entry they add reads the init file by default, so run
uvx capitalcom-mcp init first (and uvx capitalcom-mcp doctor to check it).
VS Code: the link installs the server into your VS Code user profile,
while uvx capitalcom-mcp setup --client vscode --write writes the workspace
file .vscode/mcp.json of the folder you run it in. Use one or the other, not
both.
uvx capitalcom-mcp setup --client <claude-desktop|claude-code|cursor|vscode>
prints the exact configuration for your machine (it points at the credentials
file init writes). Add --write to merge it into the client's config file:
it backs up the existing file first, refuses a file it cannot parse as plain
JSON, keeps all your other servers, and replaces an existing capitalcom entry
only with --force. For Claude Code it prints the claude mcp add-json
command instead. --no-pin drops the version pin. --link prints the
one-click link for Cursor or VS Code.
The snippets below are the manual form of the same entry. setup generates it
pinned to the installed version (capitalcom-mcp==0.9.0), which is recommended
for real-money use (see Pinning).
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) /
%APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"capitalcom": {
"command": "uvx",
"args": ["capitalcom-mcp"],
"env": { "CAP_ENV_FILE": "/Users/you/.config/capital-mcp/.env" }
}
}
}claude mcp add --transport stdio \
--env CAP_ENV_FILE=/Users/you/.config/capital-mcp/.env \
capitalcom -- uvx capitalcom-mcp~/.cursor/mcp.json (global) or .cursor/mcp.json (project):
{
"mcpServers": {
"capitalcom": {
"command": "uvx",
"args": ["capitalcom-mcp"],
"env": { "CAP_ENV_FILE": "/Users/you/.config/capital-mcp/.env" }
}
}
}.vscode/mcp.json — note the root key is servers, not mcpServers, and
each entry needs "type": "stdio":
{
"servers": {
"capitalcom": {
"type": "stdio",
"command": "uvx",
"args": ["capitalcom-mcp"],
"env": { "CAP_ENV_FILE": "/Users/you/.config/capital-mcp/.env" }
}
}
}~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"capitalcom": {
"command": "uvx",
"args": ["capitalcom-mcp"],
"env": { "CAP_ENV_FILE": "/Users/you/.config/capital-mcp/.env" }
}
}
}ChatGPT requires a remote server — stdio launchers (the config shapes above) are not supported. Run the server with streamable-HTTP instead:
CAP_ENV_FILE=/home/you/.config/capital-mcp/.env \
uvx capitalcom-mcp run --transport http --host 127.0.0.1 --port 8000
# endpoint: http://127.0.0.1:8000/mcp (a reverse proxy on the same machine
# forwards public HTTPS traffic to it)The HTTP endpoint has no authentication: anyone who can reach the port can
use your account through the server. Bind it to 127.0.0.1 unless it sits
behind a reverse proxy that terminates TLS and authenticates callers, and
never expose it directly to the internet.
Once your server is reachable over HTTPS,
enable Developer Mode in ChatGPT
(Settings → Connectors → Advanced) and add the server URL ending in /mcp.
ChatGPT's Deep Research connector calls two read-only tools, search and
fetch, which this server implements natively; the rest of the tool surface
requires Developer Mode to access.
uvx capitalcom-mcp without a version reuses the release already in its
cache (it fetches the newest one only the first time), so it can lag behind.
Use uvx capitalcom-mcp@latest … to refresh. For production or real-money use,
pin the exact version so an unexpected update can't change tool behavior under
you:
{
"mcpServers": {
"capitalcom": {
"command": "uvx",
"args": ["capitalcom-mcp==0.9.0"],
"env": { "CAP_ENV_FILE": "/Users/you/.config/capital-mcp/.env" }
}
}
}The CLI form is uvx capitalcom-mcp==0.9.0 run …. Pin to a version you've
reviewed, and bump deliberately after reading the CHANGELOG. See
API Stability for what a version pin actually protects you against.
- Installation and Setup — install, generate credentials, run the wizard
-
Configuration Reference — every environment variable the
envblock can set - Troubleshooting FAQ — fixes for the most common setup issues
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