PolyMarket MCP Server
Servidor MCP de PolyMarket
Un servidor de Protocolo de Contexto de Modelo (MCP) que proporciona acceso a datos de predicción de mercado a través de la API de PolyMarket. Este servidor implementa una interfaz estandarizada para recuperar información de mercado, precios y datos históricos de los mercados de predicción.
Características
Datos de mercado de predicción en tiempo real con precios y probabilidades actuales
Información detallada del mercado, incluidas categorías, fechas de resolución y descripciones
Datos históricos de precios y volumen con marcos de tiempo personalizables (1 día, 7 días, 30 días, todos)
Manejo de errores integrado y gestión de límites de velocidad
Formato de datos limpio para un fácil consumo
Related MCP server: Polymarket MCP Server
Instalación
Instalación mediante herrería
Para instalar PolyMarket Predictions para Claude Desktop automáticamente a través de Smithery :
npx -y @smithery/cli install polymarket_mcp --client claudeEscritorio de Claude
En MacOS:
~/Library/Application\ Support/Claude/claude_desktop_config.jsonEn Windows:
%APPDATA%/Claude/claude_desktop_config.json
"mcpServers": {
"polymarket-mcp": {
"command": "uv",
"args": [
"--directory",
"/Users/{INSERT_USER}/YOUR/PATH/TO/polymarket-mcp",
"run",
"polymarket-mcp" //or src/polymarket_mcp/server.py
],
"env": {
"KEY": "<insert poly market api key>",
"FUNDER": "<insert polymarket wallet address"
}
}
}Ejecutando localmente
Clonar el repositorio e instalar las dependencias:
Instalar bibliotecas
uv pip install -e .Correr
Después de conectar el cliente Claude con la herramienta MCP a través del archivo json e instalar los paquetes, Claude debería ver las herramientas mcp del servidor:
Puede ejecutar el servidor usted mismo a través de: En el repositorio polymarket-mcp:
uv run src/polymarket_mcp/server.py*Si desea ejecutar el inspector del servidor junto con el servidor:
npx @modelcontextprotocol/inspector uv --directory C:\\Users\\{INSERT_USER}\\YOUR\\PATH\\TO\\polymarket-mcp run src/polymarket_mcp/server.pyCree un archivo
.envcon su clave API de PolyMarket:
Key=your_api_key_here
Funder=poly market wallet addressDespués de conectar el cliente Claude con la herramienta MCP a través del archivo json, ejecute el servidor: En el repositorio alpha-vantage-mcp: uv run src/polymarket_mcp/server.py
Herramientas disponibles
El servidor implementa cuatro herramientas:
get-market-info: Obtenga información detallada sobre un mercado de predicción específicolist-markets: Lista de mercados de predicción disponibles con opciones de filtradoget-market-prices: Obtenga precios actuales e información comercialget-market-history: Obtenga datos históricos de precios y volumen
obtener información del mercado
Esquema de entrada:
{
"market_id": {
"type": "string",
"description": "Market ID or slug"
}
}Ejemplo de respuesta:
Title: Example Market
Category: Politics
Status: Open
Resolution Date: 2024-12-31
Volume: $1,234,567.89
Liquidity: $98,765.43
Description: This is an example prediction market...
---mercados de listas
Esquema de entrada:
{
"status": {
"type": "string",
"description": "Filter by market status",
"enum": ["open", "closed", "resolved"]
},
"limit": {
"type": "integer",
"description": "Number of markets to return",
"default": 10,
"minimum": 1,
"maximum": 100
},
"offset": {
"type": "integer",
"description": "Number of markets to skip (for pagination)",
"default": 0,
"minimum": 0
}
}Ejemplo de respuesta:
Available Markets:
ID: market-123
Title: US Presidential Election 2024
Status: Open
Volume: $1,234,567.89
---
ID: market-124
Title: Oscar Best Picture 2024
Status: Open
Volume: $234,567.89
---obtener precios de mercado
Esquema de entrada:
{
"market_id": {
"type": "string",
"description": "Market ID or slug"
}
}Ejemplo de respuesta:
Current Market Prices for US Presidential Election 2024
Outcome: Democratic
Price: $0.6500
Probability: 65.0%
---
Outcome: Republican
Price: $0.3500
Probability: 35.0%
---obtener el historial del mercado
Esquema de entrada:
{
"market_id": {
"type": "string",
"description": "Market ID or slug"
},
"timeframe": {
"type": "string",
"description": "Time period for historical data",
"enum": ["1d", "7d", "30d", "all"],
"default": "7d"
}
}Ejemplo de respuesta:
Historical Data for US Presidential Election 2024
Time Period: 7d
Time: 2024-01-20T12:00:00Z
Price: $0.6500
Volume: $123,456.78
---
Time: 2024-01-19T12:00:00Z
Price: $0.6300
Volume: $98,765.43
---Manejo de errores
El servidor incluye un manejo integral de errores para diversos escenarios:
Limitación de velocidad (errores 429)
Claves API no válidas (errores 403)
ID de mercado no válidos (errores 404)
Problemas de conectividad de red
Condiciones de tiempo de espera de la API (tiempo de espera de 30 segundos)
Respuestas malformadas
Los mensajes de error se devuelven en un formato claro y legible para humanos.
Prerrequisitos
Python 3.9 o superior
httpx>=0.24.0
núcleo mcp
python-dotenv>=1.0.0
Contribuyendo
¡Agradecemos sus contribuciones! No dude en enviar una solicitud de incorporación de cambios. Para cambios importantes, primero abra una incidencia para comentar qué desea cambiar.
Available Tools
4 toolsget-market-historyC
Get historical price and volume data for a market
| Name | Required | Description | Default |
|---|---|---|---|
| market_id | Yes | Market ID or slug | |
| timeframe | No | Time period for historical data | 7d |
get-market-infoC
Get detailed information about a specific prediction market
| Name | Required | Description | Default |
|---|---|---|---|
| market_id | Yes | Market ID or slug |
get-market-pricesB
Get current prices and trading information for a market
| Name | Required | Description | Default |
|---|---|---|---|
| market_id | Yes | Market ID or slug |
list-marketsB
Get a list of prediction markets with optional filters
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Number of markets to return (default: 10) | |
| offset | No | Number of markets to skip (for pagination) | |
| status | No | Filter by market status (e.g., open, closed, resolved) |
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
v1.0.0- First observed
get-market-history - First observed
get-market-info - First observed
get-market-prices - First observed
list-markets
TDQS
Scored across 4 tools
The tools have overlapping purposes that could cause confusion. get-market-history, get-market-info, and get-market-prices all retrieve data about a specific market, making it unclear which to use for different needs. However, the descriptions provide some guidance on the type of data each returns (historical vs. current vs. detailed info), which helps reduce misselection.
All tool names follow a consistent verb_noun pattern with hyphens (e.g., get-market-history, list-markets). The naming is predictable and uniform across all four tools, making it easy for agents to understand the pattern and purpose at a glance.
With only 4 tools, the server feels thin for a prediction market domain, which typically involves actions like creating markets, placing bets, or managing positions. While the tools cover data retrieval well, the lack of operational tools (e.g., trade, create-market) suggests the scope is limited, bordering on under-provisioned for the apparent purpose.
There are significant gaps in the tool surface for a prediction market server. The tools only support read-only operations (get and list), with no ability to interact with markets (e.g., trade, resolve, create). This will cause agent failures when trying to perform common actions in this domain, as the surface is severely incomplete for the stated purpose.
Maintenance
Related MCP Connectors
Fetches live Polymarket prediction market orderbooks, implied Yes/No probabilities, volume, and wh
Read-only Polymarket search, market details, order books, price history, and market cards.
Polymarket in your AI: market rules, real fill costs, who is trading, top traders. Read-only.
Fetches live Polymarket prediction market orderbooks, implied Yes/No probabilities, volume, and w.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceEnables interaction with Polymarket prediction markets through read-only access to market data, events, orderbooks, and user positions, plus authenticated trading capabilities for creating and managing orders.1-
- AlicenseAqualityDmaintenanceEnables AI assistants to interact with Polymarket prediction markets, including retrieving market data, user positions, and trading history.821 npm12Apache 2.0
- AlicenseNot gradedqualityCmaintenanceProvides access to Polymarket prediction-market data via Gamma and CLOB public APIs, enabling AI agents to query market information.295 npmMIT
- AlicenseBqualityDmaintenanceEnables LLM agents to interact with Polymarket prediction markets, including market discovery, real-time pricing, analytics, account management, and trading with built-in safety guards.34MIT