Rubin Exchange — Claude Code MCP server: trading
A remote MCP server for reading market and account data and trading spot assets or perpetual futures through AI agents.
claude mcp add --transport http rubin-exchange https://mcp.mainnet.rubin.trade/mcpWhat Rubin Exchange does
Rubin Exchange connects an AI agent to the Rubin decentralized exchange through a hosted remote MCP server using streamable HTTP. It exposes markets, order books, candles, balances, equity, positions, open orders, fills, and PnL.
The trading tools cover market and limit orders, cancellations, stop-loss, take-profit, cancel-all, and batch cancellation. Funds stay in your custody, while trading access is granted through a scoped token that you create yourself.
Create an MCP token in Rubin under Trading Keys → MCP Token before connecting. Account and trading requests require the Authorization: Bearer <token> header.
What it helps with
- read live market and order-book data
- inspect balances, positions, and PnL
- place or cancel a trading order
- set stop-loss and take-profit orders
Example prompts for the agent
- Show Rubin markets and their current order books.
- Check my balances, positions, open orders, and PnL.
- Place a limit order and attach a stop-loss.
How to install Rubin Exchange
Platform CLI: remote server
claude mcp add --transport http rubin-exchange https://mcp.mainnet.rubin.trade/mcpPlatform CLI: remote server
codex mcp add rubin-exchange --url https://mcp.mainnet.rubin.trade/mcpConfig file
{
"mcpServers": {
"rubin-exchange": {
"url": "https://mcp.mainnet.rubin.trade/mcp"
}
}
}Config file
{
"servers": {
"rubin-exchange": {
"type": "http",
"url": "https://mcp.mainnet.rubin.trade/mcp"
}
}
}Platform CLI: remote server
gemini mcp add -t http rubin-exchange https://mcp.mainnet.rubin.trade/mcpStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Rubin Exchange
How do I install Rubin Exchange in Claude Code?
Run claude mcp add --transport http rubin-exchange https://mcp.mainnet.rubin.trade/mcp.
What does Rubin Exchange do?
It gives an AI agent access to Rubin market and account data, plus order operations for spot trading and perpetual futures.
What is required to trade through Rubin Exchange?
Create an MCP token in Rubin through Trading Keys → MCP Token, then send it as a Bearer token. Account and trading calls require authorization.