Polymarket MCP Server

A Model Context Protocol (MCP) server for Polymarket's Gamma Markets API.

Local serverstdio

What is the Polymarket MCP server?

A Model Context Protocol (MCP) server for Polymarket's Gamma Markets API. Exposed over MCP by the polymarket mcp server, that capability becomes something an assistant can invoke while it works, not something you go and do afterwards.

What it actually does

  • Market and Event data access
  • List all available markets and events with extensive filtering options
  • Get detailed market and event information
  • Search markets by keyword
  • Get order book data
  • View recent trades

Its toolset

Everything the assistant can do here goes through one of these:

  • get_markets — Market Data
  • get_market_by_id — Market Data
  • get_order_book — Market Data
  • get_recent_trades — Market Data
  • get_market_history — Market Data
  • search_markets — Market Data
  • get_events — Event Data
  • get_event_by_id — Event Data
  • Testing — The project includes a comprehensive test suite that ensures functionality and helps prevent regressions

Configuration

You will need 2 environment variables: GAMMA_API_URL, GAMMA_REQUIRES_AUTH. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

Adding it to your client

Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client. The configuration blocks on this page cover the common clients.

When to reach for it

This sits in the cloud and infrastructure group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Polymarket's toolset — get_markets, get_market_by_id, get_order_book and 6 more — is a fair guide to whether it matches your workflow. It is maintained by pab1it0; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Caveats

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 9 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Polymarket.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the polymarket mcp server does with a few real requests.

Available tools

ToolWhat it does
get_marketsMarket Data
get_market_by_idMarket Data
get_order_bookMarket Data
get_recent_tradesMarket Data
get_market_historyMarket Data
search_marketsMarket Data
get_eventsEvent Data
get_event_by_idEvent Data
TestingThe project includes a comprehensive test suite that ensures functionality and helps prevent regressions.

How to install the Polymarket MCP server

{
  "mcpServers": {
    "polymarket": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-e", "GAMMA_API_URL",
        "-e", "GAMMA_REQUIRES_AUTH",
        "polymarket-mcp-server"
      ],
      "env": {
        "GAMMA_API_URL": "https://gamma-api.polymarket.com",
        "GAMMA_REQUIRES_AUTH": "false"
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
GAMMA_API_URLEndpoint or connection string the server talks to.Yes
GAMMA_REQUIRES_AUTHConfiguration value read at startup.Optional

Example prompts to try

  • Use Polymarket to get markets.
  • Use Polymarket to get market by id.
  • Use Polymarket to get order book.

Frequently asked questions

It uses Polymarket's Gamma Markets API, with the environment variable `GAMMA_API_URL` defaulting to `https://gamma-api.polymarket.com`.