Skip to content
Back to search

polymarket-mcp

MCP Server for PolyMarket API

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/berlinbra--polymarket-mcp/badge.svg)](/listings/berlinbra--polymarket-mcp)

HTML

<a href="/listings/berlinbra--polymarket-mcp"><img src="/api/listings/berlinbra--polymarket-mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Installing via Smithery

To install PolyMarket Predictions for Claude Desktop automatically via [Smithery](https://smithery.ai/server/polymarket_mcp):

npx -y @smithery/cli install polymarket_mcp --client claude

Claude Desktop

- On MacOS: `~/Library/Application\ Support/Claude/claude_desktop_config.json` - On Windows: `%APPDATA%/Claude/claude_desktop_config.json`

<summary>Development/Unpublished Servers Configuration</summary>

    "mcpServers": {
        "polymarket-mcp": {
            "command": "uv",
            "args": [
            "--directory",
            "/Users/{INSERT_USER}/YOUR/PATH/TO/polymarket-mcp",
            "run",
            "polymarket-mcp" //or src/polymarket_mcp/server.py
            ],
            "env": {
                "KEY": "<insert poly market api key>",
                "FUNDER": "<insert polymarket wallet address>"
            }
        }
    }

Running Locally

1. Clone the repository and install dependencies:

Install Libraries

uv pip install -e .

Running

After connecting Claude client with the MCP tool via json file and installing the packages, Claude should see the server's mcp tools:

You can run the sever yourself via: In polymarket-mcp repo:

uv run src/polymarket_mcp/server.py

*if you want to run the server inspector along with the server:

npx @modelcontextprotocol/inspector uv --directory C:\\Users\\{INSERT_USER}\\YOUR\\PATH\\TO\\polymarket-mcp run src/polymarket_mcp/server.py

2. Create a `.env` file with your PolyMarket API key:

Key=your_api_key_here
Funder=poly market wallet address

After connecting Claude client with the MCP tool via json file, run the server: In alpha-vantage-mcp repo: `uv run src/polymarket_mcp/server.py`

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 245 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # PolyMarket MCP Server
  2. [![smithery badge](https://smithery.ai/badge/polymarket_mcp)](https://smithery.ai/server/polymarket_mcp)
  3. A Model Context Protocol (MCP) server that provides access to prediction market data through the PolyMarket API. This server implements a standardized interface for retrieving market information, prices, and historical data from prediction markets.
  4. <a href="https://glama.ai/mcp/servers/c255m147fd">
  5. <img width="380" height="200" src="https://glama.ai/mcp/servers/c255m147fd/badge" alt="PolyMarket Server MCP server" />
  6. </a>
  7. [![MseeP.ai Security Assessment Badge](https://mseep.net/pr/berlinbra-polymarket-mcp-badge.png)](https://mseep.ai/app/berlinbra-polymarket-mcp)
  8. ## Features
  9. - Real-time prediction market data with current prices and probabilities
  10. - Detailed market information including categories, resolution dates, and descriptions
  11. - Historical price and volume data with customizable timeframes (1d, 7d, 30d, all)
  12. - Built-in error handling and rate limit management
  13. - Clean data formatting for easy consumption
  14. ## Installation
  15. #### Installing via Smithery
  16. To install PolyMarket Predictions for Claude Desktop automatically via [Smithery](https://smithery.ai/server/polymarket_mcp):
  17. ```bash
  18. npx -y @smithery/cli install polymarket_mcp --client claude
  19. ```
  20. #### Claude Desktop
  21. - On MacOS: `~/Library/Application\ Support/Claude/claude_desktop_config.json`
  22. - On Windows: `%APPDATA%/Claude/claude_desktop_config.json`
  23. <summary>Development/Unpublished Servers Configuration</summary>
  24. ```json
  25. "mcpServers": {
  26. "polymarket-mcp": {
  27. "command": "uv",
  28. "args": [
  29. "--directory",
  30. "/Users/{INSERT_USER}/YOUR/PATH/TO/polymarket-mcp",
  31. "run",
  32. "polymarket-mcp" //or src/polymarket_mcp/server.py
  33. ],
  34. "env": {
  35. "KEY": "<insert poly market api key>",
  36. "FUNDER": "<insert polymarket wallet address>"
  37. }
  38. }
  39. }
  40. ```
  41. ### Running Locally
  42. 1. Clone the repository and install dependencies:
  43. #### Install Libraries
  44. ```
  45. uv pip install -e .
  46. ```
  47. ### Running
  48. After connecting Claude client with the MCP tool via json file and installing the packages, Claude should see the server's mcp tools:
  49. You can run the sever yourself via:
  50. In polymarket-mcp repo:
  51. ```
  52. uv run src/polymarket_mcp/server.py
  53. ```
  54. *if you want to run the server inspector along with the server:
  55. ```
  56. npx @modelcontextprotocol/inspector uv --directory C:\\Users\\{INSERT_USER}\\YOUR\\PATH\\TO\\polymarket-mcp run src/polymarket_mcp/server.py
  57. ```
  58. 2. Create a `.env` file with your PolyMarket API key:
  59. ```
  60. Key=your_api_key_here
  61. Funder=poly market wallet address
  62. ```
  63. After connecting Claude client with the MCP tool via json file, run the server:
  64. In alpha-vantage-mcp repo: `uv run src/polymarket_mcp/server.py`
  65. ## Available Tools
  66. The server implements four tools:
  67. - `get-market-info`: Get detailed information about a specific prediction market
  68. - `list-markets`: List available prediction markets with filtering options
  69. - `get-market-prices`: Get current prices and trading information
  70. - `get-market-history`: Get historical price and volume data
  71. ### get-market-info
  72. **Input Schema:**
  73. ```json
  74. {
  75. "market_id": {
  76. "type": "string",
  77. "description": "Market ID or slug"
  78. }
  79. }
  80. ```
  81. **Example Response:**
  82. ```
  83. Title: Example Market
  84. Category: Politics
  85. Status: Open
  86. Resolution Date: 2024-12-31
  87. Volume: $1,234,567.89
  88. Liquidity: $98,765.43
  89. Description: This is an example prediction market...
  90. ---
  91. ```
  92. ### list-markets
  93. **Input Schema:**
  94. ```json
  95. {
  96. "status": {
  97. "type": "string",
  98. "description": "Filter by market status",
  99. "enum": ["open", "closed", "resolved"]
  100. },
  101. "limit": {
  102. "type": "integer",
  103. "description": "Number of markets to return",
  104. "default": 10,
  105. "minimum": 1,
  106. "maximum": 100
  107. },
  108. "offset": {
  109. "type": "integer",
  110. "description": "Number of markets to skip (for pagination)",
  111. "default": 0,
  112. "minimum": 0
  113. }
  114. }
  115. ```
  116. **Example Response:**
  117. ```
  118. Available Markets:
  119. ID: market-123
  120. Title: US Presidential Election 2024
  121. Status: Open
  122. Volume: $1,234,567.89
  123. ---
  124. ID: market-124
  125. Title: Oscar Best Picture 2024
  126. Status: Open
  127. Volume: $234,567.89
  128. ---
  129. ```
  130. ### get-market-prices
  131. **Input Schema:**
  132. ```json
  133. {
  134. "market_id": {
  135. "type": "string",
  136. "description": "Market ID or slug"
  137. }
  138. }
  139. ```
  140. **Example Response:**
  141. ```
  142. Current Market Prices for US Presidential Election 2024
  143. Outcome: Democratic
  144. Price: $0.6500
  145. Probability: 65.0%
  146. ---
  147. Outcome: Republican
  148. Price: $0.3500
  149. Probability: 35.0%
  150. ---
  151. ```
  152. ### get-market-history
  153. **Input Schema:**
  154. ```json
  155. {
  156. "market_id": {
  157. "type": "string",
  158. "description": "Market ID or slug"
  159. },
  160. "timeframe": {
  161. "type": "string",
  162. "description": "Time period for historical data",
  163. "enum": ["1d", "7d", "30d", "all"],
  164. "default": "7d"
  165. }
  166. }
  167. ```
  168. **Example Response:**
  169. ```
  170. Historical Data for US Presidential Election 2024
  171. Time Period: 7d
  172. Time: 2024-01-20T12:00:00Z
  173. Price: $0.6500
  174. Volume: $123,456.78
  175. ---
  176. Time: 2024-01-19T12:00:00Z
  177. Price: $0.6300
  178. Volume: $98,765.43
  179. ---
  180. ```
  181. ## Error Handling
  182. The server includes comprehensive error handling for various scenarios:
  183. - Rate limiting (429 errors)
  184. - Invalid API keys (403 errors)
  185. - Invalid market IDs (404 errors)
  186. - Network connectivity issues
  187. - API timeout conditions (30-second timeout)
  188. - Malformed responses
  189. Error messages are returned in a clear, human-readable format.
  190. ## Prerequisites
  191. - Python 3.9 or higher
  192. - httpx>=0.24.0
  193. - mcp-core
  194. - python-dotenv>=1.0.0
  195. ## Contributing
  196. Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.