Polymarket MCP Server

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.

Category
Visit Server

README

Polymarket MCP Server

<div align="center">

A Model Context Protocol (MCP) server for seamless Polymarket integration

MIT License TypeScript Node.js

</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 sorting
  • search_polymarket - Search Polymarket markets, events, and profiles using the public search API
  • get_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 sorting
  • get_event_by_slug - Fetch a specific Polymarket event by its slug identifier
  • get_live_volume - Get live volume data for a specific Polymarket event

Analytics Tools

  • get_open_interest - Get open interest data for Polymarket markets
  • get_top_holders - Get top holders for specified Polymarket markets
  • get_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 rewards
  • get_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

  1. Clone the repository
git clone https://github.com/yashhsm/polymarket-mcp.git
cd polymarket-mcp
  1. Install dependencies
pnpm install
  1. Build the project
pnpm build
  1. 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:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. 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:

šŸ™ Acknowledgments


<div align="center">

Made with ā¤ļø by the Polymarket MCP community

</div>

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured