Limitless MCP
Limitless Subgraphs + MCP Server
Subgraphs and MCP server for Limitless Exchange prediction markets on Base.
Why Subgraphs?
The Limitless REST API is useful for market metadata (titles, descriptions, categories) but has significant limitations for analytics:
Rate limited — max 2 concurrent requests, 300ms minimum delay between calls, 429s on bursts
No historical aggregation — no way to query total protocol volume, trade counts over time, or cross-market analytics
No on-chain depth — the API doesn't expose individual trade fills, position balances, splits/merges/redemptions, or resolution payouts
Subgraphs solve all of this. They index every on-chain event into a queryable GraphQL API with no rate limits, full historical data, and flexible aggregation. The MCP server combines both — subgraphs for the heavy analytics, REST API for market names and metadata.
Why market names aren't in the subgraphs
Market titles and descriptions are stored off-chain in the Limitless database — they are not emitted in any on-chain event. Unlike Polymarket, which uses UMA's QuestionInitialized event to embed question text in ancillaryData on-chain, Limitless uses a GnosisSafe multisig as the oracle address. The multisig calls prepareCondition directly on the CTF contract with no accompanying event that carries the question text. The questionId in the CTF's ConditionPreparation event is a bytes32 hash, not readable text.
This means there is no on-chain source a subgraph can index for market names. The MCP server bridges this gap by joining subgraph data (via conditionId) with the Limitless REST API for titles and metadata.
Related MCP server: Graph AAVE MCP
Subgraphs
Two subgraphs indexing different exchange venues on the same CTF (Conditional Tokens Framework):
Subgraph | What it indexes |
| Binary Yes/No markets — CTF Exchange v1/v2/v3 |
| Multi-outcome category markets — NegRisk Exchange v1/v2/v3 |
Both share the same CTF contract (0xC9c9...) for conditions, positions, splits, merges, and redemptions. Each indexes its own set of exchange contracts for markets and trades.
Entities
Condition — prepared markets with oracle, resolution status, payouts
Market / NegRiskMarket — exchange-registered markets with volume, trade counts, fees
Trade (immutable) — individual order fills with maker/taker, price, USD amounts
UserPosition — per-user token balances and PnL
Split / Merge / Redemption (immutable) — CTF liquidity events
User — aggregated trader stats
MarketDailySnapshot / GlobalDailySnapshot — daily time series
GlobalStats — protocol-wide singleton
Contracts
Simple Markets:
Contract | Address | Start Block |
CTF |
| 15,916,136 |
Exchange V1 |
| 26,043,405 |
Exchange V2 |
| 39,507,768 |
Exchange V3 |
| 39,598,606 |
NegRisk Markets:
Contract | Address | Start Block |
CTF |
| 15,916,136 |
NegRisk Exchange V1 |
| 28,018,020 |
NegRisk Exchange V2 |
| 39,508,390 |
NegRisk Exchange V3 |
| 39,598,827 |
Example Queries
# Global stats
{
globalStats(id: "0x73696d706c65") {
totalMarkets resolvedMarkets totalTradesCount
totalVolumeUSD totalFeesUSD totalUsers
}
}
# Recent trades with market info
{
trades(first: 10, orderBy: timestamp, orderDirection: desc) {
type maker taker amountUSD price venue timestamp
market { id tradesCount volumeUSD }
}
}
# User positions
{
userPositions(where: { user: "0x..." , balance_gt: "0" }) {
tokenId balance netCostUSD realizedPnlUSD
condition { id resolved payoutNumerators }
}
}MCP Server
An MCP server that combines both subgraphs with the Limitless REST API for market names and metadata. Every tool queries the subgraphs for on-chain data.
Tools (18)
Tool | Description |
| Combined protocol stats across both market types |
| Full market detail — on-chain stats + metadata |
| Keyword/category search with subgraph enrichment |
| Trade feed for a specific market |
| Daily volume/trades/fees for a market |
| Top position holders for a market |
| Creation → trading → resolution lifecycle |
| Trader stats merged across both subgraphs |
| Leaderboard by volume, trades, or fees |
| Trader's recent trades with market names |
| Trader's portfolio with balances and PnL |
| Daily time series across both market types |
| Simple vs NegRisk side-by-side comparison |
| Splits, merges, and redemptions feed |
| Unified activity feed (trades + liquidity events) |
| Browse conditions with resolution status |
| GraphQL schema introspection |
| Raw GraphQL escape hatch |
Setup
cd mcp-server
npm install
npm run buildClaude Code Config
{
"mcpServers": {
"limitless": {
"command": "node",
"args": ["/path/to/limitless-subgraphs/mcp-server/build/index.js"],
"env": {
"GRAPH_API_KEY": "your_graph_api_key",
"LIMITLESS_API_KEY": "lmts_your_key_here"
}
}
}
}API Keys
GRAPH_API_KEY(required) — needed to query the subgraphs via The Graph. Get one at thegraph.com/studio/apikeysLIMITLESS_API_KEY(optional) — enables market name/metadata enrichment from the Limitless REST API. Without it, market browsing and search still work (public endpoints). Generate one at limitless.exchange → profile menu → Api keys. Key format:lmts_.... Pass viaX-API-Keyheader. See the Limitless API docs for full details.
Note: The Limitless REST API is rate limited to 2 concurrent requests with 300ms minimum delay. The subgraphs have no such limits, which is why the MCP routes all analytics queries through them and only uses the REST API for metadata.
Available Tools
18 toolscompare_market_typesB
Side-by-side comparison of simple vs negrisk market performance. Shows volume share, trade counts, fees, and activity breakdown.
Inputs: no named parameters.
get_conditionsB
Get conditions (markets that have been prepared on-chain) with resolution status. Useful for finding resolved/unresolved markets.
Inputs: resolved, first.
get_daily_protocol_statsA
Get daily protocol stats (volume, trades, fees, splits, merges, redemptions) across both market types as a time series.
Inputs: days.
get_global_statsA
Get combined protocol-wide stats across both simple and negrisk markets. Returns total markets, trades, volume, users, splits, merges, redemptions with per-type breakdown.
Inputs: no named parameters.
get_liquidity_eventsB
Get splits, merges, and redemptions — the liquidity lifecycle events. Filter by market or user address.
Inputs: conditionId, address, first.
get_market_analyticsB
Get full analytics for a specific market by conditionId. Combines on-chain data (volume, trades, fees, resolution status) with market metadata (title, description, categories). Queries both subgraphs to find the market.
Inputs: conditionId (required).
get_market_daily_snapshotsB
Get daily volume, trades, and fees for a specific market over time.
Inputs: conditionId (required), days.
get_market_lifecycleA
Get the complete lifecycle of a market: creation, trading stats, splits/merges, resolution status, and redemptions — all from on-chain data with metadata.
Inputs: conditionId (required).
get_market_positionsB
Get top position holders for a specific market. Shows who holds the biggest positions and their PnL.
Inputs: conditionId (required), first.
get_market_tradesB
Get trades for a specific market. Returns trade details with maker/taker, price, volume, and fees from on-chain data.
Inputs: conditionId (required), first, tradeType, orderDirection.
get_recent_activityB
Get a unified feed of all recent on-chain activity: trades, splits, merges, and redemptions across both market types with market names.
Inputs: first.
get_subgraph_schemaB
Get the GraphQL schema for a Limitless subgraph via introspection.
Inputs: subgraph (required).
get_top_tradersB
Get top traders ranked by volume, trade count, or PnL. Queries both subgraphs and merges rankings.
Inputs: orderBy, first, marketType.
get_trader_positionsB
Get a trader's current positions across both market types with balances and PnL.
Inputs: address (required).
get_trader_profileA
Get a trader's profile across both simple and negrisk markets. Shows trade count, volume, fees, PnL, and first/last trade timestamps from on-chain data.
Inputs: address (required).
get_trader_tradesA
Get a trader's recent trades across both market types, enriched with market names.
Inputs: address (required), first, role.
query_subgraphB
Run a raw GraphQL query against a Limitless subgraph. Escape hatch for custom queries.
Inputs: subgraph (required), query (required).
search_marketsA
Search markets by keyword or category. Returns market metadata enriched with on-chain volume and trade counts from subgraphs.
Inputs: query, categories, first.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 18 tools
Every tool has a clearly distinct purpose with no ambiguity. Tools are well-separated by scope (e.g., market-level, trader-level, protocol-wide, subgraph operations), and descriptions clearly differentiate them. For example, get_market_analytics provides comprehensive data for a single market, while get_global_stats offers aggregated protocol data, and there's no overlap in functionality.
Tool names follow a highly consistent verb_noun pattern throughout, using 'get_' for retrieval operations, 'compare_' for comparisons, 'search_' for searches, and 'query_' for raw queries. All names use snake_case uniformly, making them predictable and easy to understand, with no deviations in style or structure.
With 18 tools, the count is well-scoped for the server's purpose of providing analytics and data access for a prediction market protocol. Each tool earns its place by covering distinct aspects like market data, trader profiles, protocol stats, and subgraph operations, without feeling excessive or insufficient for the domain.
The tool surface offers complete coverage for the domain, including CRUD-like operations (e.g., get, search, query) across markets, traders, and protocol stats. It supports full lifecycle tracking (e.g., get_market_lifecycle, get_liquidity_events) and provides both aggregated and granular data, with no obvious gaps that would hinder agent workflows.
Maintenance
Related MCP Connectors
Historical tick, order book and settlement data for Polymarket and Predict.fun crypto up/down markets, plus smart-money lists and backtest quotes, over a read-only MCP server.
Market data tools for the MCP ecosystem: server stats, events, search, leaderboards, package trends.
33 pay-per-call market and news data tools over MCP with free discovery and x402 payments.
MCP server for accessing Glypse's prediction market analytics and research.
Related MCP Servers
- AlicenseBqualityCmaintenanceAn MCP server that enables querying Polymarket prediction market data through The Graph subgraphs. It provides tools for accessing market stats, trader P\&L, user positions, and orderbook activity using AI agents.35116 npm4MIT
- AlicenseAqualityCmaintenanceMCP server for querying AAVE V2/V3 lending protocol and governance data via The Graph subgraphs. Exposes 14 tools and 5 guided prompts that any AI agent (Claude, Cursor, Copilot, etc.) can use to query lending markets, user positions, health factors, liquidations, flash loans, rate history, and AAVE governance — across 7 chains (Ethereum, Base, Arbitrum, Polygon, Optimism, Avalanche, Fantom) via40339 npm2MIT
- AlicenseAqualityDmaintenanceMCP (Model Context Protocol) server that gives AI agents structured access to Predict.fun — a prediction market protocol on BNB Chain with $1.5B+ volume and yield-bearing mechanics via Venus Protocol. Indexes data from three subgraphs: orderbook activity, position lifecycle, and yield mechanics.15MIT
- AlicenseNot gradedqualityDmaintenanceWraps the Manifold Markets public REST API into an MCP server, providing 40 tools for querying markets, users, groups, bets, comments, and more.7 npmMIT