Polymarket MCP Server
A Model Context Protocol server that enables seamless integration with Polymarket, providing tools to search markets, fetch events, analyze leaderboards, query user activity, and more via MCP-compatible clients like Claude.
README
Polymarket MCP Server
<div align="center">
A Model Context Protocol (MCP) server for seamless Polymarket integration
</div>
🚀 Overview
Polymarket MCP Server provides a comprehensive toolkit for accessing Polymarket data through the Model Context Protocol. This server enables seamless integration with Claude and other MCP clients, allowing you to search markets, fetch events, analyze leaderboards, query user activity, and much more.
✨ Features
- 📊 Market Search & Browsing - List and search Polymarket markets with advanced filtering, pagination, and sorting
- 📅 Event Management - Discover and retrieve detailed information about Polymarket events
- 🏷️ Tag System - Browse available tags for categorizing and filtering markets and events
- 🏆 Leaderboard Data - Access trader rankings based on profitability and volume
- 👤 User Analytics - Get detailed user activity including trades, splits, and merges
- 💼 Wallet Analysis - Query trades and holdings for specific wallet addresses
- 📈 Market Insights - View top holders, open interest, and live volume data
- 🔍 Full Search - Comprehensive search across markets, events, and profiles
🛠️ Available Tools
Market Tools
list_markets- List Polymarket markets with optional filtering by tags, pagination, and sortingsearch_polymarket- Search Polymarket markets, events, and profiles using the public search APIget_market_by_slug- Fetch a specific Polymarket market by its slug identifier
Event Tools
list_events- List Polymarket events with optional filtering by tags, pagination, and sortingget_event_by_slug- Fetch a specific Polymarket event by its slug identifierget_live_volume- Get live volume data for a specific Polymarket event
Analytics Tools
get_open_interest- Get open interest data for Polymarket marketsget_top_holders- Get top holders for specified Polymarket marketsget_leaderboard- Fetch Polymarket trader leaderboard rankings (most profitable / highest volume traders)
User & Wallet Tools
get_user_activity- Get user activity from Polymarket including trades, splits, merges, and rewardsget_trades_by_wallet- Get all trades for a Polymarket wallet address using the public Data API
Category Tools
list_tags- List all available Polymarket tags for filtering markets and events
📦 Installation
Prerequisites
- Node.js (v18 or higher)
- pnpm (or npm/yarn)
Setup
- Clone the repository
git clone https://github.com/yashhsm/polymarket-mcp.git
cd polymarket-mcp
- Install dependencies
pnpm install
- Build the project
pnpm build
- Start the server
pnpm start
🔧 Usage
This MCP server can be used with any MCP-compatible client. Configure your client to connect to this server's stdio transport, and you'll have access to all available Polymarket tools.
Example: Using with Claude Desktop
Add this configuration to your Claude Desktop config file (typically located at ~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"polymarket": {
"command": "node",
"args": ["/absolute/path/to/polymarket-mcp/dist/index.js"]
}
}
}
Note: Replace /absolute/path/to/polymarket-mcp with the actual absolute path to your cloned repository.
Example Queries
Once configured, you can ask Claude:
- "Show me the top 10 trending Polymarket markets"
- "What are the current odds for the 2024 election markets?"
- "Who are the top traders on Polymarket this month?"
- "Search for markets related to cryptocurrency"
- "Show me live volume data for a specific event"
🏗️ Development
Building
pnpm build
Development Mode
Run with hot reload:
pnpm dev
Running Tests
pnpm test
Evaluation Mode
pnpm eval
📁 Project Structure
src/
├── index.ts # Main MCP server setup and tool registration
├── constants.ts # Configuration constants and API endpoints
├── eval.ts # Evaluation utilities
├── prompt-evals.ts # Prompt evaluation functions
└── tools/ # Tool implementations
├── index.ts # Tool exports
├── markets.ts # Market-related tools
├── events.ts # Event-related tools
├── leaderboard.ts # Leaderboard tools
├── user.ts # User activity tools
└── ... # Additional tool implementations
🔌 API Integration
This server integrates with the following Polymarket public APIs:
- Markets API - For market data and search functionality
- Events API - For event information and details
- User API - For user activity and wallet data
- Leaderboard API - For trader rankings and statistics
- Data API - For trades, holders, and volume data
🛠️ Technology Stack
- Node.js - JavaScript runtime environment
- TypeScript - Type-safe JavaScript development
- MCP SDK - Model Context Protocol SDK
- Zod - Schema validation and type safety
🤝 Contributing
Contributions are welcome! If you'd like to contribute:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
💬 Support
For issues, feature requests, or questions:
- Issues: Use the GitHub Issues page
- Discussions: Join the GitHub Discussions
🙏 Acknowledgments
- Built with the Model Context Protocol
- Data provided by Polymarket
<div align="center">
Made with ❤️ by the Polymarket MCP community
</div>
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。