A community-driven registry for Claude, Cursor, Windsurf, Cline & more. Not affiliated with Anthropic.
Are you the author? Sign in to claim
🤖 AI-Powered MCP Server for Polymarket - Enable Claude to trade prediction markets with 45 tools, real-time monitoring,
Complete AI-Powered Trading Platform for Polymarket Prediction Markets
Enable Claude to autonomously trade, analyze, and manage positions on Polymarket with 45 comprehensive tools, real-time WebSocket monitoring, and enterprise-grade safety features.
Developed in collaboration with:
Powered by Claude Code from Anthropic
| 🔍 Market Discovery 8 tools | 📊 Market Analysis 10 tools | 💼 Trading 12 tools | 📈 Portfolio 8 tools | ⚡ Real-time 7 tools |
NEW: Manage and monitor your Polymarket MCP Server with a modern web interface!
# Start the web dashboard
polymarket-web
# Or use the quick start script
./start_web_dashboard.sh
Access at: http://localhost:8080
See WEB_DASHBOARD.md for complete documentation.
Try DEMO mode first (no wallet needed):
# macOS/Linux
curl -sSL https://raw.githubusercontent.com/caiovicentino/polymarket-mcp-server/main/quickstart.sh | bash
# Or clone and run locally
git clone https://github.com/caiovicentino/polymarket-mcp-server.git
cd polymarket-mcp-server
./quickstart.sh
Full installation (with trading):
# macOS/Linux
./install.sh
# Windows
install.bat
The automated installer will:
| Method | Command | Best For |
|---|---|---|
| Quick Start | ./quickstart.sh | First-time users, testing |
| DEMO Mode | ./install.sh --demo | No wallet, read-only access |
| Full Install | ./install.sh | Production trading setup |
| Windows | install.bat | Windows users |
DEMO Mode (No wallet required):
Full Mode (Requires Polygon wallet):
If you prefer manual setup:
# Clone the repository
git clone https://github.com/caiovicentino/polymarket-mcp-server.git
cd polymarket-mcp-server
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install the package
pip install -e .
Option 1: DEMO Mode (easiest)
cp .env.example .env
# Edit .env and set:
DEMO_MODE=true
Option 2: Full Trading Mode
cp .env.example .env
# Edit with your Polygon wallet credentials
nano .env
Required credentials (Full Mode):
POLYGON_PRIVATE_KEY=your_private_key_without_0x_prefix
POLYGON_ADDRESS=0xYourPolygonAddress
Recommended Safety Limits:
MAX_ORDER_SIZE_USD=1000
MAX_TOTAL_EXPOSURE_USD=5000
MAX_POSITION_SIZE_PER_MARKET=2000
MIN_LIQUIDITY_REQUIRED=10000
MAX_SPREAD_TOLERANCE=0.05
ENABLE_AUTONOMOUS_TRADING=true
REQUIRE_CONFIRMATION_ABOVE_USD=500
Add to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"polymarket": {
"command": "/path/to/your/venv/bin/python",
"args": ["-m", "polymarket_mcp.server"],
"cwd": "/path/to/polymarket-mcp-server",
"env": {
"POLYGON_PRIVATE_KEY": "your_private_key",
"POLYGON_ADDRESS": "0xYourAddress"
}
}
}
}
Restart Claude Desktop and you're ready to trade! 🎉
┌─────────────────────────────────────────────────────────────┐
│ POLYMARKET MCP SERVER │
└─────────────────────────────────────────────────────────────┘
┌──────────────┐
│ Claude │
│ Desktop │ (Natural language interface)
└──────┬───────┘
│ MCP Protocol
▼
┌──────────────────────────────────────────────┐
│ MCP Server (Python) │
├──────────────────────────────────────────────┤
│ ┌────────────┐ ┌──────────────────────┐ │
│ │ Market │ │ Trading │ │
│ │ Discovery │ │ Engine │ │
│ │ (8 tools) │ │ (12 tools) │ │
│ └────────────┘ └──────────────────────┘ │
│ │
│ ┌────────────┐ ┌──────────────────────┐ │
│ │ Market │ │ Portfolio │ │
│ │ Analysis │ │ Manager │ │
│ │ (10 tools)│ │ (8 tools) │ │
│ └────────────┘ └──────────────────────┘ │
│ │
│ ┌──────────────────────────────────────┐ │
│ │ Real-time WebSocket (7 tools) │ │
│ └──────────────────────────────────────┘ │
└──────────────┬───────────────────────────────┘
│
▼
┌──────────────────────────────────────────────┐
│ Polymarket Infrastructure │
├──────────────────────────────────────────────┤
│ • CLOB API (Order placement & management) │
│ • Gamma API (Market data & analytics) │
│ • WebSocket (Real-time price feeds) │
│ • Polygon Chain (Settlement & execution) │
└──────────────────────────────────────────────┘
Ask Claude:
"Show me the top 10 trending markets on Polymarket in the last 24 hours"
"Find all crypto markets about Bitcoin"
"What sports markets are closing in the next 12 hours?"
"Search for markets about Trump"
"Analyze the trading opportunity for the government shutdown market"
"Compare these three markets and tell me which has the best risk/reward"
"What's the current spread on the Eagles vs Packers market?"
"Show me the orderbook depth for token ID xyz"
"Buy $100 of YES tokens in [market_id] at $0.65"
"Place a limit order: sell 200 NO at $0.40 in [market]"
"Execute a smart trade: buy YES up to $500 in [market] using best strategy"
"Cancel all my open orders in the government shutdown market"
"Rebalance my position in [market] to $1000 with max 2% slippage"
"Show me all my current positions"
"What's my total portfolio value?"
"Analyze my portfolio risk and suggest improvements"
"What's my P&L for the last 30 days?"
"Which are my best and worst performing markets?"
"Suggest portfolio optimizations for a conservative strategy"
"Subscribe to price changes for the government shutdown markets"
"Monitor my order status in real-time"
"Alert me when the Eagles vs Packers market moves more than 10%"
"Show me real-time orderbook updates for [token_id]"
# Install dev dependencies
pip install -e ".[dev]"
# Run all tests
pytest
# Run specific test suite
pytest tests/test_trading_tools.py -v
# Run with coverage
pytest --cov=polymarket_mcp --cov-report=html
# Run market analysis demo
python demo_mcp_tools.py
Note: All tests use real Polymarket APIs - NO MOCKS!
MAX_ORDER_SIZE_USD=1000 # Maximum $1,000 per order
MAX_TOTAL_EXPOSURE_USD=5000 # Maximum $5,000 total exposure
MAX_POSITION_SIZE_PER_MARKET=2000 # Maximum $2,000 per market
MIN_LIQUIDITY_REQUIRED=10000 # Minimum $10,000 market liquidity
MAX_SPREAD_TOLERANCE=0.05 # Maximum 5% spread
REQUIRE_CONFIRMATION_ABOVE_USD=500 # Confirm orders over $500
These can be customized in your .env file or Claude Desktop config.
Contributions are welcome! We appreciate your help making this project better.
Please read CONTRIBUTING.md for details on:
git checkout -b feature/AmazingFeature)git commit -m 'Add some AmazingFeature')git push origin feature/AmazingFeature)This project is licensed under the MIT License - see the LICENSE file for details.
This project was made possible by:
Special thanks to all contributors and community members who have helped improve this project!
This software is provided for educational and research purposes. Trading prediction markets involves financial risk.
Important Reminders:
The authors and contributors are not responsible for any financial losses incurred through the use of this software.
Thanks to everyone who has contributed to this project!
Built with ❤️ for autonomous AI trading on Polymarket
Ready to make Claude your personal prediction market trader! 🚀
Native macOS app to monitor Claude AI usage limits and watch your coding sessions live
干净、强大、属于你的 AI Agent 平台 --AI agents, without the clutter.
npx CLI installing 100+ agents, commands, hooks, and integrations in one command
Pocket Flow: Codebase to Tutorial