pmxt-mcp
OfficialClick on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@pmxt-mcpshow me the latest political markets on polymarket"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@pmxt/mcp
MCP server that exposes the PMXT unified prediction market API as tools for Claude and other AI agents.
One tool per API method. Same interface regardless of venue -- Polymarket, Kalshi, Limitless, Probable, Baozi, Myriad, Opinion, Metaculus, Smarkets, and more.
Quick start
Add to your Claude Desktop config (claude_desktop_config.json):
{
"mcpServers": {
"pmxt": {
"command": "npx",
"args": ["-y", "@pmxt/mcp"],
"env": {
"PMXT_API_KEY": "pmxt_live_..."
}
}
}
}Or run directly:
PMXT_API_KEY=pmxt_live_... npx @pmxt/mcpGet an API key at pmxt.dev/dashboard.
Modes
The MCP server doesn't run prediction market logic itself -- it forwards every tool call to a PMXT API server over HTTP. Where that server lives depends on the mode:
Hosted -- Set PMXT_API_KEY and the server calls https://api.pmxt.dev. No local setup required; the hosted service manages exchange connections, caching, and rate limits for you.
Local (sidecar) -- If no API key is set, the server assumes you're running the PMXT core server locally on http://localhost:3847. This is useful for development, self-hosting, or when you want full control over the runtime. See the pmxt core repo for how to run the server.
You can point at any PMXT-compatible server by setting PMXT_API_URL explicitly.
Environment variables
Variable | Description |
| API key for the hosted PMXT service |
| Override the API base URL (defaults based on mode) |
Tools
Every tool requires an exchange parameter (e.g. polymarket, kalshi, limitless). Read-only tools are safe to call freely. Order-related tools (createOrder, submitOrder, cancelOrder) require explicit user confirmation -- they spend real money.
Market discovery: fetchMarkets, fetchMarketsPaginated, fetchEvents, fetchEvent, fetchMarket
Order book & pricing: fetchOrderBook, fetchTrades, fetchOHLCV, getExecutionPrice, getExecutionPriceDetailed
Trading: buildOrder, createOrder, submitOrder, cancelOrder
Account: fetchBalance, fetchPositions, fetchOpenOrders, fetchClosedOrders, fetchAllOrders, fetchOrder, fetchMyTrades, loadMarkets
How it works
The server translates MCP tool calls into HTTP requests to the PMXT REST API:
Agent calls a tool (e.g.
fetchMarkets) with flat{ exchange, limit, query }inputThe server reconstructs positional arguments from the flat input using embedded arg specs
Sends
POST /api/{exchange}/{method}with{ args: [...] }to the PMXT APIReturns the JSON response to the agent
Auto-generation pipeline
The tool definitions in src/generated/tools.ts are not hand-written. They are generated from the PMXT core OpenAPI spec by scripts/generate-tools.cjs.
The full pipeline runs automatically on every PMXT release:
A new version tag (
v*) is pushed to the pmxt core repoThe
sync-mcp.ymlGitHub Actions workflow triggersIt clones this repo, copies the latest spec files from core into
spec/:core/src/server/openapi.yaml-- full API spec (endpoints, parameters, response schemas)core/src/server/method-verbs.json-- HTTP verb and positional argument metadata per method
Runs
node scripts/generate-tools.cjsto regeneratesrc/generated/tools.tsBumps
package.jsonto match the core versionCommits, tags, and pushes to this repo
Publishes to npm with
npm publish --provenance --access public
What the generator does:
Reads both spec files
Skips streaming/internal methods (
watchOrderBook,close,healthCheck, etc.)Flattens complex parameters into flat MCP tool input schemas
Embeds
ArgSpecmetadata so the server can reconstruct positional args at runtimeAdds annotations (
readOnlyHint,destructiveHint,idempotentHint) per toolMarks order-related tools with a
credentialsinput property
To regenerate locally:
npm run generateDevelopment
npm install
npm run generate # regenerate tools from spec/
npm run build # compile TypeScriptLicense
MIT
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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/pmxt-dev/pmxt-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server