Metadata-Version: 2.4
Name: polymarket-mcp
Version: 0.1.3
Summary: The simplest MCP server for Polymarket prediction-market data
Project-URL: Homepage, https://polycoolapp.com
Project-URL: Documentation, https://github.com/polycool/polymarket-mcp
Project-URL: Repository, https://github.com/polycool/polymarket-mcp
Project-URL: Polycool App, https://polycoolapp.com
Project-URL: Polycool Telegram Bot, https://t.me/polycoolapp_bot
Project-URL: Issues, https://github.com/polycool/polymarket-mcp/issues
Author: Polycool
License-Expression: MIT
Keywords: ai-agents,mcp,model-context-protocol,polycool,polymarket,polymarket-analytics,polymarket-data,prediction-markets
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.10
Requires-Dist: fastmcp>=2.0.0
Requires-Dist: httpx>=0.27.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: python-dotenv>=1.0.0
Description-Content-Type: text/markdown

# Polymarket MCP Server

**The simplest way to query Polymarket prediction-market data with AI agents.**

Built by [Polycool](https://polycoolapp.com) — track & copy top Polymarket traders in one tap.

[![PyPI](https://img.shields.io/pypi/v/polymarket-mcp.svg)](https://pypi.org/project/polymarket-mcp/)
[![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)

---

## What is this?

A lightweight **Model Context Protocol (MCP) server** that gives any AI agent instant access to [Polymarket](https://polymarket.com) prediction-market data — search markets, check probabilities, analyse liquidity, track price history, and more.

Built with [FastMCP](https://github.com/jlowin/fastmcp) in pure Python. Part of the [Polycool](https://polycoolapp.com) ecosystem.

## Why does this exist?

AI agents need **real-time data feeds** to be useful. Prediction markets are one of the best sources of crowd-sourced probability estimates on world events.

This project bridges the gap:

- **No trading.** Read-only market data.
- **No wallets.** No blockchain signing, no private keys.
- **No complexity.** Seven tools, zero configuration.

Just plug it into Claude Desktop, Cursor, or any MCP-compatible client and start asking questions about the future.

---

## Tools

| Tool | Description |
|------|-------------|
| `search_markets` | Full-text search across all markets (e.g. "Bitcoin", "NBA", "election") |
| `trending_markets` | Top markets ranked by 24-hour volume |
| `new_markets` | Most recently launched markets |
| `markets_closing_soon` | Markets resolving within N hours |
| `market_summary` | Detailed probability, volume, liquidity, spread & metadata |
| `market_orderbook` | Live orderbook with bids, asks, spread & last trade price |
| `market_price_history` | Historical price data with min, max, and % change over any time window |

---

## Quick Install

### Prerequisites

Install [uv](https://docs.astral.sh/uv/) (fast Python package manager):

```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
```

### Cursor

Add to your `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` (per-project):

**macOS / Linux:**

```json
{
  "mcpServers": {
    "polymarket": {
      "command": "/Users/YOUR_USERNAME/.local/bin/uvx",
      "args": ["--python", "3.11", "polymarket-mcp"]
    }
  }
}
```

**Windows:**

```json
{
  "mcpServers": {
    "polymarket": {
      "command": "uvx",
      "args": ["--python", "3.11", "polymarket-mcp"]
    }
  }
}
```

> **Note:** On macOS/Linux, Cursor may not find `uvx` in your PATH. Use the full path instead — run `which uvx` in your terminal to find it.

Restart Cursor. The Polymarket tools appear in the tool list.

### Claude Desktop

Add to your config file:

- **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
- **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`

```json
{
  "mcpServers": {
    "polymarket": {
      "command": "uvx",
      "args": ["--python", "3.11", "polymarket-mcp"]
    }
  }
}
```

### pip

```bash
pip install polymarket-mcp
polymarket-mcp
```

---

## Example Prompts

Once connected, try asking your AI agent:

> "Show me the top 10 trending markets on Polymarket"

> "Find all markets about Bitcoin"

> "Which markets resolve in the next 24 hours?"

> "Give me a detailed summary of this market"

> "Show me the price history for this market over the last week"

> "What does the orderbook look like for this market?"

---

## Example Output

```json
{
  "market_id": "21742",
  "question": "Will Bitcoin exceed $100,000 by June 2026?",
  "probability": 0.72,
  "volume_24h": 245000,
  "volume_total": 8900000,
  "liquidity": 620000,
  "best_bid": 0.71,
  "best_ask": 0.73,
  "spread": 0.02,
  "category": "Crypto",
  "end_date": "2026-06-30T00:00:00Z",
  "active": true
}
```

---

## APIs Used

| API | Purpose |
|-----|---------|
| [Polymarket Gamma API](https://gamma-api.polymarket.com) | Market data, events, full-text search |
| [Polymarket CLOB API](https://clob.polymarket.com) | Orderbook, price history, last trade price |

Both APIs are **public and free**. No API key required.

---

## Built by Polycool

This MCP server is built and maintained by the [Polycool](https://polycoolapp.com) team.

**Polycool** lets you track and copy top Polymarket traders — insiders and smart wallets — in one tap.

- [polycoolapp.com](https://polycoolapp.com) — Web app
- [@polycoolapp_bot](https://t.me/polycoolapp_bot) — Telegram bot for instant alerts and copy-trading
- Backed by the **Polymarket Builder Program**

---

## License

MIT

---

*polymarket api, polymarket mcp server, prediction market api, polymarket data, polymarket analytics, polymarket python, polymarket ai agent, model context protocol, polycool, polymarket copy trading, polymarket telegram bot*
