Skip to main content

Typed FastMCP server for Polymarket discovery, wallet reads, and public CLOB market data.

Project description

polymarket-mcp

CI Release PyPI Python Docs

Typed FastMCP server for Polymarket discovery, wallet analytics, and public CLOB market data.

This package is intentionally read-only in 0.1.x. It helps agents and MCP clients inspect markets, wallets, books, quotes, and history without exposing authenticated trading actions.

PyPI distribution: polymarket-mcp-server
Python package: polymarket_mcp
CLI command: polymarket-mcp

Why use it

  • Stable typed models over inconsistent upstream JSON.
  • A single composed MCP server with clear gamma, data, and clob namespaces.
  • Real MCP transport coverage in pytest, including subprocess stdio tests.
  • Local PDM workflow plus trusted publishing to PyPI and Read the Docs support.

Surfaces

Surface Purpose Examples
gamma market and event discovery topic search, event lookup, metadata
data wallet reads positions, activity, trades
clob live public market state books, quotes, midpoint, spread, history
flowchart LR
    Client["MCP client / agent"] --> Server["polymarket_mcp.server"]
    Server --> Gamma["gamma server"]
    Server --> Data["data server"]
    Server --> Clob["clob server"]
    Gamma --> GAPI["Gamma API"]
    Data --> DAPI["Data API"]
    Clob --> CLOB["Public CLOB API"]

Install and run

pip install polymarket-mcp-server
polymarket-mcp

Or run it ephemerally with uvx:

uvx --from polymarket-mcp-server polymarket-mcp

For local development with PDM:

pdm install -G dev
pdm install -G docs

MCP client config

Example stdio client entry using uvx:

{
  "mcpServers": {
    "polymarket": {
      "command": "uvx",
      "args": ["--from", "polymarket-mcp-server", "polymarket-mcp"]
    }
  }
}

Quick start

pdm run mcp-inspect      # inspect the composed server surface
pdm run mcp-run          # run the stdio MCP server
pdm run test             # run the full pytest suite
pdm run test-mcp         # run MCP client/server end-to-end tests
pdm run all              # tests + docs + MCP inspect

Run the package directly:

pdm run python -m polymarket_mcp.server

Useful commands

pdm run mcp-gamma-inspect
pdm run mcp-data-inspect
pdm run mcp-clob-inspect
pdm run docs

Project layout

src/polymarket_mcp/
  models/     typed domain and tool I/O models
  services/   upstream normalization layers
  servers/    FastMCP tool/resource surfaces
  server.py   composed parent MCP server
tests/        unit and MCP end-to-end coverage
docs/         Sphinx documentation

Documentation

Development notes

  • Tool docstrings are written for LLM tool selection, not just human API reference.
  • tests/test_mcp_e2e.py now covers both in-process and subprocess MCP usage.
  • Releases publish from Git tags through GitHub Actions trusted publishing.
  • pdm run mcp-dev uses the FastMCP inspector flow; if the inspector package is not cached locally, the first run may need external package access.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

polymarket_mcp_server-0.1.2.tar.gz (27.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

polymarket_mcp_server-0.1.2-py3-none-any.whl (27.4 kB view details)

Uploaded Python 3

File details

Details for the file polymarket_mcp_server-0.1.2.tar.gz.

File metadata

  • Download URL: polymarket_mcp_server-0.1.2.tar.gz
  • Upload date:
  • Size: 27.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for polymarket_mcp_server-0.1.2.tar.gz
Algorithm Hash digest
SHA256 9d1f0d770b3d371025001866d4e38cf47f0d9f4fb9af117c764221641db812d1
MD5 e1dc5b75127fc82e73bf3965b6fdc07e
BLAKE2b-256 15808569900244664dd5ad33d0fde45cd54444d14e88f850a55fb4cf1cd01791

See more details on using hashes here.

Provenance

The following attestation bundles were made for polymarket_mcp_server-0.1.2.tar.gz:

Publisher: release.yml on pr1m8/polymarket-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file polymarket_mcp_server-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for polymarket_mcp_server-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d3b40f54046851e5434604755f6bf3285d14577b39ec4675d293be0ada119b9b
MD5 24ccdf5cd555ac169650d33ad12fd56c
BLAKE2b-256 410edb69bcf426737ecc6696087ef8cb4f86192e94ed91ab8bc39a0c9c9ea314

See more details on using hashes here.

Provenance

The following attestation bundles were made for polymarket_mcp_server-0.1.2-py3-none-any.whl:

Publisher: release.yml on pr1m8/polymarket-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page