Skip to content

MCP Access

Crodl MCP Access lets an AI client such as Claude, Codex, ChatGPT, or another Model Context Protocol client inspect your allowed trading state and, if you permit it, queue trades through Crodl.

MCP trading uses the same payload shape as Crodl TradingView webhooks. For direct MCP trade tools, the client does not need your webhook security_token; Crodl injects the correct token server-side from the exchange API key you bind to the MCP key.

MCP keys can grant read and trade access to the exchange accounts you bind. Treat an MCP secret like a trading credential. Do not paste it into public chats, logs, screenshots, or support tickets.

Endpoint

Use Crodl's hosted MCP endpoint:

https://api.crodl.com/mcp

MCP clients authenticate with a bearer token:

Authorization: Bearer cw_mcp_...

Create an MCP Key

  1. Open Settings → MCP in Crodl.
  2. Click New key.
  3. Enter a name, for example Claude Desktop or Codex.
  4. Choose scopes:
    • Read — view bound accounts, balances, positions, open orders, and recent executions.
    • Open trades — allow the client to queue open trade payloads.
    • Close trades — allow the client to queue close trade payloads.
  5. Select the exact exchange API keys the MCP key can use.
  6. If you select more than one key for the same exchange, choose one default key for that exchange.
  7. Click Create key.
  8. Copy the secret immediately. It is shown once.

Connect a Client

Add Crodl as a remote MCP server in your MCP client:

{
  "mcpServers": {
    "crodl": {
      "url": "https://api.crodl.com/mcp",
      "headers": {
        "Authorization": "Bearer cw_mcp_..."
      }
    }
  }
}

After connecting, the client calls tools/list and only sees tools allowed by the key's scopes.

Crodl supports MCP bindings for all current exchanges:

ExchangeMCP readMCP openMCP close
BlofinYesYesYes
BitunixYesYesYes
BybitYesYesYes
BitgetYesYesYes
OKXYesYesYes
HyperliquidYesYesYes

Rotating and Revoking

Use Rotate when a client needs a new secret or the old secret may have been exposed. Crodl asks for confirmation before rotating because the old secret stops working immediately.

Use Revoke when the MCP client should no longer have access. Revoked keys cannot authenticate.

If you accidentally share an MCP key, rotate or revoke it before using it again.

Available Tools

The tools shown to a client depend on the scopes you selected for the MCP key.

ToolRequired scopePurpose
crodl.list_accountsReadList the exchange accounts bound to the MCP key
crodl.get_trading_stateReadReturn balances, open positions, and open orders for allowed accounts
crodl.get_account_settingsReadReturn Crodl exchange settings for bound accounts
crodl.search_symbolsReadNormalize a symbol query and return exchange-specific symbols
crodl.get_trade_statusReadLook up a queued or completed trade by request_id
crodl.list_recent_executionsReadReturn recent executions for allowed accounts
crodl.list_saved_triggersReadList saved triggers for bound accounts
crodl.get_saved_trigger_payloadRead, plus matching write scope to reveal tokenReturn one saved trigger payload
crodl.validate_trade_payloadOpen trades or Close tradesValidate an open or close payload without queueing a trade
crodl.open_tradeOpen tradesQueue an open trade using the Crodl webhook payload shape
crodl.close_tradeClose tradesQueue a close trade using the Crodl webhook payload shape
crodl.cancel_orderClose tradesCancel an open order for a bound account
crodl.modify_tpslClose tradesSet, update, or clear TP/SL for a bound position
crodl.create_saved_triggerOpen trades or Close tradesCreate a saved open or close trigger
crodl.update_saved_triggerOpen trades or Close tradesUpdate a saved open or close trigger

Trading Payloads

MCP open and close tools accept the same Crodl JSON fields used by TradingView/webhook triggers, with one important difference:

Do not include security_token in MCP payloads. If a client sends one anyway, Crodl ignores and strips it, then uses the server-side token from the bound exchange key.

If the MCP key is bound to one account for an exchange, api_key_id is optional. If multiple accounts are bound for the same exchange, either select a default in Settings or pass api_key_id as a tool argument.

Open-trade guardrails work through MCP the same way they work through TradingView/webhook triggers:

{
  "max_notional_usd": "500",
  "guard_action": "reject"
}

These fields are optional. If omitted, existing trade behavior is unchanged. max_notional_usd caps position notional before exchange submission, guard_action can be reject or clamp, and close trades ignore these fields so exits are not blocked.

Open Trade Example

{
  "payload": {
    "name": "BUY SOL",
    "side": "long",
    "symbol": "SOL-USDT",
    "exchange": "blofin",
    "order_type": "market",
    "margin_mode": "isolated",
    "trading_type": "futures",
    "position_mode": "oneway",
    "quantity_type": "asset",
    "quantity_quote": "USDT",
    "stop_loss_mode": "price",
    "stop_loss_type": "market",
    "trading_action": "open",
    "cancel_unfilled": "disabled",
    "leverage_amount": "10",
    "quantity_amount": "10",
    "max_notional_usd": "500",
    "guard_action": "reject",
    "take_profit_mode": "price",
    "take_profit_type": "market",
    "pyramiding_allowed": "none",
    "opposite_side_close": false,
    "strategy_dashboard_id": "buy-sol",
    "stop_loss_trigger_price": "100000",
    "take_profit_trigger_price": "1"
  }
}

Close Trade Example

{
  "payload": {
    "name": "Close SOL",
    "side": "close_long",
    "symbol": "SOL-USDT",
    "exchange": "blofin",
    "order_type": "market",
    "trading_type": "futures",
    "quantity_type": "percentage",
    "trading_action": "close",
    "cancel_unfilled": "disabled",
    "quantity_amount": "100",
    "strategy_dashboard_id": "buy-sol"
  }
}

Both examples return immediately with a queued request:

{
  "accepted": true,
  "request_id": "056a90a0031a4f36b3c96a6609f27ec3",
  "accepted_ms": 45
}

Use crodl.get_trade_status with the request_id to check the final result.

TradingView Payloads

MCP can also help you retrieve saved trigger JSON for TradingView.

To list saved triggers and inspect payloads without exposing webhook tokens:

{
  "exchange": "blofin",
  "trading_action": "open",
  "include_payload": true
}

Use that with crodl.list_saved_triggers. The returned payloads do not include security_token.

To copy one full TradingView-ready payload, call crodl.get_saved_trigger_payload for a single trigger:

{
  "exchange": "blofin",
  "trading_action": "open",
  "trigger_id": 123,
  "include_security_token": true
}

This returns the security_token only for that one trigger. Revealing an open-trigger token requires Open trades scope. Revealing a close-trigger token requires Close trades scope.

A revealed security_token can fire TradingView/webhook trades. Only reveal it when the user explicitly asks to copy a payload into TradingView.

Safety Model

  • MCP keys are created by the logged-in Crodl user, not by the AI client.
  • The secret is stored hashed and is shown only once.
  • A key only works for the exact exchange API key rows you bind.
  • Read, open, and close permissions are separate.
  • Payload-supplied security_token is ignored.
  • Saved trigger lists do not bulk-return security_token.
  • Full saved trigger payloads reveal security_token only when explicitly requested for one trigger and only with the matching write scope.
  • Payload-supplied api_key_id is only accepted if that exact account is bound to the MCP key.
  • MCP trades are recorded as source=mcp in Crodl execution history.
  • MCP requests are rate limited per key.

Troubleshooting

ProblemWhat to check
Client says unauthorizedConfirm the bearer token starts with cw_mcp_, has not been rotated or revoked, and was pasted without spaces
Tool is missingCheck the MCP key scopes. Read, open, and close tools are shown only when allowed
Exchange not allowedBind that exact exchange API key under Settings → MCP
Trade is rejectedValidate the payload against the normal Triggers rules, including optional max_notional_usd guardrails
Wrong account usedSet the default account for that exchange or pass the intended api_key_id tool argument