polymarket
š¤ AI-Powered MCP Server for Polymarket - Enable Claude to trade prediction markets with 45 tools, real-time monitoring, and enterprise-grade safety features
claude mcp add --transport stdio caiovicentino-polymarket-mcp-server python -m polymarket_mcp.server \ --env POLYGON_ADDRESS="0xYourPolygonAddress" \ --env POLYGON_PRIVATE_KEY="your_private_key_without_0x_prefix"
How to use
The Polymarket MCP Server provides an AI-powered trading assistant that enables Claude to autonomously monitor Polymarket markets, analyze data, and place trades within safety constraints. It exposes a suite of 45 tools across market discovery, market analysis, trading, portfolio management, and real-time monitoring, including AI-driven opportunity analysis, AI-suggested pricing, risk scoring, position rebalancing, live WebSocket feeds, and enterprise-grade safety checks such as order size limits, exposure caps, liquidity validation, and pre-trade validation. You can run the server locally and use the web dashboard for real-time status, configuration tuning, and market exploration, while Claude can leverage the 45 tools to make informed trading decisions.
How to install
Prerequisites:
- Python 3.10 or newer
- Git
- (Optional) Virtual environment tool (venv is included in Python)
Step-by-step installation:
-
Clone the repository: git clone https://github.com/caiovicentino/polymarket-mcp-server.git cd polymarket-mcp-server
-
Create and activate a virtual environment: python -m venv venv
macOS/Linux
source venv/bin/activate
Windows
venv\Scripts\activate
-
Install the package in editable mode: pip install -e .
-
Configure required credentials (demo vs full mode):
- For DEMO mode: cp .env.example .env and set DEMO_MODE=true
- For Full Trading mode: copy and edit .env with wallet credentials: POLYGON_PRIVATE_KEY=your_private_key_without_0x_prefix POLYGON_ADDRESS=0xYourPolygonAddress
-
Install optional dependencies and start the server as described in the README (manual approach):
Quick start (demo environment)
curl -sSL https://raw.githubusercontent.com/caiovicentino/polymarket-mcp-server/main/quickstart.sh | bash
-
Optional Claude Desktop integration (for Claude workflow):
- Add an mcpServers entry in Claude Desktop config as shown in the README
Notes:
- The repository provides quickstart.sh for a one-command setup and an install.sh script for a full trading setup. Follow the preferred path depending on whether you want a quick demo or a production-like environment.
Additional notes
Tips and common considerations:
- Ensure your POLYGON_PRIVATE_KEY is kept secret and never exposed in public repos.
- Adjust safety parameters in your .env file to fit your risk tolerance: MAX_ORDER_SIZE_USD, MAX_TOTAL_EXPOSURE_USD, MAX_POSITION_SIZE_PER_MARKET, MIN_LIQUIDITY_REQUIRED, MAX_SPREAD_TOLERANCE, ENABLE_AUTONOMOUS_TRADING, and REQUIRE_CONFIRMATION_ABOVE_USD.
- The web dashboard is available at http://localhost:8080 and provides real-time status, configuration sliders for safety limits, and market analyses.
- If you encounter WebSocket disconnects, enable auto-reconnect with exponential backoff and ensure network stability.
- For Claude Desktop integration, mirror the mcpServers structure shown in the README to enable seamless cross-application trading workflows.
Related MCP Servers
mcp-framework
A framework for writing MCP (Model Context Protocol) servers in Typescript
mcp -aws
A Model Context Protocol server implementation for operations on AWS resources
mcp-crypto-price
A Model Context Protocol (MCP) server that provides real-time cryptocurrency analysis via CoinCap's API. Enables Claude and other MCP clients to fetch crypto prices, analyze market trends, and track historical data.
hyperliquid
š MCP Server para Hyperliquid DEX - Trade com Claude usando linguagem natural. Desenvolvido por Caio Vicentino para as comunidades Yield Hacker, Renda Cripto e Cultura Builder
docmole
Dig through any documentation with AI - MCP server for Claude, Cursor, and other AI assistants
awesome-finance
A curated list of MCP servers for AI finance agents