Repository navigation
API Stability
This page is a summary — the authoritative policy lives in the repo's
docs/api-stability.md.
Read that page for the full guarantee text; this one just orients you.
The server exposes a fixed surface — 42 tools, 4 resources, and 7 guided prompts — and that surface is a contract you can build a client integration on. Within a given major version:
- Tool, resource, and prompt names don't change or get removed.
- A tool's semantics don't silently change — what a tool does stays what it did.
- Existing parameters keep their name, type, and meaning.
Adding a new tool/resource/prompt, or adding a new optional parameter to an existing tool, is allowed without a major version bump — those are additive. Renaming or removing something, or changing a parameter's type, requires a major bump and (where feasible) ships with a deprecation alias, always recorded in the CHANGELOG.
This contract covers the shape of the interface — names, parameters, prompt arguments. It does not freeze the values returned from the live Capital.com API (those reflect the upstream API) or the exact wording of human-readable descriptions.
- Error codes. A code a client can receive is not renamed or removed within a major version; new codes may be added. Message text may change, so match on the code (see Error Reference).
-
Settings. The names of the
CAP_*environment variables (their meaning is documented in the Configuration Reference, not enforced by a test).CAP_REQUIRE_EXPLICIT_CONFIRM=falsestays available; it removes theconfirm=truerequirement for every state-changing tool and is at your own risk. -
Command line. The snapshot freezes the subcommand names (
run,init,doctor,config,setup), their option strings, and the--clientand--transportchoices.tests/test_client_setup.py::test_default_paths(the workspace-path test) pins thatsetup --client vscodetargets the workspace file.vscode/mcp.json. -
Credentials lookup order. Values in the process environment and the
CAP_*_CMDcommands take precedence over any file (the environment beats a command, a command beats a file). Among files the order isCAP_ENV_FILE, then./.envin the working directory, then the filecapitalcom-mcp initwrites, then the SDK default (~/.config/capital-cli/.env). This project's tests enforce the choice amongCAP_ENV_FILE,./.envand theinitfile; the environment/command precedence and the SDK default file are the SDK's own behaviour within the pinnedcapitalcom-clirange. -
Result keys the server adds. The snake_case keys this server puts in
results (for example
account,position_deal_id,amend_request, thecap://risk-policyfields and thecap_stream_*envelope keys such asstatus,ticksorsnapshots) are not renamed or removed within a major version; new keys may be added. Keys inside the broker's own data (camelCase, such asdealReference) follow Capital.com.
Some frozen error codes and settings come from the SDK, so the capitalcom-cli
dependency stays pinned to a range that honours them (capitalcom-cli>=0.8,<0.9
in 0.9.0).
-
Credentials lookup order.
CAP_ENV_FILE, then./.envin the working directory, then the filecapitalcom-mcp initwrites (~/.config/capital-mcp/.env), then the SDK default (~/.config/capital-cli/.env).
-
The bundle's internal variables.
CAP_MCPB_*andCAPITALCOM_MCP_BUNDLE*are internal to the bundle and may change in any release; set the form fields instead. - The MCPB bundle. Its format is experimental upstream; it is provided as a convenience and may change or be withdrawn in a minor release.
- Data returned by the broker, and the wording of descriptions.
The project is still on 0.x, and the contract takes full effect at 1.0.0.
Names are already stable. Until then a minor release (0.x.0) may still
change a default — always listed under Changed in the CHANGELOG — and a
patch release only fixes bugs. 0.9.0 carries the last planned default changes before 1.0.0. Tool and parameter descriptions are documentation and may be improved in any release. Pin an exact
version if you depend on today's behavior.
The surface is locked by an automated snapshot
(tests/snapshots/api_surface.json) checked in the offline test suite. Any
accidental change to a tool schema, resource URI, or prompt argument fails CI
until it's either reverted or deliberately re-frozen with a CHANGELOG entry.
Error codes, the command line and the CAP_* setting names are guarded by
three superset snapshots
(test_error_codes_are_a_superset_of_the_snapshot,
test_cli_surface_is_a_superset_of_the_snapshot and
test_settings_are_a_superset_of_the_snapshot): additions are allowed, a
removal or rename fails CI and needs a major version. The choice among
CAP_ENV_FILE, ./.env and the init file is pinned by the resolver tests in
tests/test_cli.py (for example test_explicit_cap_env_file_wins and
test_local_dotenv_wins_over_default).
Tool titles and annotations (read-only, destructive, idempotent and open-world hints) are part of the snapshot; they describe the tool and may be corrected in a minor release.
Version stability is a promise about major versions — a 1.x release can
still add tools between 1.0 and 1.4. To pin against any change at
all, including additive ones, pin the exact package version in your client
config (capitalcom-mcp==0.9.0) — see Client Setup.
-
docs/api-stability.mdin the repository — the authoritative policy text - Contributing — the checklist for adding a tool without breaking this contract
- Client Setup — how to pin an exact version
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