Capital.com MCP Server
This is a Model Context Protocol (MCP) server that exposes the Capital.com trading API as tools that can be used by Amazon Q and other LLMs that support the MCP protocol.
What is MCP?
Model Context Protocol (MCP) is an open protocol that standardizes how applications provide context to LLMs. MCP enables communication between the system and locally running MCP servers that provide additional tools and resources to extend LLM capabilities.
Setup
Using uv (recommended package manager)
- Install uv if you don't have it already:
curl -LsSf https://astral.sh/uv/install.sh | sh
- Install the package:
uv pip install capital-com-mcp-server
- Configure your environment variables with your Capital.com credentials:
export CAPITAL_BASE_URL=https://demo-api-capital.backend-capital.com
export CAPITAL_API_KEY=your_api_key_here
export CAPITAL_PASSWORD=your_password_here
export CAPITAL_IDENTIFIER=your_email@example.com
Available Tools
The following tools are exposed by the MCP server:
authenticate: Authenticate with Capital.com APIget_account_info: Get account informationsearch_markets: Search for markets (e.g., EURUSD, AAPL)get_prices: Get prices for a specific instrumentget_positions: Get all open positionscreate_position: Create a new trading positionclose_position: Close an open positionget_watchlists: Get all watchlists
Resources
Metadata
Release files for capital-com-mcp-server 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| capital_com_mcp_server-0.1.1.tar.gz | 13.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| capital_com_mcp_server-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 34.4 kB
Release files / capital_com_mcp_server-0.1.1.tar.gz
| Download URL | capital_com_mcp_server-0.1.1.tar.gz |
|---|---|
| Size | 13.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7f9d78dbbd58dd9f6032d9baa97c83da756ec25fe57d87151f97afec9994dd20
|
|
BLAKE2b-256 checksum How to use checksums |
46e39b204a4b35f45a756504dc7d9ab93fc366718c48523023454569c334012f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 6, 2025.
Transparency logRelease files / capital_com_mcp_server-0.1.1-py3-none-any.whl
| Download URL | capital_com_mcp_server-0.1.1-py3-none-any.whl |
|---|---|
| Size | 21.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
487e7d395f6d3e6f981daaaff2fc87afecdc1a5343b61d2dc255e5c0da982512
|
|
BLAKE2b-256 checksum How to use checksums |
13986be4b8f208db7a300f0e374684405722171831cbd94ca098384bdb94f3e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 6, 2025.
Transparency log