Carbon DeFi — On-Chain Maker Trading via MCP
Carbon DeFi is a fully on-chain maker trading protocol. Users set prices upfront — strategies execute automatically with zero gas on fills. No bots, no agent needs to stay online after placing a strategy.
Connect to the MCP Server
Add to Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"carbon-defi": {
"command": "npx",
"args": ["mcp-remote", "https://mcp.carbondefi.xyz/mcp"]
}
}
}
Restart Claude Desktop after saving. Alternatively, call tools directly via REST:
curl -X POST https://mcp.carbondefi.xyz/tools/get_strategies \
-H "Content-Type: application/json" \
-d '{"owner": "0xYourAddress", "chain": "ethereum"}'
Core Concepts
Maker-first. Every strategy is a maker order — you set the price, the market comes to you.
Unsigned transactions. All write operations return an unsigned transaction (to, data, value). The user must sign and broadcast it. Never assume a transaction has been submitted.
Base and quote tokens.
base_token — the token being bought or sold (e.g. ETH)
quote_token — the pricing token (e.g. USDC)
- All prices are expressed as: quote per 1 base (e.g. 2000 USDC per ETH)
Budgets.
buy_budget — always in quote token (e.g. USDC to spend buying ETH)
sell_budget — always in base token (e.g. ETH to sell)
Native ETH. Use address 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE. Never WETH. ETH never requires approval.
Supported chains. ethereum, sei, celo, tac, coti
Strategy Types
| User intent |
Tool to use |
| "buy at exactly X" / "sell at exactly X" |
carbon_create_limit_order |
| "scale in as price drops" / "DCA into" |
carbon_create_range_order (buy) |
| "scale out as price rises" / "sell gradually" |
carbon_create_range_order (sell) |
| "buy low sell high forever" / "recurring" / "grid" |
carbon_create_recurring_strategy |
| "provide liquidity" / "earn fees" / "concentrated" |
carbon_create_concentrated_strategy |
| "full range liquidity" / "widest range" |
carbon_create_full_range_strategy |
A range order executes gradually as price moves through the range — correct for "scale in" or "DCA". Do not split into multiple orders.
All 25 Tools
Explore
carbon_get_strategies — all active strategies for a wallet. Always call first.
carbon_get_strategy — single strategy by ID — type, status, prices, budgets, trade count
carbon_get_activity — trade and event history for a wallet or strategy
carbon_explore_pair — top strategies for a token pair, ranked by trade count
carbon_simulate_strategy — backtest against real historical prices before going on-chain
carbon_resolve_token — fuzzy token symbol/name → on-chain address ("dollar" finds USDC/USDT/DAI)
carbon_find_opportunities — discount buys or premium sells vs market price
carbon_get_protocol_stats — TVL, volume, fees history
carbon_get_price_history — OHLC price data for any token pair
Trade (swap against Carbon liquidity)
carbon_get_trade_quote — swap quote: expected output, rate, strategies used. Always call before execute.
carbon_execute_trade — unsigned swap transaction. Requires trade_actions from get_trade_quote.
Create
carbon_create_limit_order — one-time buy or sell at exact price
carbon_create_range_order — gradual execution across a price range
carbon_create_recurring_strategy — looping buy+sell, repeats forever, zero gas on fills
carbon_create_concentrated_strategy — two-sided liquidity with a defined spread
carbon_create_full_range_strategy — two-sided liquidity up to 1000x from market price
Manage
carbon_reprice_strategy — update price ranges only
carbon_edit_strategy — update prices and budgets in one transaction
carbon_deposit_budget — add funds without interrupting the strategy
carbon_withdraw_budget — remove funds without closing the strategy
carbon_pause_strategy — pause orders, funds stay, resume anytime
carbon_resume_strategy — reactivate a paused strategy
carbon_delete_strategy — permanently close and return all funds
Help & Knowledge
carbon_help — detailed guidance on any tool or full overview
carbon_learn — protocol concepts: fees, security, marginal price, overlapping liquidity, contracts, SDK, API, and more
Behavior Rules
- Always call
carbon_get_strategies first to check existing positions
- Never invent a market price — always ask the user. Never reuse a price from earlier in the conversation.
- Present a strategy proposal and wait for explicit user approval before building a transaction
- Always show the full unsigned transaction (
to, data, value) after creation
- Check the
warnings array in every response — if allowance warning exists, show approval steps before the transaction
- When market price is inside a buy range, ask: full range or below market only?
- Full range: omit
buy_price_marginal
- Below market only: set
buy_price_marginal to current market price
- Overlapping buy/sell ranges: warn but allow — ask user to confirm intent
- Buy price above market: warn and offer to adjust
- Sell price below market: warn and offer to adjust
- For pause: show current prices first, confirm before pausing
- For resume: restore prices only — funds already in strategy, never ask for budgets
- For reprice: call once with all four prices — fill missing side from current strategy state
- For delete: always confirm with user — irreversible
Token Allowances
Before any strategy depositing ERC-20 tokens, check if the Carbon DeFi controller has sufficient allowance. If not, the user must send an approval transaction first.
Note: USDT on Ethereum requires setting allowance to 0 before increasing.
Transaction Verification
All write operations return unsigned transactions. To independently verify calldata before signing:
Batch API
Run multiple tools in parallel as a single request (counts against rate limit once):
curl -X POST https://mcp.carbondefi.xyz/batch \
-H "Content-Type: application/json" \
-d '[
{"tool": "get_strategies", "params": {"owner": "0x...", "chain": "ethereum"}},
{"tool": "get_protocol_stats", "params": {"chain": "ethereum"}}
]'
Rate Limits
- 30 requests/min per IP, burst of 10
- Use
/batch for parallel calls — counts as 1 request
- REST endpoints (
/tools/:toolName) are faster than MCP proxy
Links
1---2name: carbon-defi3description: Use this skill when the user wants to create or manage on-chain maker trading strategies on Carbon DeFi. Triggers include: "place a limit order", "create a recurring strategy", "buy ETH at a specific price", "set up a DCA strategy", "manage my Carbon strategies", "pause/resume/reprice a strategy", "deposit or withdraw from a strategy", "full range liquidity", "provide liquidity and earn fees", or any mention of Carbon DeFi, maker orders, or on-chain automated trading strategies on Ethereum, Sei, Celo, TAC, or COTI.4---56# Carbon DeFi — On-Chain Maker Trading via MCP78Carbon DeFi is a fully on-chain maker trading protocol. Users set prices upfront — strategies execute automatically with zero gas on fills. No bots, no agent needs to stay online after placing a strategy.910## Connect to the MCP Server1112Add to Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json`):1314```json15{16 "mcpServers": {17 "carbon-defi": {18 "command": "npx",19 "args": ["mcp-remote", "https://mcp.carbondefi.xyz/mcp"]20 }21 }22}23```2425Restart Claude Desktop after saving. Alternatively, call tools directly via REST:2627```bash28curl -X POST https://mcp.carbondefi.xyz/tools/get_strategies \29 -H "Content-Type: application/json" \30 -d '{"owner": "0xYourAddress", "chain": "ethereum"}'31```3233## Core Concepts3435**Maker-first.** Every strategy is a maker order — you set the price, the market comes to you.3637**Unsigned transactions.** All write operations return an unsigned transaction (`to`, `data`, `value`). The user must sign and broadcast it. Never assume a transaction has been submitted.3839**Base and quote tokens.**40- `base_token` — the token being bought or sold (e.g. ETH)41- `quote_token` — the pricing token (e.g. USDC)42- All prices are expressed as: **quote per 1 base** (e.g. 2000 USDC per ETH)4344**Budgets.**45- `buy_budget` — always in quote token (e.g. USDC to spend buying ETH)46- `sell_budget` — always in base token (e.g. ETH to sell)4748**Native ETH.** Use address `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE`. Never WETH. ETH never requires approval.4950**Supported chains.** `ethereum`, `sei`, `celo`, `tac`, `coti`5152## Strategy Types5354| User intent | Tool to use |55|---|---|56| "buy at exactly X" / "sell at exactly X" | `carbon_create_limit_order` |57| "scale in as price drops" / "DCA into" | `carbon_create_range_order` (buy) |58| "scale out as price rises" / "sell gradually" | `carbon_create_range_order` (sell) |59| "buy low sell high forever" / "recurring" / "grid" | `carbon_create_recurring_strategy` |60| "provide liquidity" / "earn fees" / "concentrated" | `carbon_create_concentrated_strategy` |61| "full range liquidity" / "widest range" | `carbon_create_full_range_strategy` |6263A range order executes gradually as price moves through the range — correct for "scale in" or "DCA". Do not split into multiple orders.6465## All 25 Tools6667### Explore68- `carbon_get_strategies` — all active strategies for a wallet. **Always call first.**69- `carbon_get_strategy` — single strategy by ID — type, status, prices, budgets, trade count70- `carbon_get_activity` — trade and event history for a wallet or strategy71- `carbon_explore_pair` — top strategies for a token pair, ranked by trade count72- `carbon_simulate_strategy` — backtest against real historical prices before going on-chain73- `carbon_resolve_token` — fuzzy token symbol/name → on-chain address ("dollar" finds USDC/USDT/DAI)74- `carbon_find_opportunities` — discount buys or premium sells vs market price75- `carbon_get_protocol_stats` — TVL, volume, fees history76- `carbon_get_price_history` — OHLC price data for any token pair7778### Trade (swap against Carbon liquidity)79- `carbon_get_trade_quote` — swap quote: expected output, rate, strategies used. Always call before execute.80- `carbon_execute_trade` — unsigned swap transaction. Requires `trade_actions` from `get_trade_quote`.8182### Create83- `carbon_create_limit_order` — one-time buy or sell at exact price84- `carbon_create_range_order` — gradual execution across a price range85- `carbon_create_recurring_strategy` — looping buy+sell, repeats forever, zero gas on fills86- `carbon_create_concentrated_strategy` — two-sided liquidity with a defined spread87- `carbon_create_full_range_strategy` — two-sided liquidity up to 1000x from market price8889### Manage90- `carbon_reprice_strategy` — update price ranges only91- `carbon_edit_strategy` — update prices and budgets in one transaction92- `carbon_deposit_budget` — add funds without interrupting the strategy93- `carbon_withdraw_budget` — remove funds without closing the strategy94- `carbon_pause_strategy` — pause orders, funds stay, resume anytime95- `carbon_resume_strategy` — reactivate a paused strategy96- `carbon_delete_strategy` — permanently close and return all funds9798### Help & Knowledge99- `carbon_help` — detailed guidance on any tool or full overview100- `carbon_learn` — protocol concepts: fees, security, marginal price, overlapping liquidity, contracts, SDK, API, and more101102## Behavior Rules1031041. Always call `carbon_get_strategies` first to check existing positions1052. Never invent a market price — always ask the user. Never reuse a price from earlier in the conversation.1063. Present a strategy proposal and wait for explicit user approval before building a transaction1074. Always show the full unsigned transaction (`to`, `data`, `value`) after creation1085. Check the `warnings` array in every response — if allowance warning exists, show approval steps before the transaction1096. When market price is inside a buy range, ask: full range or below market only?110 - Full range: omit `buy_price_marginal`111 - Below market only: set `buy_price_marginal` to current market price1127. Overlapping buy/sell ranges: warn but allow — ask user to confirm intent1138. Buy price above market: warn and offer to adjust1149. Sell price below market: warn and offer to adjust11510. For pause: show current prices first, confirm before pausing11611. For resume: restore prices only — funds already in strategy, never ask for budgets11712. For reprice: call once with all four prices — fill missing side from current strategy state11813. For delete: always confirm with user — irreversible119120## Token Allowances121122Before any strategy depositing ERC-20 tokens, check if the Carbon DeFi controller has sufficient allowance. If not, the user must send an approval transaction first.123124> Note: USDT on Ethereum requires setting allowance to 0 before increasing.125126## Transaction Verification127128All write operations return unsigned transactions. To independently verify calldata before signing:129- Spec: https://docs.carbondefi.xyz/developer-guides/carbon-defi-transaction-encoding130- Covers: contract addresses per chain, function selectors, price encoding, budget encoding, verification checklist131132## Batch API133134Run multiple tools in parallel as a single request (counts against rate limit once):135136```bash137curl -X POST https://mcp.carbondefi.xyz/batch \138 -H "Content-Type: application/json" \139 -d '[140 {"tool": "get_strategies", "params": {"owner": "0x...", "chain": "ethereum"}},141 {"tool": "get_protocol_stats", "params": {"chain": "ethereum"}}142 ]'143```144145## Rate Limits146147- 30 requests/min per IP, burst of 10148- Use `/batch` for parallel calls — counts as 1 request149- REST endpoints (`/tools/:toolName`) are faster than MCP proxy150151## Links152153- App: https://app.carbondefi.xyz154- Docs: https://docs.carbondefi.xyz155- AI Agents & MCP: https://docs.carbondefi.xyz/ai-agents-and-mcp-integration156- MCP endpoint: https://mcp.carbondefi.xyz/mcp157- OpenAPI spec: https://mcp.carbondefi.xyz/openapi.json158- Litepaper: https://carbondefi.xyz/litepaper