An MCP server that delivers real-time market odds from Polymarket, enabling AI agents and analysts to access, compare, and act on decentralized prediction data. - Event Retrieval: Fetch Polymarket events with details (title, description, endDate, volume) and associated markets in a tabulated format. - Market Retrieval: Retrieve markets with key fields (question, zipped outcomes and outcomePrices,
Add this skill
npx mdskills install kukapay/polymarket-predictions-mcpWell-documented MCP server providing real-time Polymarket prediction data with clear examples
1# Polymarket Predictions MCP23An MCP server that delivers real-time market odds from Polymarket, enabling AI agents and analysts to access, compare, and act on decentralized prediction data.456789## Features1011- **Event Retrieval**: Fetch Polymarket events with details (`title`, `description`, `endDate`, `volume`) and associated markets in a tabulated format.12- **Market Retrieval**: Retrieve markets with key fields (`question`, zipped `outcomes` and `outcomePrices`, `endDate`, `volume`, `closed`) in a table.13- **Event Search**: Search for events using Polymarket's `/public-search` endpoint with comprehensive query parameters.14- **Prompt Support**: Includes a prompt template for analyzing specific markets.15- **Formatted Outputs**: Uses `tabulate` for clean, readable table outputs and handles JSON parsing for outcomes and prices.1617## Installation1819### Prerequisites2021- Python 3.10 or higher22- [uv](https://docs.astral.sh/uv/) (recommended) or `pip` for dependency management2324### Setup25261. **Clone the Repository**:27 ```bash28 git clone https://github.com/kukapay/polymarket-predictions-mcp.git29 cd polymarket-predictions-mcp30 ```31322. **Install Dependencies**:33 Using `uv`:34 ```bash35 uv sync36 ```3738 Or using `pip`:39 ```bash40 pip install mcp[cli] httpx tabulate41 ```42433. **Install to Claude Desktop**:4445 Install the server as a Claude Desktop application:46 ```bash47 uv run mcp install main.py --name "Polymarket Predictions"48 ```4950 Configuration file as a reference:5152 ```json53 {54 "mcpServers": {55 "Polymarket Predictions": {56 "command": "uv",57 "args": [ "--directory", "/path/to/polymarket-predictions-mcp", "run", "main.py" ]58 }59 }60 }61 ```62 Replace `/path/to/polymarket-predictions-mcp` with your actual installation path.6364## Usage6566The server exposes three tools and one prompt:6768### Tools69701. **`get_events`**:71 Fetches a list of Polymarket events with details and their associated markets.72 - **Parameters**:73 - `limit`: Number of events (default: 10)74 - `offset`: Pagination offset (default: 0)75 - `order`: Fields to order by (e.g., `volume,markets.volume`)76 - `ascending`: Sort order (default: `False`)77 - `id`: List of event IDs78 - `slug`: List of event slugs79 - `tag_id`: Tag ID filter80 - `closed`: Filter for closed events (default: `False`)81 - **Output**: Formatted string with event details (`title`, `description`, `endDate`, `volume`) and a table of markets (`question`, `closed`, `volume`, `outcomes`, `outcomePrices`).8283 **Example**:84 - **Prompt**85 > Show me the top 2 Polymarket events by volume, including only open events, with their market details.8687 - **Sample Output**:88 ```89 ## US Presidential Election 20249091 Closed: False | End Date: 2024-11-05 | Volume: $10000009293 Predict the outcome of the 2024 US Presidential Election...9495 Markets:96 +--------------------------------------------------+----------+-----------+-------------------+-------------------+97 | Question | Closed | Volume | Outcomes | Outcome Prices |98 +==================================================+==========+===========+===================+===================+99 | Who will win the 2024 US Presidential Election? | False | $500000 | Biden, Trump | 0.45, 0.55 |100 +--------------------------------------------------+----------+-----------+-------------------+-------------------+101 | Will Biden win the 2024 election? | False | $200000 | Yes, No | 0.40, 0.60 |102 +--------------------------------------------------+----------+-----------+-------------------+-------------------+103104 ## Super Bowl LVIII105106 Closed: True | End Date: 2024-02-11 | Volume: $500000107108 Predict outcomes related to Super Bowl LVIII...109110 Markets:111 +--------------------------------------------------+----------+-----------+-------------------+-------------------+112 | Question | Closed | Volume | Outcomes | Outcome Prices |113 +==================================================+==========+===========+===================+===================+114 | Who will win Super Bowl LVIII? | True | $300000 | Chiefs, 49ers | 0.60, 0.40 |115 +--------------------------------------------------+----------+-----------+-------------------+-------------------+116 ```1171182. **`get_markets`**:119 Fetches a list of Polymarket markets with specified fields.120 - **Parameters**:121 - `limit`: Number of markets (default: 10)122 - `offset`: Pagination offset (default: 0)123 - `order`: Fields to order by (e.g., `volume`)124 - `ascending`: Sort order (default: `False`)125 - `id`: List of market IDs126 - `slug`: List of market slugs127 - `condition_ids`: List of condition IDs128 - `closed`: Filter for closed markets (default: `False`)129 - **Output**: Table with `question`, `options` (zipped `outcomes` and `outcomePrices`), `endDate`, `volume`, and `closed`.130131 **Example**:132 - **Prompt**:133 > List the top 2 Polymarket markets by trading volume, showing only open markets with their outcomes and prices.134135 - **Sample Output**:136 ```137 +--------------------------------------------------+-------------------------+---------------------+-----------+----------+138 | Question | Options | End Date | Volume | Closed |139 +==================================================+=========================+=====================+===========+==========+140 | Who will win the 2024 US Presidential Election? | {"Biden": 0.45, "Trump": 0.55} | 2024-11-05 | $500000 | False |141 +--------------------------------------------------+-------------------------+---------------------+-----------+----------+142 | Will Bitcoin reach $100K by end of 2024? | {"Yes": 0.30, "No": 0.70} | 2024-12-31 | $200000 | False |143 +--------------------------------------------------+-------------------------+---------------------+-----------+----------+144 ```1451463. **`search_events`**:147 Searches for events using the `/public-search` endpoint.148 - **Parameters**:149 - `q`: Search query (required)150 - `cache`: Use cached results151 - `events_status`: Filter by event status152 - `limit_per_type`: Results per type (default: 10)153 - `page`: Page number for pagination154 - `events_tag`: List of event tags155 - `keep_closed_markets`: Number of closed markets156 - `sort`: Field to sort by157 - `ascending`: Sort order158 - `search_tags`: Include tags in search159 - `search_profiles`: Include profiles in search160 - `recurrence`: Filter by recurrence type161 - `exclude_tag_id`: List of tag IDs to exclude162 - `optimized`: Use optimized search163 - **Output**: Formatted string with event details and markets tables, similar to `get_events`.164165 **Example**:166 - **Prompt**:167 > Search for Polymarket events about 'Bitcoin', filtering for active events with the 'crypto' tag, sorted by volume in ascending order.168169 - **Sample Output**: (Similar format to `get_events` output, with Bitcoin-related events and markets)170171### Prompt172173- **`analyze_market`**:174 A prompt template for analyzing a specific market by slug, encouraging use of tools to fetch details and provide insights on probabilities, volume, and outcomes.175176 **Example**:177 - **Prompt**:178 > Analyze the Polymarket prediction market for 'us-presidential-election-2024' and provide insights on its probabilities, trading volume, and potential outcomes.179180 - **Command**:181 ```bash182 analyze_market(market_slug="us-presidential-election-2024")183 ```184185## License186187This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.188189
Full transparency — inspect the skill content before installing.