Skip to main content
Glama

Polymarket MCP Tool

A Model Context Protocol (MCP) tool for interacting with Polymarket through Claude Desktop.

Prerequisites

  • Claude Desktop App for Mac

  • Python 3.8+

Related MCP server: Polymarket MCP Server

Installation

  1. Clone this repository:

git clone https://github.com/fernandezpablo85/polymarket-mcp.git
cd polymarket-mcp
  1. Install uv if you haven't already:

curl -LsSf https://astral.sh/uv/install.sh | sh
  1. Install dependencies:

uv sync

Configure Claude Desktop

  1. Open Claude Desktop configuration directory:

open ~/Library/Application\ Support/Claude
  1. Create or edit claude_desktop_config.json:

touch ~/Library/Application\ Support/Claude/claude_desktop_config.json
  1. Add the following configuration:

{
  "mcpServers": {
    "polymarket": {
      "command": "/Users/YOUR_USERNAME/.local/bin/uv",
      "args": [
        "--directory",
        "/Users/YOUR_USERNAME/projects/polymarket-mcp",
        "run",
        "main.py"
      ]
    }
  }
}

Replace YOUR_USERNAME with your actual macOS username.

Usage

Invoke the tool via Claude Desktop.

Troubleshooting

  • If tools don't appear in Claude Desktop:

    • Verify your claude_desktop_config.json is correct

    • Restart Claude Desktop

    • Check your Python path and dependencies

  • If authentication fails:

    • Verify your .env file has correct credentials

    • Check Polymarket API status

License

MIT

Contributing

Feel free to open issues or submit pull requests.

Available Tools

3 tools
prediction_markets_markets_by_topicA

Call after you have a Polymarket topic slug (from the user or prediction_markets_trending_topics) and need the top markets under it.

Parameters

topic_slug : str Identifier such as "trump-presidency". limit : int, default 10 Number of markets to return, ranked by 24-hour volume (desc).

Returns

str JSON array of objects with the schema: [ { "title": "Trump to win 2024?", "volume": 123456.78, "outcomes": [ {"option": "Yes", "probability": 0.42}, {"option": "No", "probability": 0.58} ] }, … ] Parse with json.loads.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
topic_slugYes

TDQS

A4.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key traits: it's a read operation (implied by 'returns'), specifies ranking criteria ('ranked by 24-hour volume (desc)'), and details the return format (JSON array with schema). However, it doesn't mention potential errors, rate limits, or authentication needs, leaving some behavioral aspects uncovered.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded: the first sentence states the purpose and usage context, followed by a structured 'Parameters' and 'Returns' section. Every sentence earns its place by providing critical information without redundancy, making it efficient and well-organized.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (2 parameters, no annotations, no output schema), the description is complete enough. It covers purpose, usage guidelines, parameter semantics, and detailed return format (including schema and parsing instructions). The absence of an output schema is compensated by the thorough 'Returns' section, ensuring the agent can understand and use the tool effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Given 0% schema description coverage, the description fully compensates by explaining both parameters: 'topic_slug' is described as an 'Identifier such as "trump-presidency"', and 'limit' as 'Number of markets to return, ranked by 24-hour volume (desc)' with a default value. This adds essential meaning beyond the bare schema, making the parameters clear and actionable.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Call after you have a Polymarket topic slug... and need the top markets under it') and distinguishes it from sibling tools by mentioning when to use it versus 'prediction_markets_trending_topics' for obtaining the slug. It specifies the verb ('need the top markets') and resource ('markets under [a topic]'), making the purpose explicit and differentiated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use this tool: 'Call after you have a Polymarket topic slug (from the user or `prediction_markets_trending_topics`)'. It distinguishes from the sibling 'prediction_markets_trending_topics' by indicating that tool as a source for the slug, and implicitly contrasts with 'search_prediction_markets' by focusing on top markets by topic rather than a general search.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_prediction_marketsB

Search prediction markets by any term.

Parameters

search_term : str Identifier such as "argentina".

Returns

str JSON array of objects with the schema: [ { "title": "Trump to win 2024?", "volume": 123456.78, "outcomes": [ {"option": "Yes", "probability": 0.42}, {"option": "No", "probability": 0.58} ] }, … ] Parse with json.loads.

ParametersJSON Schema
NameRequiredDescriptionDefault
search_termYes

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It clearly describes the search functionality and output format, including the JSON structure and parsing instruction. However, it lacks details on rate limits, authentication needs, error handling, or whether this is a read-only operation (implied by 'Search' but not explicit). The description adds useful context but misses some behavioral traits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (purpose, parameters, returns) and front-loaded key information. Every sentence adds value, such as the parsing instruction. It's appropriately sized for a single-parameter tool, though the returns section is detailed, which is necessary given the lack of output schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (1 parameter, no output schema, no annotations), the description is fairly complete. It covers the purpose, parameter semantics, and output format in detail, which is crucial since there's no output schema. However, it lacks sibling differentiation and some behavioral context, which slightly reduces completeness for an agent's decision-making.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds significant meaning beyond the input schema, which has 0% description coverage. It explains that 'search_term' is an 'Identifier such as "argentina"', providing a concrete example and clarifying it's a string for searching. This compensates well for the schema's lack of documentation, though it could elaborate on format constraints or examples.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('Search') and resource ('prediction markets'), and specifies the search scope ('by any term'). However, it doesn't explicitly differentiate from sibling tools like 'prediction_markets_markets_by_topic' or 'prediction_markets_trending_topics', which likely have different search approaches or criteria.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus its siblings. It mentions searching 'by any term' but doesn't clarify if this is for general keyword searches, while siblings might filter by topic or trending status. There are no explicit when-to-use or when-not-to-use instructions, leaving the agent to infer usage from tool names alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A3.8/5.0
Disambiguation4/5

The three tools have distinct primary purposes: getting trending topics, fetching markets by topic, and searching markets by term. However, there is some functional overlap between `prediction_markets_markets_by_topic` and `search_prediction_markets` as both return market data, which could cause minor confusion about when to use each.

Naming Consistency5/5

All tool names follow a consistent snake_case pattern with a clear `prediction_markets_` prefix and descriptive suffixes (`trending_topics`, `markets_by_topic`, `search_prediction_markets`). The naming is predictable and follows a logical structure throughout.

Tool Count3/5

With only 3 tools, the server feels somewhat thin for a prediction markets domain. While the tools cover basic discovery and search functionality, the limited count suggests potential gaps in comprehensive market interaction capabilities that might be expected from such a service.

Completeness3/5

The tools provide good discovery and search capabilities but lack any market interaction functions (like placing bets, viewing user positions, or managing portfolios). For a prediction markets server, this represents notable gaps in the full lifecycle of market participation, though the provided tools work well together for information gathering.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    A Model Context Protocol (MCP) server for Polymarket prediction markets, providing real-time market data, prices, and AI-powered analysis tools for Claude Desktop integration.
    48
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    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.
    37
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/fernandezpablo85/polymarket-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server