Polymarket Mcp

io.github.0xChron由 GitHub 帳號 0xChron 發布v0.1.1更新於 Oct 24, 2026

Read-only Polymarket prediction market data for AI agents.

已驗證STDIO僅桌面金融資料與分析

概覽

AI 產生的概覽

唯讀的 MCP 伺服器,為助理提供 Polymarket 預測市場資料:市場搜尋、詳情、熱門事件、持倉者、排行榜與錢包統計。

可以做什麼
依標題或描述搜尋市場,並依 slug 或連結取得單一市場的完整詳情,以及依成交量、流動性或競爭度排序的熱門事件。查詢某個市場各結果的前段持倉者。讀取依損益或成交量排序的交易者排行榜。查看某個錢包的未平倉部位及其投資組合價值、損益、成交量與排行榜名次。參考資源說明 Polymarket 術語與工具使用流程,提示詞可執行市場研究、交易者比較與熱門掃描。
適用情境
適合讓助理研究預測市場、比較交易者或錢包、掃描 Polymarket 熱門事件,而不必離開對話。不適用於交易或訂單簿資料,這些它並不提供。
執行需求
需要 Python 3.12+ 與 uv(或 Docker);Node.js 僅供選用的 MCP Inspector 使用。伺服器以 streamable HTTP 在 本機執行,必須先啟動再讓 MCP 用戶端連線。無需 API 金鑰或錢包簽章;需要連線至 Polymarket 公開的 Gamma 與 Data API。
安裝前請注意
唯讀:無法下單交易,也不讀取訂單簿。你查詢的錢包地址會傳送到 Polymarket 的公開 API,應視為公開資料。綁定到 0.0.0.0(例如在 Docker 中)會讓伺服器暴露於 localhost 之外。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Polymarket Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

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_trending_marketsTrending events ranked by volume, liquidity, or competitiveness
get_market_holdersTop holders per outcome for a market (by condition ID, slug, or URL)
get_leaderboardTop traders ranked by P&L or volume
get_user_positionsOpen positions for a wallet address
get_user_performancePortfolio value, P&L, volume, and leaderboard rank for one wallet

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

Resources

Static reference context (no API calls). Attach in MCP clients or read via Inspector.

URIDescription
polymarket://glossaryEvent, market, slug, conditionId, and wallet terminology
polymarket://categoriesLeaderboard categories, time periods, and tag slugs
polymarket://tool-guideWhen to use each tool and chaining workflows

Prompts

User-triggered workflow templates that orchestrate tools:

PromptDescription
research_marketMarket details → holders → research summary (slug or market_link)
compare_tradersSide-by-side performance and positions for two wallets
scan_trendingTrending events scan with optional tag_slug and limit

Requirements

  • Python 3.12+
  • uv (recommended) or Docker
  • Node.js (optional, only for MCP Inspector)

Quick start

This server uses streamable HTTP at http://127.0.0.1:8000/mcp. Start the server first, then connect your MCP client to that URL.

bash
git clone https://github.com/0xChron/polymarket-mcp.gitcd polymarket-mcpuv syncuv run polymarket-mcp

On Windows, use the same commands in PowerShell, Command Prompt, or Git Bash. Leave the terminal open while your MCP client is connected.

Docker

Works the same on all platforms if Docker Desktop is installed:

bash
git clone https://github.com/0xChron/polymarket-mcp.gitcd polymarket-mcpdocker build -t polymarket-mcp .docker run --rm -p 8000:8000 -e FASTMCP_HOST=0.0.0.0 polymarket-mcp

FASTMCP_HOST=0.0.0.0 lets the server accept connections from outside the container.

Verify the server

Open MCP Inspector in another terminal:

bash
npx -y @modelcontextprotocol/inspector

Connect 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 (see Quick start), then add the config below to your MCP client.

Claude Desktop

Go to Claude → Settings → Developer → Edit Config to open claude_desktop_config.json, then include the following:

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

If you already have other MCP servers configured, add the "polymarket" entry inside your existing mcpServers object instead of replacing the whole file.

Config file location if you prefer to edit it manually:

PlatformPath
macOS~/Library/Application Support/Claude/claude_desktop_config.json
Windows%APPDATA%\Claude\claude_desktop_config.json

Save the file and fully quit and restart Claude Desktop. The server must be running in a terminal before you start a new chat.

Cursor

Go to Settings → Tools & MCP → New MCP Server to open ~/.cursor/mcp.json (Windows: %USERPROFILE%\.cursor\mcp.json), then add the same polymarket entry:

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

Restart Cursor after saving.

Example agent prompts

Once connected, an agent can call tools naturally:

  • "Search Polymarket for active markets about Bitcoin ETFs"
  • "What are the trending markets right now?"
  • "Who are the top holders of the Trump election market?"
  • "Show the all-time P&L leaderboard for crypto traders"
  • "Get details for https://polymarket.com/event/will-bitcoin-hit-100k"
  • "Show open positions for wallet 0x…"
  • "What is the all-time P&L and leaderboard rank for 0x…?"

In MCP Inspector, try the Prompts tab (e.g. research_market) or read Resources for the glossary and tool guide.

Configuration

Optional environment variables override API endpoints and server settings.

macOS / Linux / Git Bash

bash
export FASTMCP_HOST=0.0.0.0export FASTMCP_PORT=8000uv run polymarket-mcp

Windows (PowerShell)

powershell
$env:FASTMCP_HOST = "0.0.0.0"$env:FASTMCP_PORT = "8000"uv run polymarket-mcp
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

bash
uv run polymarket-mcp          # Start the serveruv run pytest                  # Run testsnpx -y @modelcontextprotocol/inspector   # Open MCP Inspectordocker build -t polymarket-mcp .         # Build Docker image

On macOS/Linux, make run, make test, and similar shortcuts in the Makefile wrap the same commands.

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

License

MIT — see LICENSE.

來源:README.md,提交 2471b59

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分