
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
-
Clone the repository
git clone cd polymarket-mcp -
Install dependencies
npm install -
Build the project
npm run build -
Start the server
npm start
🔧 Configuration
Claude Desktop Integration
Method 1: Stdio Mode (Recommended for Development)
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"]
}
}
}
Method 2: SSE Mode (Recommended for Production)
-
Install Supergateway
npm install -g supergateway -
Start SSE server
npm run sse -
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
安装
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"]
}
}
}