Skip to main content
Glama
berlinbra

PolyMarket MCP Server

by berlinbra

PolyMarket MCP サーバー

鍛冶屋のバッジ

PolyMarket APIを通じて予測市場データへのアクセスを提供するモデルコンテキストプロトコル(MCP)サーバー。このサーバーは、予測市場から市場情報、価格、履歴データを取得するための標準化されたインターフェースを実装しています。

特徴

  • 現在の価格と確率を含むリアルタイム予測市場データ

  • カテゴリ、解決日、説明を含む詳細な市場情報

  • カスタマイズ可能な時間枠(1日、7日、30日、すべて)の過去の価格と取引量のデータ

  • 組み込みのエラー処理とレート制限管理

  • 簡単に消費できるクリーンなデータフォーマット

Related MCP server: Polymarket MCP Server

インストール

Smithery経由でインストール

Smithery経由で Claude Desktop 用の PolyMarket Predictions を自動的にインストールするには:

npx -y @smithery/cli install polymarket_mcp --client claude

クロードデスクトップ

  • MacOSの場合: ~/Library/Application\ Support/Claude/claude_desktop_config.json

  • Windows の場合: %APPDATA%/Claude/claude_desktop_config.json

    "mcpServers": {
        "polymarket-mcp": {
            "command": "uv",
            "args": [
            "--directory",
            "/Users/{INSERT_USER}/YOUR/PATH/TO/polymarket-mcp",
            "run",
            "polymarket-mcp" //or src/polymarket_mcp/server.py
            ],
            "env": {
                "KEY": "<insert poly market api key>",
                "FUNDER": "<insert polymarket wallet address"
            }
        }
    }

ローカルで実行

  1. リポジトリをクローンし、依存関係をインストールします。

ライブラリをインストールする

uv pip install -e .

ランニング

json ファイル経由で Claude クライアントを MCP ツールに接続し、パッケージをインストールすると、Claude はサーバーの mcp ツールを確認できるようになります。

以下の方法でサーバーを自分で実行できます: polymarket-mcp リポジトリ内:

uv run src/polymarket_mcp/server.py

*サーバーと一緒にサーバーインスペクターを実行する場合:

npx @modelcontextprotocol/inspector uv --directory C:\\Users\\{INSERT_USER}\\YOUR\\PATH\\TO\\polymarket-mcp run src/polymarket_mcp/server.py
  1. PolyMarket API キーを使用して.envファイルを作成します。

Key=your_api_key_here
Funder=poly market wallet address

Claude クライアントを json ファイル経由で MCP ツールに接続した後、サーバーを実行します。alpha-vantage-mcp リポジトリで、 uv run src/polymarket_mcp/server.py実行します。

利用可能なツール

サーバーは 4 つのツールを実装します。

  • get-market-info : 特定の予測市場に関する詳細情報を取得する

  • list-markets : フィルタリングオプションを使用して利用可能な予測市場を一覧表示する

  • get-market-prices : 現在の価格と取引情報を取得する

  • get-market-history : 過去の価格と取引量データを取得する

市場情報を取得する

入力スキーマ:

{
    "market_id": {
        "type": "string",
        "description": "Market ID or slug"
    }
}

応答例:

Title: Example Market
Category: Politics
Status: Open
Resolution Date: 2024-12-31
Volume: $1,234,567.89
Liquidity: $98,765.43
Description: This is an example prediction market...
---

リスト市場

入力スキーマ:

{
    "status": {
        "type": "string",
        "description": "Filter by market status",
        "enum": ["open", "closed", "resolved"]
    },
    "limit": {
        "type": "integer",
        "description": "Number of markets to return",
        "default": 10,
        "minimum": 1,
        "maximum": 100
    },
    "offset": {
        "type": "integer",
        "description": "Number of markets to skip (for pagination)",
        "default": 0,
        "minimum": 0
    }
}

応答例:

Available Markets:

ID: market-123
Title: US Presidential Election 2024
Status: Open
Volume: $1,234,567.89
---

ID: market-124
Title: Oscar Best Picture 2024
Status: Open
Volume: $234,567.89
---

市場価格を取得する

入力スキーマ:

{
    "market_id": {
        "type": "string",
        "description": "Market ID or slug"
    }
}

応答例:

Current Market Prices for US Presidential Election 2024

Outcome: Democratic
Price: $0.6500
Probability: 65.0%
---

Outcome: Republican
Price: $0.3500
Probability: 35.0%
---

市場履歴を取得する

入力スキーマ:

{
    "market_id": {
        "type": "string",
        "description": "Market ID or slug"
    },
    "timeframe": {
        "type": "string",
        "description": "Time period for historical data",
        "enum": ["1d", "7d", "30d", "all"],
        "default": "7d"
    }
}

応答例:

Historical Data for US Presidential Election 2024
Time Period: 7d

Time: 2024-01-20T12:00:00Z
Price: $0.6500
Volume: $123,456.78
---

Time: 2024-01-19T12:00:00Z
Price: $0.6300
Volume: $98,765.43
---

エラー処理

サーバーには、さまざまなシナリオに対応する包括的なエラー処理機能が含まれています。

  • レート制限(429エラー)

  • 無効な API キー (403 エラー)

  • 無効なマーケットID(404エラー)

  • ネットワーク接続の問題

  • APIタイムアウト条件(30秒タイムアウト)

  • 不正な応答

エラー メッセージは、明確で人間が読める形式で返されます。

前提条件

  • Python 3.9以上

  • httpx>=0.24.0

  • mcp-core

  • python-dotenv>=1.0.0

貢献

貢献を歓迎します!お気軽にプルリクエストを送信してください。大きな変更については、まずIssueを開いて、変更したい点について議論してください。

Install Server
A
license - permissive license
B
quality
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables access to Polymarket's prediction markets for analyzing market probabilities, trading activity, and event outcomes across politics, sports, crypto, and other categories through natural language queries.
    15
    10
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables interaction with Polymarket prediction markets through read-only access to market data, events, orderbooks, and user positions, plus authenticated trading capabilities for creating and managing orders.
    1

View all related MCP servers

Related MCP Connectors

  • Polymarket MCP — prediction-market data via Gamma + CLOB public APIs.

  • Polymarket + Hyperliquid + macro for AI agents. 38 tools, signal backtest, SSE streaming. Free tier.

  • Classify Polymarket wallets as human or bot, score their trading edge, read open positions.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/berlinbra/polymarket-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server