polymcp

TanmayDhobale/polymcp

3.3

If you are the rightful owner of polymcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

A Model Context Protocol (MCP) server that provides conversational access to Polymarket prediction markets.

Tools
  1. search_markets

    Search for markets by keyword

  2. get_market_info

    Get details about a specific market

Polymarket MCP Server

A Model Context Protocol (MCP) server that provides conversational access to Polymarket prediction markets.

Features

  • Search Markets: Find prediction markets by keyword (e.g., "Solana", "nuclear", "election")
  • Get Market Info: Get detailed information about specific markets including current odds
  • Real-time Data: Fetches live market data from Polymarket's APIs

Setup

  1. Install dependencies:
npm install
  1. Build the project:
npm run build
  1. Run the server:
npm start

Development

For development with hot reload:

npm run dev

Usage Examples

Search for Solana-related markets:

"Show me Solana related markets on Polymarket"

Check specific market probabilities:

"What are the chances of a nuclear attack this year?"

Integration

To integrate this MCP server with your AI agent:

  1. Add to your MCP configuration:
{
  "polymarket": {
    "command": "node",
    "args": ["/path/to/polymcp/dist/index.js"]
  }
}
  1. The server exposes two tools:
    • search_markets: Search for markets by keyword
    • get_market_info: Get details about a specific market

Architecture

  • Built with TypeScript and MCP SDK
  • Uses Polymarket's Gamma API for market data
  • Implements real-time price fetching from CLOB API
  • Supports ES modules for modern JavaScript

Future Enhancements

  • Add historical price data
  • Support for placing orders (requires authentication)
  • WebSocket support for real-time updates
  • Market filtering by category/tags
  • Portfolio tracking capabilities