An MCP server that gives coding agents and chat clients read access to Carbium: RPC and DAS reads, quotes and prices, unsigned swap and DCA transactions, token data and account usage.
@carbium/mcp is an MCP server that gives an AI client Carbium's RPC, DAS, quote, swap, DCA, token, docs and account tools, built on @carbium/sdk. It needs Node.js 22.12 or later and an MCP client. A service key in CARBIUM_KEY adds the chain tools.
Run it
The server speaks MCP over stdio, so your MCP client starts it, and it writes its logs to stderr. With no key it lists the three keyless tools: carbium_docs_search, carbium_tokens and carbium_dca.
npx -y @carbium/mcp# stderr: carbium-mcp: v0.1.0; service key none; account key none; writes off
Claude Code
This command adds the server to Claude Code. The service key comes from your shell's CARBIUM_KEY when the command runs.
claude mcp add carbium --env CARBIUM_KEY="$CARBIUM_KEY" -- npx -y @carbium/mcpClaude Desktop
Add the entry to claude_desktop_config.json, found in ~/Library/Application Support/Claude/ on macOS, %APPDATA%\Claude\ on Windows and ~/.config/Claude/ on Linux. This file does not expand variables, so you write the key into it in place of the placeholder.
{ "mcpServers": { "carbium": { "command": "npx", "args": ["-y", "@carbium/mcp"], "env": { "CARBIUM_KEY": "<your c_serv_ key>" } } }}
Cursor
Cursor reads ~/.cursor/mcp.json, or .cursor/mcp.json in a project. A variable from your environment is written ${env:NAME}.
{ "mcpServers": { "carbium": { "type": "stdio", "command": "npx", "args": ["-y", "@carbium/mcp"], "env": { "CARBIUM_KEY": "${env:CARBIUM_KEY}" } } }}
VS Code
VS Code with Copilot reads .mcp.json at the workspace root or ~/.copilot/mcp-config.json. An existing .vscode/mcp.json takes the same entry under a top-level servers key, with the variable written ${env:CARBIUM_KEY}.
{ "mcpServers": { "carbium": { "type": "stdio", "command": "npx", "args": ["-y", "@carbium/mcp"], "env": { "CARBIUM_KEY": "${CARBIUM_KEY}" }, "tools": ["*"] } }}
Codex
Codex reads ~/.codex/config.toml. env_vars passes CARBIUM_KEY through from your environment.
[mcp_servers.carbium]command = "npx"args = ["-y", "@carbium/mcp"]env_vars = ["CARBIUM_KEY"]
Container
The image runs the same server over stdio as a non-root user and works with --read-only. Pass -i and never -t, and add -e CARBIUM_ACCOUNT_KEY for the account tools.
docker run -i --rm -e CARBIUM_KEY ghcr.io/carbium-sh/carbium-mcp:0.1.0Tools
The server lists a tool only when it has the key that tool needs.
# Service key (c_serv_...): carbium_rpc, carbium_das, carbium_swapexport CARBIUM_KEY="<your c_serv_ key>"# Account API key (c_acct_...): carbium_accountexport CARBIUM_ACCOUNT_KEY="<your c_acct_ key>"# Lists carbium_account_write; a read-only account key is still refusedexport CARBIUM_MCP_ALLOW_WRITES=1
Safety
The server is read-only by default. No tool signs, sends or moves funds, and the swap and DCA tools return one unsigned transaction for the user's own wallet to sign. Every answer is marked as untrusted data, keys are redacted from all output, and the write tool is listed only with CARBIUM_MCP_ALLOW_WRITES=1 and an account key. A call made with a read-only account key is refused.
claude mcp add carbium --env CARBIUM_ACCOUNT_KEY="$CARBIUM_ACCOUNT_KEY" --env CARBIUM_MCP_ALLOW_WRITES=1 -- npx -y @carbium/mcp@carbium/mcp on npm · Source on GitHub · Agent plugin for Claude Code, Cursor and Codex · Model Context Protocol specification