delta-exchange-mcp
Official MCP (Model Context Protocol) server for Delta Exchange India. Lets AI assistants — Claude Desktop, Claude Code, Cursor, Zed, Codex — query Delta Exchange market data and your own account (read-only) through standardized tools.
Status — Beta. Functional and used internally, but the tool surface and configuration may still change. Please open an issue for bugs, missing tools, or rough edges — early reports directly shape what ships next.
What you get: 9 public market-data tools + 12 authenticated read-only account tools (positions, orders, fills, wallet, stats, leverage, preferences, profile). No mutations — the server cannot place, edit, or cancel orders.
Quick start
Prerequisite: uv installed on your machine.
Sanity-check the install:
uvx --from git+https://github.com/delta-exchange/delta-exchange-mcp.git delta-exchange-mcp --help
The server runs local stdio only: your MCP client launches it as a subprocess, and your API keys never leave your machine. uvx re-fetches the repo on each launch — pin a commit with git+https://...@<sha> for reproducibility.
Install in your MCP client
Claude Code
claude mcp add delta-exchange-mcp \
--scope user \
--env DELTA_MCP_ENV=india_prod \
--env DELTA_API_KEY=your-api-key \
--env DELTA_API_SECRET=your-api-secret \
-- uvx --from git+https://github.com/delta-exchange/delta-exchange-mcp.git delta-exchange-mcp
--scope user makes the server available across all projects. Drop the API-key envs for market-only mode. Verify with claude mcp list.
Codex
Add to ~/.codex/config.toml:
[mcp_servers.delta-exchange-mcp]
command = "uvx"
args = ["--from", "git+https://github.com/delta-exchange/delta-exchange-mcp.git", "delta-exchange-mcp"]
env = { DELTA_MCP_ENV = "india_prod", DELTA_API_KEY = "your-api-key", DELTA_API_SECRET = "your-api-secret" }
Claude Desktop / Zed / Windsurf / other clients
Add to your MCP client's config file:
{
"mcpServers": {
"delta-exchange": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/delta-exchange/delta-exchange-mcp.git",
"delta-exchange-mcp"
],
"env": {
"DELTA_MCP_ENV": "india_prod",
"DELTA_API_KEY": "your-api-key",
"DELTA_API_SECRET": "your-api-secret"
}
}
}
}
DELTA_API_KEY / DELTA_API_SECRET are optional — without them, only the public market tools register.
API keys (optional, for account tools)
- Create a key at delta.exchange/app/account/manageapikeys (testnet: demo.delta.exchange).
- Both
api_keyandapi_secretare shown once at creation — save the secret immediately; it can't be re-derived. - Read Data permission is enough. Trading permission is not required and not used.
- Recommended: whitelist your IP on the key. Delta blocks non-whitelisted IPs and surfaces your current IP in the error message if it fires.
- Match the environment: prod keys with
DELTA_MCP_ENV=india_prod, demo keys withDELTA_MCP_ENV=india_testnet. Mixing them returnsInvalidApiKey.
Environment variables
| Var | Default | Purpose |
|---|---|---|
DELTA_MCP_ENV |
india_prod |
india_prod or india_testnet. |
DELTA_API_KEY |
(unset) | API key. Optional — when set with DELTA_API_SECRET, account tools register. |
DELTA_API_SECRET |
(unset) | API secret matching DELTA_API_KEY. |
Tools
Public market data (always available)
| Tool | What it returns |
|---|---|
list_products / get_product |
Catalog of tradable instruments and per-product metadata. |
list_tickers / get_ticker |
Last price, 24h stats, mark price, OI. |
get_options_chain |
Option chain snapshot for a given underlying / expiry. |
get_orderbook |
Bid/ask depth for a symbol. |
get_recent_trades |
Last N public trades. |
get_candles |
OHLC candles by resolution. |
get_reference_data |
Assets + indices reference. |
Account read-only (requires DELTA_API_KEY + DELTA_API_SECRET)
| Tool | What it returns |
|---|---|
get_positions / get_margined_positions |
Open positions, sizes, entry, unrealized PnL. |
get_wallet_balances / get_wallet_transactions |
Per-asset balances + ledger. |
get_open_orders / get_order_history / get_order_by_id |
Active and historical orders. |
get_fills |
Trade fills (own). |
get_product_leverage |
Per-product leverage setting. |
get_trading_stats / get_trading_preferences / get_profile |
Account-level stats, preferences, profile. |
Example prompts
Once connected, you can ask things like:
- "What's the current BTCUSD mark price and 24h range?"
- "Show the options chain for BTC expiring this Friday."
- "What positions do I have open and what's my total unrealized PnL?"
- "List my fills from the last 24 hours grouped by symbol."
- "How much USDT do I have free vs blocked in margin?"
The assistant picks the right tool based on the question — you don't need to name the tool.
Development
uv sync # install deps
uv run pytest # run tests (no network — respx-mocked)
uv run ruff check src tests # lint
uv run delta-exchange-mcp # run server (stdio)
Testing with MCP Inspector
# stdio CLI mode
bash scripts/inspect.sh --cli --method tools/list
bash scripts/inspect.sh --cli --method tools/call \
--tool-name get_ticker --tool-arg symbol=BTCUSD
# with auth
DELTA_API_KEY=... DELTA_API_SECRET=... \
bash scripts/inspect.sh --cli --method tools/call --tool-name get_wallet_balances
# web UI
bash scripts/inspect.sh # → http://localhost:6274
Roadmap
- Now: 9 public market-data + 12 authenticated read-only account tools.
- Next: trading mutations (place / edit / cancel / close, leverage change) gated behind an explicit
DELTA_MCP_MODE=tradeflag, with an audit log and basic guardrails.
Feedback & issues
This is the first public cut and we want to make it better. Please file:
- Bugs (incorrect data, signing/auth errors, crashes)
- Missing tools or fields you'd want exposed
- Rough edges in setup, docs, or error messages
- Anything you'd build on top of this if a primitive existed
→ github.com/delta-exchange/delta-exchange-mcp/issues
Please redact api_key / api_secret from any logs or screenshots before attaching.
Safety
- No mutations. Every tool is GET. The server cannot place, edit, or cancel orders.
- Local stdio only. Per-user keys never leave your machine — no shared hosted endpoint.
- Read the code. It's a financial-tool MCP; treat it like one.
Metadata
Release files for delta-exchange-mcp 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| delta_exchange_mcp-0.1.0.tar.gz | 9.3 kB | Without provenance | Details for delta_exchange_mcp-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| delta_exchange_mcp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for delta_exchange_mcp-0.1.0-py3-none-any.whl |
Total release size: 22.5 kB
Release files / delta_exchange_mcp-0.1.0.tar.gz
| Download URL | delta_exchange_mcp-0.1.0.tar.gz |
|---|---|
| Size | 9.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
902c3c44c82fe0c170e1d059ba9c7e42f0c4434c7945500d8d6346dec007885a
|
|
BLAKE2b-256 checksum How to use checksums |
a46b800ae2acceb88f50b2d6240bc574e7df95a9014847d2fad95998184d70e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / delta_exchange_mcp-0.1.0-py3-none-any.whl
| Download URL | delta_exchange_mcp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 13.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8a9c24c57e006898d51f0ff3061de764111051281e4c60898c7786a245b6c6cd
|
|
BLAKE2b-256 checksum How to use checksums |
e8eaf1c056de6d3ae698044f8e0766eed9a0be1fbf206afc19c48780b3cb7dbc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for delta-exchange-mcp 0.1.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.