polymarket-trader-mcp
Trade, analyze, and automate Polymarket prediction markets via AI. 34 tools for direct trading, smart money flow, copy trading, backtest, and portfolio management.
README
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 |
Quick Start
One-Line Install
curl -fsSL https://raw.githubusercontent.com/demwick/polymarket-trader-mcp/main/install.sh | bash
npm Install
npm install -g polymarket-trader-mcp
Docker
docker compose up
Claude 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 |
Search markets by keyword (bitcoin, election, UFC...) |
discover_traders |
Find top traders by PnL and volume |
discover_markets |
Find markets by end date and category |
trending_markets |
Top markets by 24h/7d/30d volume |
featured_markets |
Most liquid markets by category (politics, sports, crypto...) |
discover_wta |
WTA tennis markets with stink bid prices |
discover_flow |
Smart money signals — multiple top traders buying same market |
find_related |
Find markets related to a topic or market |
get_market_events |
Browse all markets under an event |
Analysis
| Tool | Description |
|---|---|
analyze_opportunity |
AI-powered BUY/SELL/HOLD recommendation |
analyze_trader |
Detailed trader profile, win rate, P&L |
score_trader |
Conviction score (0-100) across 5 dimensions |
check_market |
Market quality — spread, depth, price range |
get_price |
Live bid/ask/spread prices |
get_price_history |
Historical prices with sparkline (1h to 1m) |
get_top_holders |
Biggest position holders in a market |
compare_markets |
Side-by-side comparison of 2-5 markets |
Trading
| Tool | Description |
|---|---|
buy |
Buy shares on any market |
sell |
Sell an open position |
batch_order |
Execute up to 10 orders at once |
place_stink_bid |
Place limit orders at discount |
cancel_orders |
Cancel all open orders |
get_open_orders |
View pending limit orders |
get_order_status |
Check status of a specific order |
go_live |
Switch from preview to live mode |
Copy Trading
| Tool | Description |
|---|---|
watch_wallet |
Add/remove traders from watchlist |
start_monitor |
Start automatic copy trading loop |
stop_monitor |
Stop monitoring |
rebalance |
Remove underperforming traders |
backtest_trader |
Simulate copying a trader's past trades |
Portfolio & Risk
| Tool | Description |
|---|---|
get_balance |
Account balance, budget, and P&L |
get_portfolio |
Multi-wallet overview with P&L per trader |
get_positions |
Open/closed positions |
close_position |
Manually close a position |
set_exit_rules |
Set stop-loss and take-profit levels |
check_exits |
Check positions for resolution |
assess_risk |
Portfolio risk scoring and warnings |
optimize_portfolio |
AI-powered optimization (conservative/balanced/aggressive) |
watch_market |
Market watchlist with price alerts |
detect_arbitrage |
Find YES+NO price discrepancies |
Configuration
| Tool | Description |
|---|---|
set_config |
Update bot settings |
set_safety_limits |
Max order size, exposure cap, spread tolerance |
get_dashboard |
Terminal-formatted dashboard |
get_trade_history |
Trade history with filters |
list_watchlist |
Show watched wallets |
log_cycle |
Log agent cycle for dashboard |
get_trader_positions |
View a trader's open positions |
discover_wta |
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 API
Configuration
| Variable | Required | Default | Description |
|---|---|---|---|
COPY_MODE |
No | preview |
preview (simulated) or live (real orders) |
DAILY_BUDGET |
No | 20 |
Max daily spend in USDC |
MIN_CONVICTION |
No | 3 |
Min trade size to copy ($) |
POLY_PRIVATE_KEY |
Live only | - | Polymarket wallet private key |
POLY_API_KEY |
Live only | - | CLOB API key |
POLY_API_SECRET |
Live only | - | CLOB API secret |
POLY_API_PASSPHRASE |
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+ tests
License
MIT - see LICENSE
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。