polymarket-mcp

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.

Repository10 starsLast scanned: 9/14/2025
5/10
MEDIUM RISK
Threat Matrix - SAFE-MCP Framework

Initial Access

ATK-TA0001

2/10

Execution

ATK-TA0002

3/10

Persistence

ATK-TA0003

1/10

Privilege Escalation

ATK-TA0004

1/10

Defense Evasion

ATK-TA0005

2/10

Credential Access

ATK-TA0006

4/10

Discovery

ATK-TA0007

2/10

Lateral Movement

ATK-TA0008

1/10

Collection

ATK-TA0009

2/10

Command & Control

ATK-TA0011

3/10

Exfiltration

ATK-TA0010

5/10

Impact

ATK-TA0040

7/10
SAFE-T1001Tool Poisoning
Risk Levels:
Critical (7-10)
High (5-6)
Medium (3-4)
Low (1-2)
1 techniques detected across 1 tactics
0

Critical

1

High

2

Medium

1

Low

API Key Exposure via Environment VariablesHIGH

The application uses environment variables to store the Polymarket API key. While this is a common practice, the `.env.example` file includes a commented-out example API key, which could lead to accidental commits of actual API keys into version control if developers copy this file to `.env` and forget to remove the example.

Unvalidated API Base URLMEDIUM

The application allows configuring the Polymarket API base URL via the `POLYMARKET_API_BASE_URL` environment variable. While there is a check to ensure the URL starts with `http://` or `https://`, there is no further validation of the URL's format or content. An attacker could potentially inject a malicious URL, leading to data exfiltration or other attacks.

Lack of Rate Limiting on MCP Server EndpointsMEDIUM

The code does not implement rate limiting on the MCP server endpoints. This could allow an attacker to flood the server with requests, leading to a denial-of-service (DoS) attack.

README Update Script VulnerabilityLOW

The `update_readme.py` script updates the README.md file with a list of markdown files in the directory. The script constructs the file list by directly embedding the filename into a markdown link. If an attacker can create a markdown file with a specially crafted filename (e.g., containing markdown code or HTML), this could lead to code injection when the README is rendered.