Catalog PyPI
PACKAGE EXPLORERView in registry

0xchron-polymarket-mcp

PyPI

Read-only Polymarket prediction market data for AI agents (MCP server).

Versions collected1
Direct dependencies4From release 0.1.1
Last observed20 Oct, 15:03 UTC

README

Version 0.1.1 documentation

Polymarket MCP

MCP server that exposes read-only Polymarket prediction market data to AI agents. Tools wrap Polymarket's public Gamma (market discovery) and Data (positions, portfolio, leaderboard) APIs. There is no CLOB integration — this server cannot place trades or read order books.

Tools

ToolDescription
search_marketsSearch markets by title or description
get_market_detailsFull details for a single market (by slug or Polymarket URL)
get_user_positionsOpen positions for a wallet address
get_user_performancePortfolio value, P&L, volume, and leaderboard rank

All tools return markdown formatted for agent consumption. No API keys or wallet signing are required.

Requirements

  • Python 3.12+
  • uv (recommended) or Docker

Quick start

Clone the repo, install dependencies, and start the server:

git clone https://github.com/0xChron/polymarket-mcp.git
cd polymarket-mcp
uv sync
make run

The server listens on streamable HTTP at http://127.0.0.1:8000/mcp.

Verify it is running with the MCP Inspector:

make inspector

Connect the inspector to http://localhost:8000/mcp using the Streamable HTTP transport.

Connect from an MCP client

This server uses the streamable-http transport (not stdio). Start the server first, then point your client at the /mcp endpoint.

Cursor

Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project-scoped):

{
  "mcpServers": {
    "polymarket": {
      "url": "http://localhost:8000/mcp"
    }
  }
}

Restart Cursor (or reload the window) after saving. The server must be running before the client connects.

Claude Desktop / other HTTP clients

Any MCP client that supports streamable HTTP can connect to the same URL. Refer to your client's documentation for remote server configuration.

Example agent prompts

Once connected, an agent can call tools naturally:

Docker

Build and run the container:

make build
docker run --rm -p 8000:8000 -e FASTMCP_HOST=0.0.0.0 polymarket-mcp

FASTMCP_HOST=0.0.0.0 is required so the server accepts connections from outside the container. Then connect your MCP client to http://localhost:8000/mcp.

Configuration

Optional environment variables override API endpoints and server settings:

VariableDefaultDescription
GAMMA_URLhttps://gamma-api.polymarket.comGamma API base URL
DATA_URLhttps://data-api.polymarket.comData API base URL
DEFAULT_TIMEOUT15HTTP request timeout (seconds)
FASTMCP_HOST127.0.0.1Bind address (0.0.0.0 for Docker)
FASTMCP_PORT8000Listen port

Development

make run        # Start the server
make test       # Run tests
make inspector  # Open MCP Inspector
make build      # Build Docker image

See docs/PROJECT_KNOWLEDGE_BASE.md for architecture, conventions, and how to add new tools.

License

MIT — see LICENSE.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.121 Jun 20264

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
0xchron/polymarket-mcp

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 15:03 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:bd9ec01911a83981d6b7d3a9b6a7b1195fdeb321531fbb0020ab56192950c727