Skip to content
Delta Exchange MCP

Authentication

Create an API key, configure environment variables, choose the Read Data or Trading permission, and understand which tools need credentials.

The server authenticates to Delta's API with an API key + secret. You never paste credentials into the AI model. They are supplied once at install time — through the bundle's form, your editor's masked prompt, or your client's config file — and read into the server at startup.

From v0.6.0 there is a second place they can live: one file the server keeps for every client on the machine. Where the key goes below covers both, and which one wins when you use both.

Which tools need what

GroupKey requiredExamples
Setup (2 tools)Nosetup_credentials, get_connection_status
Market data (14 tools)Noget_ticker, get_orderbook, get_candles, get_options_chain
Account data (12 tools)Yesget_positions, get_wallet_balances, get_fills, bulk_fills_export
Trading (13 tools)Yes, and Trading permission to executeplace_order, cancel_order, place_bracket_order, close_all_positions

If you only want market data, skip key creation entirely. For account reads, a Read Data key is enough. Create a Trading key only if you want the assistant placing orders.

A key registers the account and trading tools together, so the tool count your client displays tells you whether credentials arrived, not what they may do:

What you configuredTools registered
Nothing16
A valid key, either permission41

The two setup tools are in both rows because nothing gates them, which is why the first row is 16 and not the 14 market-data tools on their own.

The trading tools are listed with a Read Data key as well. Delta rejects what they send: UnauthorizedApiAccess - API key lacks permission for this endpoint.

DELTA_MCP_DEBUG adds one more on top of whichever row you are on — get_debug_status, which reports where the debug log is being written.

Create your API key

Open API key management

Go to delta.exchange → Account → Manage API Keys.

Choose permissions for your use

For data only, enable Read Data and nothing else. That also limits the blast radius if the key ever leaks. To let the assistant place orders, enable Trading. Grant only what you need.

Whitelist your IP

Add an IP whitelist so the key only works from your machine. This is required for a Trading key to work. You can revoke the key anytime from the same page; revocation is immediate.

Hand the key to the server

If you installed the Claude Desktop bundle, type the key and secret into its install form. In VS Code, paste them at the masked prompt. Everywhere else, set them as environment variables in your client's MCP config. All three routes are covered in the Quickstart. Or put the key in the shared file below and leave your client's config without credentials at all.

Where the key goes

There are two places a key can live, and they are read in a fixed order.

Your client's own config is read first: the bundle's install form, VS Code's masked prompt, or an env block in a config file. This is what the install builder fills in when you type a key into it.

The shared file is read second:

~/.delta-exchange-mcp/config.env

Every MCP client on the machine reads it, so a key set there works in Claude Desktop, Cursor, Claude Code and the rest at the same time. The server creates the file the first time it runs, owner-only, with instructions inside it, and prints the path in its startup line.

A value your client sets always wins. Leaving a field empty in your client means "not answered" and falls through to the file. Getting this backwards is a real failure mode with a confusing symptom, so it has its own troubleshooting entry.

Three ways to fill the shared file

All three write the same file. Pick one.

In the conversation. Ask your assistant to connect your account and a form appears inline:

Connect my Delta Exchange account

It asks which site the key came from, what the assistant may do with it, then the key and the secret. What you type goes straight to the file. It is not part of the conversation and the assistant cannot read it, because the form runs in its own frame. This needs a client that renders in-chat forms: Claude Desktop and the Codex desktop app do today. On any other client nothing appears and you get the instructions instead. See setup_credentials.

At a terminal, which works on every client:

uvx delta-exchange-mcp login

It prompts with the input hidden and checks the key against Delta before saving anything.

By hand. Open the file and fill in the three lines already waiting in it:

DELTA_API_KEY=your-key-here
DELTA_API_SECRET=your-secret-here
DELTA_MCP_ENV=india_prod

Never send the key as a chat message

The form exists so the key stays out of the conversation. A message is in the assistant's context and is stored in the conversation. If an assistant offers to take your key that way, decline.

The terminal and by-hand routes normally need your client restarted afterwards. The in-chat form usually needs neither: a saved key registers the account and trading tools in the running server and tells the client its tool list changed, so first-time setup, environment changes and key rotation all work in the conversation you are already in. The trading tools follow the key, so saving one that carries Trading permission arms them in the same session.

Choosing the key permission

The permission on the key decides whether the assistant can trade. No setting here changes that, and Security explains why it is the boundary that holds.

Grant Read Data and the assistant reads your account while Delta rejects every order it sends. Grant Trading and it places real orders from the moment the key is saved, with no rehearsal, no size cap and no confirmation step. Delta requires an IP whitelist entry on a Trading key.

Environment variables

VariableRequiredDescription
DELTA_API_KEYFor account / trading toolsYour API key. Its own permission decides what the assistant may do.
DELTA_API_SECRETFor account / trading toolsThe matching secret.
DELTA_MCP_ENVYesTarget environment: india_prod (production) or india_testnet (testnet).
DELTA_MCP_DEBUGNoSet 1 to trace every HTTP request and response to a file, for bug reports. See Troubleshooting.
DELTA_MCP_DEBUG_FILENoOverride the debug log path (default ~/.delta-exchange-mcp/logs/).

Match the key to the environment

A production key only works with india_prod; a testnet key only with india_testnet. Mixing them produces signature/auth errors. Test trading on testnet first: it is the only way to rehearse an order.

Where your keys live

Your credentials stay on your machine. Which file holds them depends on how you installed the server:

Install pathWhere the credentials are stored
Claude Desktop bundleEntered in the install form; Claude Desktop keeps them with the server's own settings, not in a file you edit.
VS Code one-clickEntered at the masked prompt; VS Code stores them in its own secret storage and injects them via ${input:…}, so they never land in .vscode/mcp.json.
Cursor one-click, or any hand-written configPlain text in your client's config file — ~/.cursor/mcp.json, ~/.codex/config.toml, claude_desktop_config.json, and so on.
The in-chat form, login, or editing by handPlain text in ~/.delta-exchange-mcp/config.env, created owner-only. One file for every client on the machine, read after whatever your client sets.

Whichever path you used, the rest is the same:

  • Read into the server subprocess as environment variables at launch.
  • Used to sign requests sent directly from your machine to Delta's API, with HMAC-SHA256.
  • Never sent to the AI model or any Delta server beyond the trading API.

More on the security model in Security.

Keep secrets out of shared files

Do not commit a config file containing real credentials to git. Treat the API secret like a password.

On this page