Polymarket CLOB API Server
Expose Polymarket's public Central Limit Order Book REST API as callable tools for LLM-powered IDEs and agents. Query markets, fetch market details, and integrate prediction market data seamlessly into your AI workflows without requiring authentication. Deploy easily with Docker or any ASGI-compatible platform for fast, scalable access.
Ask AI about Polymarket CLOB API Server
Powered by Claude Β· Grounded in docs
I know everything about Polymarket CLOB API Server. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
Polymarket MCP Server
A Model Context Protocol (MCP) compliant server that exposes the public Polymarket Central Limit Order Book (CLOB) REST API as tools that any LLM-powered IDE or agent can invoke. Compatible with Cursor, Continue (VS Code), GitHub Copilot Chat, JetBrains AI Assistant, OpenAI ChatGPT (Assistants API), Smithery and any other MCP-aware interface.
β¨ Features
- πͺ Universal MCP Support β works with Cursor, Continue, Copilot, JetBrains AI, Smithery and more
- β‘ Python implementation β using native MCP protocol with async support
- π Essential endpoints out-of-the-box β list markets, fetch single market details and more
- π Stateless & no auth required β queries Polymarket's public REST endpoints; no keys needed
- π³ Docker-ready β ship & deploy anywhere in seconds
- π MIT licensed β free for personal and commercial use
π Quick Start
Local Development
# Clone the repository
git clone https://github.com/CarlosIbCu/polymarket-mcp.git
cd polymarket-mcp
# Install dependencies
pip install -r requirements.txt
# Run the server
python -m polymarket_mcp.main
Testing with MCP Inspector
You can test the server using the official MCP Inspector:
# Install and run the MCP Inspector
npx @modelcontextprotocol/inspector python -m polymarket_mcp.main
This will:
- Start the MCP server
- Launch the inspector web interface
- Provide a URL to access the inspector (usually http://localhost:6274)
The inspector allows you to:
- View available MCP tools
- Test tool calls interactively
- Inspect server capabilities
- Debug MCP protocol messages
Docker Deployment
# Build the image
docker build -t polymarket-mcp .
# Run the container
docker run -p 3333:3333 polymarket-mcp
Smithery Deployment
This server is ready for deployment on Smithery, the MCP hosting platform:
- Fork/clone this repository
- Connect your GitHub account to Smithery
- Select this repository and choose "Custom Deploy"
- Smithery will automatically detect the configuration and deploy
The smithery.yaml configuration includes:
- Container runtime settings
- Server configuration options
- Health checks
- Tool schemas
π Available Tools
list_markets
List available prediction markets with optional limit parameter.
Parameters:
limit(integer, optional): Maximum number of markets to return (default: 10)
Example:
{
"limit": 5
}
get_market
Fetch detailed information about a specific market.
Parameters:
market_id(string, required): Market ID to fetch
Example:
{
"market_id": "0x9deb0baac40648821f96f01339229a422e2f5c877de55dc4dbf981f95a1e709c"
}
π§ Configuration
Server configuration is handled via environment variables or Smithery config:
server:
host: "0.0.0.0" # Server host
port: 3333 # Server port
timeout: 30 # Request timeout in seconds
π API Documentation
- MCP Inspector: Use
npx @modelcontextprotocol/inspectorfor interactive testing - Polymarket API Docs: Official Documentation
π§ͺ Testing
# Test the Polymarket API connectivity
python test_server.py
# Run with MCP Inspector for interactive testing
npx @modelcontextprotocol/inspector python -m polymarket_mcp.main
π€ Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
π License
This project is MIT licensed. See the LICENSE file for details.
