# polymarket-agent-mcp

Connect an AI agent to Polymarket market research, trading, and portfolio tools. Use it to review markets, track traders, or manage positions.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 16
- Author: demwick
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/demwick/polymarket-agent-mcp
- Updated: 2026-10-22
- HTML: https://affpapa.org/en/nevibecode/mcp/polymarket-agent-mcp

## What it does

The server exposes 48 tools for finding markets and traders, comparing prices, reviewing positions, and spotting gaps between YES and NO prices. It can place or cancel orders, maintain a trader watchlist, and simulate copying a trader based on past trades.

Portfolio tools cover balances, positions, risk checks, and stop-loss or take-profit levels. The server also supports automatic copy trading and a switch from preview to live mode. Set `POLY_PRIVATE_KEY`, `POLY_API_KEY`, `POLY_API_SECRET`, and `POLY_API_PASSPHRASE` before connecting; the second Claude Code setup command also takes `COPY_MODE`. Live orders affect the trading account, so check the mode and safety limits before placing one.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `COPY_MODE`, `POLY_PRIVATE_KEY`, `POLY_API_KEY`, `POLY_API_SECRET`, `POLY_API_PASSPHRASE`, `POLY_FUNDER_ADDRESS`, `DAILY_BUDGET`, `MIN_CONVICTION`, `CHAIN_ID`, `DB_PATH` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env COPY_MODE=<COPY_MODE> --env POLY_PRIVATE_KEY=<POLY_PRIVATE_KEY> --env POLY_API_KEY=<POLY_API_KEY> --env POLY_API_SECRET=<POLY_API_SECRET> --env POLY_API_PASSPHRASE=<POLY_API_PASSPHRASE> --transport stdio polymarket-agent-mcp -- npx -y polymarket-agent-mcp
```
Replace <…> with your own values. 5 more environment variables are in the server README

### Codex

**Platform CLI**
```bash
codex mcp add polymarket-agent-mcp --env COPY_MODE=<COPY_MODE> --env POLY_PRIVATE_KEY=<POLY_PRIVATE_KEY> --env POLY_API_KEY=<POLY_API_KEY> --env POLY_API_SECRET=<POLY_API_SECRET> --env POLY_API_PASSPHRASE=<POLY_API_PASSPHRASE> -- npx -y polymarket-agent-mcp
```
Replace <…> with your own values. 5 more environment variables are in the server README

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "polymarket-agent-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "polymarket-agent-mcp"
            ],
            "env": {
                "COPY_MODE": "<COPY_MODE>",
                "POLY_PRIVATE_KEY": "<POLY_PRIVATE_KEY>",
                "POLY_API_KEY": "<POLY_API_KEY>",
                "POLY_API_SECRET": "<POLY_API_SECRET>",
                "POLY_API_PASSPHRASE": "<POLY_API_PASSPHRASE>"
            }
        }
    }
}
```
Replace <…> with your own values. 5 more environment variables are in the server README

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "polymarket-agent-mcp": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "polymarket-agent-mcp"
            ],
            "env": {
                "COPY_MODE": "<COPY_MODE>",
                "POLY_PRIVATE_KEY": "<POLY_PRIVATE_KEY>",
                "POLY_API_KEY": "<POLY_API_KEY>",
                "POLY_API_SECRET": "<POLY_API_SECRET>",
                "POLY_API_PASSPHRASE": "<POLY_API_PASSPHRASE>"
            }
        }
    }
}
```
Replace <…> with your own values. 5 more environment variables are in the server README

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e COPY_MODE=<COPY_MODE> -e POLY_PRIVATE_KEY=<POLY_PRIVATE_KEY> -e POLY_API_KEY=<POLY_API_KEY> -e POLY_API_SECRET=<POLY_API_SECRET> -e POLY_API_PASSPHRASE=<POLY_API_PASSPHRASE> polymarket-agent-mcp npx -y polymarket-agent-mcp
```
Replace <…> with your own values. 5 more environment variables are in the server README

## When to use it
- find Polymarket markets by topic
- compare prices and quality across markets
- assess a trader before copying their trades
- review portfolio risk and set exit levels
- spot price gaps between YES and NO

## Example prompts
- Find Polymarket markets about Bitcoin and compare their prices.
- Assess this trader and simulate copying their past trades.
- Review my portfolio risk and set a stop-loss for this position.

## Similar
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89408
- [CCXT](https://affpapa.org/en/nevibecode/mcp/ccxt.md) — MCP server · ★ 44583
- [Finance Toolkit](https://affpapa.org/en/nevibecode/mcp/finance-toolkit.md) — MCP server · ★ 5458
- [EdgarTools](https://affpapa.org/en/nevibecode/mcp/edgartools.md) — MCP server · ★ 2814
- [LetsFG — Flights & Hotels](https://affpapa.org/en/nevibecode/mcp/letsfg-flights-hotels.md) — MCP server · ★ 2188
- [AutoTS](https://affpapa.org/en/nevibecode/mcp/autots.md) — MCP server · ★ 1434

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
