Resolved Markets logoResolved Markets logo
Abstract blue gradient background with a soft light streakAbstract blue gradient background with a soft light streak
Tutorial

Query Polymarket data from an AI agent

Connect Resolved Markets to Claude or any MCP-compatible agent and let it pull from the historical snapshot archive, plus the current book on active markets, on its own, grounded in real data, not guesses.

7 min read · Updated Jun 22, 2026

  • 12Agent tools
  • stdio + HTTPTransports
  • 2Ambient resources
  • Every tierAccess

Giving an AI agent direct, structured access to market data turns "what is the BTC Up/Down book doing right now?" into a question it can actually answer, by calling a tool, not by guessing. Resolved Markets ships a Model Context Protocol server that exposes the whole API as agent tools. Here is what that unlocks.

The split that makes this a product: the method is free and generous, the access is what you pay for. Anyone can wire up the MCP server; what your key gates is volume, freshness, and history depth. So the "how" is open.

What the agent can do

Discover markets

List categories and markets, then resolve a friendly slug to a market the agent can act on.

  • Browse every category
  • Live and historical markets
  • Slug → market lookup

Read the book

Pull the live order book, a point-in-time snapshot, or a window of history with full depth.

  • Live orderbook
  • Snapshot at a timestamp
  • Time-range queries

Summarise & monitor

Get a market’s recent aggregate stats and the pipeline’s health in a single call.

  • 7-day summaries
  • Hyperliquid perps too
  • System stats

It also exposes two ambient resources, a live-markets list and the latest prices, that the agent can read without spending a tool call. The whole surface maps one-to-one onto the REST API, so anything you can do by hand, the agent can do on its own.

The twelve tools at a glance

The server exposes twelve tools and two ambient resources, grouped by what the agent is trying to do. Each one maps to a real endpoint, so the agent is never improvising, it is calling the same surface you would hit by hand.

  • 12 toolsThe full callable surface
  • 2 resourcesmarkets://live · prices://latest
  • Discoverylist_categories · list_markets · list_historical_markets · get_market
  • Order bookget_orderbook · get_snapshot · get_latest_snapshots · query_snapshots
  • Aggregateget_market_summary · get_system_stats
  • Exchangeget_exchange_orderbook · get_exchange_snapshots

The two exchange tools cover Hyperliquid perpetual data, which lives on the Scale tier and above, the agent can call them on any tier, but the data they return follows the same access rules as the REST API.

How it connects

For a local agent like Claude Desktop or Claude Code, the server runs over stdio and your MCP client points at it with your API key. For a remote or multi-client setup, the same server runs over HTTP. Either way the tool surface is identical, the transport is the only thing that changes. The setup steps live in the AI Agents guide.

No paywall on the tools

Every tier gets the full tool set

MCP access is not gated behind a paid plan, Free, Pro, Scale, and Enterprise all get every tool. The tools share your key’s rate limit and credit budget, so the only thing that changes by tier is how much you can pull, not what you can call.

A task you can hand it

Once connected, you describe a research task in plain language and the agent chains the right tools to answer it, resolving the market, reading the live book, pulling a window of history, and reasoning over the result:

“Resolve the btc-updown-5m market, show me the current UP/DOWN spread from the live book, then pull the last 30 minutes of snapshots and tell me whether the spread has been widening or tightening.”

The agent answers in prose, but every number behind it came from a real tool call, not a hallucination. That is the difference between an agent that talks about markets and one that reads them.

Retrieval, not recall

A language model on its own answers a market question from a frozen, fuzzy memory of the internet. With MCP, it answers from the historical snapshot archive, and, for active markets, the current book, instead, retrieving the number rather than recalling an impression of one. That single shift is what makes an agent’s market claims checkable.

Grounded answers

Every figure traces back to a tool result, so the agent cannot quietly invent a spread or a price.

  • Real values, not guesses
  • Traceable to a call
  • Checkable after the fact

Fresh, not frozen

The ambient resources keep live markets and latest prices current, so the agent is never reasoning over stale memory.

  • Live market list
  • Latest prices
  • No training-cutoff gap

Graceful recovery

Tools return clear error hints, tier, rate limit, not found, so the agent can adjust instead of fabricating.

  • Structured errors
  • Tier-aware hints
  • Self-correcting flows
An agent that guesses is a liability; an agent that retrieves is a tool. MCP is what turns the first into the second.

Wire up your agent

The AI Agents page walks through connecting Claude and other MCP clients; the docs cover every tool in detail.

Frequently asked questions