polymarket-trader-mcp
Polymarket Trader MCP Server
Trade, analyze, and automate Polymarket prediction markets through AI.
The most comprehensive MCP server for Polymarket — 48 tools spanning direct trading, market discovery, smart money tracking, copy trading, backtesting, risk management, and portfolio optimization. Works with Claude Code, Cursor, or any MCP-compatible client.
Tool Overview
Category | Count | Highlights |
Discovery | 9 | Search, trending, featured, events, related markets, smart money flow |
Analysis | 8 | AI opportunity scoring, conviction rating, price history, market quality, top holders, comparison |
Trading | 8 | Buy, sell, batch orders, limit orders, order management, safety limits |
Copy Trading | 5 | Watch traders, auto-monitor, auto-rebalance, backtest |
Portfolio | 10 | Positions, P&L, balance, risk assessment, SL/TP, optimization, market alerts |
Utilities | 8 | Dashboard, config, trade history, watchlists, agent logging |
Related MCP server: Polymarket MCP Server
Quick Start
One-Line Install
curl -fsSL https://raw.githubusercontent.com/demwick/polymarket-trader-mcp/main/install.sh | bashnpm Install
npm install -g polymarket-trader-mcpDocker
docker compose upClaude Code Config
Add to ~/.claude/settings.json:
{
"mcpServers": {
"polymarket": {
"command": "npx",
"args": ["polymarket-trader-mcp"]
}
}
}Usage Examples
Just talk naturally to your AI assistant:
"What are the trending markets today?"
"Search for bitcoin prediction markets"
"Buy $5 on this market"
"Score this trader — should I copy them?"
"Backtest this trader with $10 per trade"
"Show smart money flow — what are the top traders buying?"
"Set stop-loss at 0.30 on my BTC position"
"Optimize my portfolio with a balanced strategy"
"Scan for arbitrage opportunities"
"Compare these two markets side by side"
All 48 Tools
Discovery
Tool | Description |
| Search markets by keyword (bitcoin, election, UFC...) |
| Find top traders by PnL and volume |
| Find markets by end date and category |
| Top markets by 24h/7d/30d volume |
| Most liquid markets by category (politics, sports, crypto...) |
| WTA tennis markets with stink bid prices |
| Smart money signals — multiple top traders buying same market |
| Find markets related to a topic or market |
| Browse all markets under an event |
Analysis
Tool | Description |
| AI-powered BUY/SELL/HOLD recommendation |
| Detailed trader profile, win rate, P&L |
| Conviction score (0-100) across 5 dimensions |
| Market quality — spread, depth, price range |
| Live bid/ask/spread prices |
| Historical prices with sparkline (1h to 1m) |
| Biggest position holders in a market |
| Side-by-side comparison of 2-5 markets |
Trading
Tool | Description |
| Buy shares on any market |
| Sell an open position |
| Execute up to 10 orders at once |
| Place limit orders at discount |
| Cancel all open orders |
| View pending limit orders |
| Check status of a specific order |
| Switch from preview to live mode |
Copy Trading
Tool | Description |
| Add/remove traders from watchlist |
| Start automatic copy trading loop |
| Stop monitoring |
| Remove underperforming traders |
| Simulate copying a trader's past trades |
Portfolio & Risk
Tool | Description |
| Account balance, budget, and P&L |
| Multi-wallet overview with P&L per trader |
| Open/closed positions |
| Manually close a position |
| Set stop-loss and take-profit levels |
| Check positions for resolution |
| Portfolio risk scoring and warnings |
| AI-powered optimization (conservative/balanced/aggressive) |
| Market watchlist with price alerts |
| Find YES+NO price discrepancies |
Configuration
Tool | Description |
| Update bot settings |
| Max order size, exposure cap, spread tolerance |
| Terminal-formatted dashboard |
| Trade history with filters |
| Show watched wallets |
| Log agent cycle for dashboard |
| View a trader's open positions |
| WTA tennis market discovery |
Architecture
Claude Code / Cursor / AI Client
|
| MCP Protocol (stdio)
v
+------------------+
| MCP Server | 48 tools registered
| (index.ts) |
+--------+---------+
|
+----+----+
| |
Tools Services
| |
v v
+-------+ +------------+
| Zod | | Backtester |
| Input | | Scorer |
| Valid. | | SmartFlow |
+-------+ | Filter |
| Tracker |
| Executor |
+-----+------+
|
+-------+-------+
| | |
Data Gamma CLOB
API API APIHTTP Transport & Deployment
The server supports two transport modes:
Mode | Activation | Use case |
stdio (default) |
| Claude Code, Cursor, local MCP clients |
HTTP |
| Smithery, Railway, Docker, remote hosting |
Starting in HTTP mode
# Flag
node dist/index.js --http
# Or set PORT (defaults to 3000)
PORT=8080 node dist/index.jsEndpoints
Path | Method | Description |
| POST | MCP protocol endpoint (Streamable HTTP transport) |
| GET | Health check — returns |
| GET | Server discovery card for Smithery |
| GET | Server info with version and endpoint list |
Authentication
Set MCP_API_KEY to require Bearer token auth on the /mcp endpoint:
MCP_API_KEY=my-secret-key node dist/index.js --http
# Clients must send: Authorization: Bearer my-secret-keyWhen MCP_API_KEY is not set, the /mcp endpoint is open (suitable for local/private networks).
Docker deployment
The included Dockerfile builds a multi-stage production image that runs in HTTP mode:
docker build -t polymarket-mcp .
docker run -p 3000:3000 -v mcp-data:/app/data \
-e MCP_API_KEY=my-secret-key \
-e DAILY_BUDGET=50 \
polymarket-mcpDB_PATH (default /app/data/copytrader.db) controls where SQLite data is persisted — mount a volume to keep it across restarts.
Configuration
Variable | Required | Default | Description |
| No |
|
|
| No |
| Max daily spend in USDC |
| No |
| Min trade size to copy ($) |
| Live only | - | Polymarket wallet private key |
| Live only | - | CLOB API key |
| Live only | - | CLOB API secret |
| Live only | - | CLOB API passphrase |
Safety Features
Configurable order size limits
Total exposure caps
Per-market position limits
Minimum liquidity requirements
Maximum spread tolerance
Stop-loss / take-profit automation
Preview mode (default) — no real money
Development
git clone https://github.com/demwick/polymarket-trader-mcp.git
cd polymarket-trader-mcp
npm install
npm run build
npm test # 200+ testsLicense
MIT - see LICENSE
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/demwick/polymarket-trader-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server