Skip to main content
ME

Mercado Bitcoin

v0.2.1API Key

Brazil's largest crypto exchange: BTC, ETH, and 200+ tokens. Your agent places orders, reads the orderbook, and manages wallets in BRL.

20 tools1 env vars🇧🇷 Brazilstable on npm

What your agent can do

Mercado Bitcoin gives your agent 20 tools it calls directly — pick the ones it needs, in Claude, Cursor, or any MCP client.

  • get_tickerGet ticker data for a trading pair (price, volume, etc.)
  • list_orderbookGet order book (bids and asks) for a trading pair
  • create_orderCreate a buy or sell order
Example call
// Your agent calls a tool directly — no glue code.
// CodeSpar's managed tier handles OAuth2, token rotation and rate limits.
const result = await session.call("get_ticker", { /* ... */ });

Install

terminal
$ npm install @codespar/mcp-mercado-bitcoin

Quickstart

Add this entry to your claude_desktop_config.json (or any MCP-compatible client config).

claude_desktop_config.json
{
  "mcpServers": {
    "mercado-bitcoin": {
      "command": "npx",
      "args": [
        "-y",
        "@codespar/mcp-mercado-bitcoin"
      ],
      "env": {
        "MB_API_KEY": "<your_mb_api_key>"
      }
    }
  }
}

After restart, your agent can call any of the 20 tools below — try get_ticker first.

Environment variables · 1

Required to authenticate the server. Stored encrypted when using CodeSpar managed hosting.

MB_API_KEY
requiredsecret

API key for mercado-bitcoin

Available tools · 20

Each tool is independent — your agent loads only what it needs to reduce context and response time.

READget_ticker
Get ticker data for a trading pair (price, volume, etc.)
READlist_orderbook
Get order book (bids and asks) for a trading pair
WRITEcreate_order
Create a buy or sell order
READget_order
Get order details by ID
DELETEcancel_order
Cancel an open order
READlist_orders
List orders with optional filters
READget_balance
Get account balances for all assets
READlist_trades
List executed trades for a trading pair

Compatible frameworks

MCP is a protocol — any framework that speaks it can mount this server.

Claude Agent SDKAnthropic
OpenAI AgentsOpenAI
Vercel AI SDKVercel
LangChainLangChain
LlamaIndexLlamaIndex
CrewAICrewAI
MastraMastra
Any MCP clientProtocol

Frequently asked questions

Run `npx -y @codespar/mcp-mercado-bitcoin` and add the config block above to your MCP client — Claude, Cursor, VS Code, or any MCP-compatible client. No build step, no SDK required. Prefer hosted? CodeSpar's managed tier runs it for you with auth handled.
Mercado Bitcoin — MCP server · 20 tools | CodeSpar