GP

guangxiangdebizi/polymarket-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

12 stars 7 forks 质量 63 趋势 19Apache-2.0

A comprehensive Model Context Protocol (MCP) server for interacting with Polymarket, the world's largest prediction market platform.

概览

A comprehensive Model Context Protocol (MCP) server for interacting with Polymarket, the world's largest prediction market platform. This server provides seamless access to Polymarket's APIs, enabling AI assistants to retrieve market data, user positions, trading history, and more. - : Retrieve prediction markets with filtering and pagination - : Access event data containing multiple related markets - : Real-time and historical price data with technical analysis - : Live bid/ask data with market depth analysis - : Comprehensive trading data with statistics - : Portfolio tracking with P&L calculations - : On-chain activity including trades, splits, merges, and rewards - : Ownership distribution and concentration analysis - Liquidity analysis and market depth - Price trend analysis and volatility metrics - Portfolio performance tracking - Market concentration and distribution insights - Node.js 18+ - TypeScript 5.

README

以下为原文 README 节选,完整内容请查看原文。

Polymarket MCP Server

A comprehensive Model Context Protocol (MCP) server for interacting with Polymarket, the world’s largest prediction market platform. This server provides seamless access to Polymarket’s APIs, enabling AI assistants to retrieve market data, user positions, trading history, and more.

🚀 Features

Market Data

  • Get Markets: Retrieve prediction markets with filtering and pagination
  • Get Events: Access event data containing multiple related markets
  • Market Prices: Real-time and historical price data with technical analysis
  • Order Book: Live bid/ask data with market depth analysis

Trading & Activity

  • Trade History: Comprehensive trading data with statistics
  • User Positions: Portfolio tracking with P&L calculations
  • User Activity: On-chain activity including trades, splits, merges, and rewards
  • Market Holders: Ownership distribution and concentration analysis

Advanced Analytics

  • Liquidity analysis and market depth
  • Price trend analysis and volatility metrics
  • Portfolio performance tracking
  • Market concentration and distribution insights

📦 Installation

Prerequisites

  • Node.js 18+
  • TypeScript 5.3+
  • npm or yarn

Setup

  1. Clone the repository

    git clone 
    cd polymarket-mcp
    
  2. Install dependencies

    npm install
    
  3. Build the project

    npm run build
    
  4. Start the server

    npm start
    

🔧 Configuration

Claude Desktop Integration

Add to your Claude Desktop configuration file:

Windows: %APPDATA%\Claude\claude_desktop_config.json macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Linux: ~/.config/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "polymarket-mcp": {
      "command": "node",
      "args": ["path/to/polymarket-mcp/build/index.js"]
    }
  }
}
  1. Install Supergateway

    npm install -g supergateway
    
  2. Start SSE server

    npm run sse
    
  3. Configure Claude Desktop

    {
      "mcpServers": {
        "polymarket-mcp": {
          "type": "sse",
          "url": "http://localhost:3100/sse",
          "timeout": 600
        }
      }
    }
    

🛠️ Available Tools

1. Get Markets

get_markets({
  limit?: number,           // Max results (default: 20, max: 100)
  offset?: number,          // Pagination offset
  active?: boolean,         // Filter by active status
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "polymarket-mcp": { "command": "node", "args": ["path/to/polymarket-mcp/build/index.js"] } } }