@midaslabs/mcp
v1.0.2
Published
Midas AI trading MCP server — use Midas from Claude, Cursor, and any MCP client
Downloads
205
Readme
Midas MCP Server (@midaslabs/mcp)
Trade crypto, equities, and prediction markets — and read your portfolio — directly from Claude, Cursor, or any MCP-compatible client, using the Midas AI trading tools.
@midaslabs/mcp is a small local server you run via npx. It bridges your MCP client to the hosted Midas MCP endpoint, authenticated by a Midas API key. No local wallet, no secrets beyond the key. Every tool runs against the Midas API as your account.
Quick start
Get an API key — in the Midas web app: Settings → API keys (Developer) → Create key. Copy the
midas_live_…value (shown once).Add it to your MCP client config:
Claude Desktop (
~/Library/Application Support/Claude/claude_desktop_config.jsonon macOS):{ "mcpServers": { "midas": { "command": "npx", "args": ["-y", "@midaslabs/mcp"], "env": { "MIDAS_API_KEY": "midas_live_your_key_here" } } } }Cursor (
.cursor/mcp.jsonin your project, or the global Cursor MCP settings):{ "mcpServers": { "midas": { "command": "npx", "args": ["-y", "@midaslabs/mcp"], "env": { "MIDAS_API_KEY": "midas_live_your_key_here" } } } }Restart the client. The Midas tools appear automatically.
What you can do
- "Show my portfolio" / "What's my P&L?"
- "What's the price of ETH?" / "Search for BONK"
- "Preview a swap of $100 USDC into SOL" → confirm to execute
- "Bet $50 on Brazil to win on Polymarket"
- "Open a 2x long on BTC perps"
The full tool set (prices, market data, portfolio/positions, swaps, perps, Polymarket, World Cup markets) is whatever the Midas server exposes — this package proxies all of them, so it stays in sync with the API automatically.
Trades require confirmation. Fund-moving actions (swaps, perps) return a preview; the agent confirms via a dedicated step before anything executes. This is enforced server-side.
Configuration
| Env var | Required | Default | Purpose |
| --------------- | -------- | -------------- | --------------------------------------------------------------------------------------------------------------- |
| MIDAS_API_KEY | yes | — | Your midas_live_… key. Missing → the server exits with a clear error. |
| MIDAS_API_URL | no | the hosted API | Override the API base (e.g. http://localhost:3000 for local dev). The MCP endpoint is ${MIDAS_API_URL}/mcp. |
How it works
Claude / Cursor ──stdio──► @midaslabs/mcp (this package) ──HTTPS + Bearer key──► Midas /mcpIt's a thin bridge: it doesn't reimplement any trading logic. It connects to the hosted Midas MCP server as a client and proxies tools/list + tools/call through. So all tools, all auth, and all trade safety live on the server — this package just makes them reachable from a local stdio MCP client.
Troubleshooting
- "MIDAS_API_KEY … not set" — add the
envblock above with a real key. - Tools don't appear — restart the MCP client after editing the config; check the key isn't revoked.
- Local dev — set
MIDAS_API_URL=http://localhost:3000and make sure the API (with the/mcpendpoint) is running.
Requirements
- Node.js ≥ 18.
- A Midas account + API key.
