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/mcpMCP clients authenticate with a bearer token:
Authorization: Bearer cw_mcp_...Create an MCP Key
- Open Settings → MCP in Crodl.
- Click New key.
- Enter a name, for example
Claude DesktoporCodex. - 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.
- Select the exact exchange API keys the MCP key can use.
- If you select more than one key for the same exchange, choose one default key for that exchange.
- Click Create key.
- 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:
| Exchange | MCP read | MCP open | MCP close |
|---|---|---|---|
| Blofin | Yes | Yes | Yes |
| Bitunix | Yes | Yes | Yes |
| Bybit | Yes | Yes | Yes |
| Bitget | Yes | Yes | Yes |
| OKX | Yes | Yes | Yes |
| Hyperliquid | Yes | Yes | Yes |
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.
| Tool | Required scope | Purpose |
|---|---|---|
crodl.list_accounts | Read | List the exchange accounts bound to the MCP key |
crodl.get_trading_state | Read | Return balances, open positions, and open orders for allowed accounts |
crodl.get_account_settings | Read | Return Crodl exchange settings for bound accounts |
crodl.search_symbols | Read | Normalize a symbol query and return exchange-specific symbols |
crodl.get_trade_status | Read | Look up a queued or completed trade by request_id |
crodl.list_recent_executions | Read | Return recent executions for allowed accounts |
crodl.list_saved_triggers | Read | List saved triggers for bound accounts |
crodl.get_saved_trigger_payload | Read, plus matching write scope to reveal token | Return one saved trigger payload |
crodl.validate_trade_payload | Open trades or Close trades | Validate an open or close payload without queueing a trade |
crodl.open_trade | Open trades | Queue an open trade using the Crodl webhook payload shape |
crodl.close_trade | Close trades | Queue a close trade using the Crodl webhook payload shape |
crodl.cancel_order | Close trades | Cancel an open order for a bound account |
crodl.modify_tpsl | Close trades | Set, update, or clear TP/SL for a bound position |
crodl.create_saved_trigger | Open trades or Close trades | Create a saved open or close trigger |
crodl.update_saved_trigger | Open trades or Close trades | Update 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_tokenis ignored. - Saved trigger lists do not bulk-return
security_token. - Full saved trigger payloads reveal
security_tokenonly when explicitly requested for one trigger and only with the matching write scope. - Payload-supplied
api_key_idis only accepted if that exact account is bound to the MCP key. - MCP trades are recorded as
source=mcpin Crodl execution history. - MCP requests are rate limited per key.
Troubleshooting
| Problem | What to check |
|---|---|
| Client says unauthorized | Confirm the bearer token starts with cw_mcp_, has not been rotated or revoked, and was pasted without spaces |
| Tool is missing | Check the MCP key scopes. Read, open, and close tools are shown only when allowed |
| Exchange not allowed | Bind that exact exchange API key under Settings → MCP |
| Trade is rejected | Validate the payload against the normal Triggers rules, including optional max_notional_usd guardrails |
| Wrong account used | Set the default account for that exchange or pass the intended api_key_id tool argument |