PolyMarket MCP Server
A Model Context Protocol (MCP) server that provides access to prediction market data through the PolyMarket API. This server implements a standardized interface for retrieving market information, prices, and historical data from prediction markets.
Features
- Real-time prediction market data with current prices and probabilities
- Detailed market information including categories, resolution dates, and descriptions
- Historical price and volume data with customizable timeframes (1d, 7d, 30d, all)
- Built-in error handling and rate limit management
- Clean data formatting for easy consumption
Installation
Installing via Smithery
To install PolyMarket Predictions for Claude Desktop automatically via Smithery:
Claude Desktop
- On MacOS:
~/Library/Application\ Support/Claude/claude_desktop_config.json
- On Windows:
%APPDATA%/Claude/claude_desktop_config.json
Running Locally
- Clone the repository and install dependencies:
Install Libraries
Running
After connecting Claude client with the MCP tool via json file and installing the packages, Claude should see the server's mcp tools:
You can run the sever yourself via: In polymarket-mcp repo:
*if you want to run the server inspector along with the server:
- Create a
.env
file with your PolyMarket API key:
After connecting Claude client with the MCP tool via json file, run the server:
In alpha-vantage-mcp repo: uv run src/polymarket_mcp/server.py
Available Tools
The server implements four tools:
get-market-info
: Get detailed information about a specific prediction marketlist-markets
: List available prediction markets with filtering optionsget-market-prices
: Get current prices and trading informationget-market-history
: Get historical price and volume data
get-market-info
Input Schema:
Example Response:
list-markets
Input Schema:
Example Response:
get-market-prices
Input Schema:
Example Response:
get-market-history
Input Schema:
Example Response:
Error Handling
The server includes comprehensive error handling for various scenarios:
- Rate limiting (429 errors)
- Invalid API keys (403 errors)
- Invalid market IDs (404 errors)
- Network connectivity issues
- API timeout conditions (30-second timeout)
- Malformed responses
Error messages are returned in a clear, human-readable format.
Prerequisites
- Python 3.9 or higher
- httpx>=0.24.0
- mcp-core
- python-dotenv>=1.0.0
Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
You must be authenticated.
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Enables interaction with the PolyMarket API to fetch prediction market data such as market information, prices, and historical data, with robust error handling and rate limit management.
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityReal-time cryptocurrency market data integration using CoinCap's public API, providing access to crypto prices and market information without API keysLast updated -314737TypeScriptMIT License
- AsecurityAlicenseAqualityEnables interaction with the CoinGecko Pro API to access cryptocurrency data including price history and market metrics through both MCP and OpenAI function calling.Last updated -55JavaScriptMIT License
- -securityAlicense-qualityReal-time access to cryptocurrency data from the CoinMarketCap API.Last updated -266TypeScriptMIT License
- -securityAlicense-qualityA cryptocurrency price service that provides real-time crypto pricing information through an MCP (Model Context Protocol) framework with CoinMarketCap API integration.Last updated -PythonGPL 3.0