Loading repository dataβ¦
Loading repository dataβ¦
caiovicentino / repository
π€ AI-Powered MCP Server for Polymarket - Enable Claude to trade prediction markets with 45 tools, real-time monitoring, and enterprise-grade safety features
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
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 a