Enable Claude, ChatGPT, and other AI agents to analyze markets, fetch real-time odds, and execute trades on Polymarket using the Model Context Protocol (MCP).
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"ai-polymarket-agent": {
"command": "<see-readme>",
"args": []
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
Connect Polymarket to your AI. The official-like MCP implementation for real-time prediction market analysis, automated odds tracking, and AI-powered trading insights.
No automated test available for this server. Check the GitHub README for setup instructions.
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
No package registry to scan.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in ai-ml
A Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects.
Dynamic problem-solving through sequential thought chains
A Model Context Protocol server for searching and analyzing arXiv papers
The official Python SDK for Model Context Protocol servers and clients
MCP Security Weekly
Get CVE alerts and security updates for Ai Polymarket Agent and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
Connect Polymarket to your AI. The official-like MCP implementation for real-time prediction market analysis, automated odds tracking, and AI-powered trading insights.
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import {
CallToolRequestSchema,
ListToolsRequestSchema,
} from "@modelcontextprotocol/sdk/types.js";
import axios from "axios";
const server = new Server(
{
name: "polymarket-mcp-server",
version: "1.0.0",
},
{
capabilities: {
tools: {},
},
}
);
/**
* Список доступных инструментов для ИИ
*/
server.setRequestHandler(ListToolsRequestSchema, async () => {
return {
tools: [
{
name: "search_markets",
description: "Search for active prediction markets on Polymarket by keyword",
inputSchema: {
type: "object",
properties: {
query: { type: "string", description: "Keyword to search (e.g., 'Bitcoin', 'Election')" },
},
required: ["query"],
},
},
{
name: "get_market_odds",
description: "Get real-time odds and order book data for a specific market ID",
inputSchema: {
type: "object",
properties: {
conditionId: { type: "string", description: "The unique condition ID of the market" },
},
required: ["conditionId"],
},
},
],
};
});
/**
* Логика выполнения инструментов
*/
server.setRequestHandler(CallToolRequestSchema, async (request) => {
const { name, arguments: args } = request.params;
try {
if (name === "search_markets") {
const query = args?.query as string;
const response = await axios.get(`${POLYMARKET_API_BASE}/markets?active=true`);
const markets = response.data
.filter((m: any) => m.question.toLowerCase().includes(query.toLowerCase()))
.slice(0, 5);
return {
content: [{ type: "text", text: JSON.stringify(markets, null, 2) }],
};
}
if (name === "get_market_odds") {
const conditionId = args?.conditionId as string;
const response = await axios.get(`${POLYMARKET_API_BASE}/book?token_id=${conditionId}`);
return {
content: [{ type: "text", text: JSON.stringify(response.data, null, 2) }],
};
}
throw new Error(`Tool not found: ${name}`);
} catch (error: any) {
return {
content: [{ type: "text", text: `Error: ${error.message}` }],
isError: true,
};
}
});
/**
* Запуск сервера через стандартный ввод/вывод (Stdio)
*/
async function main() {
const transport = new StdioServerTransport();
await server.connect(transport);
console.error("Polymarket MCP Server running on stdio");
}
main().catch((error) => {
console.error("Fatal error in main():", error);
process.exit(1);
});
polymarket-mcp-server-ai-agents/
│
├── server/
│ ├── agents/
│ ├── strategies/
│ ├── api/
│ ├── data/
│ └── core/
│
├── scripts/
├── tests/
├── docs/
│
├── .env.example
├── README.md
├── package.json / requirements.txt
└── docker-compose.yml