Get the FREE Ultimate OpenClaw Setup Guide →

polymarket

šŸ¤– AI-Powered MCP Server for Polymarket - Enable Claude to trade prediction markets with 45 tools, real-time monitoring, and enterprise-grade safety features

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
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:

  1. Clone the repository: git clone https://github.com/caiovicentino/polymarket-mcp-server.git cd polymarket-mcp-server

  2. Create and activate a virtual environment: python -m venv venv

    macOS/Linux

    source venv/bin/activate

    Windows

    venv\Scripts\activate

  3. Install the package in editable mode: pip install -e .

  4. 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
  5. 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

  6. 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

Sponsor this space

Reach thousands of developers ↗