MCP Limitless
An MCP server for interacting with Limitless prediction markets
- Package:
@iqai/mcp-limitless - Purpose: Interacting with the Limitless prediction markets for market data and analysis.
Usage with ADK TypeScript
import {McpLimitless} from "@iqai/adk";
const toolset = McpLimitless()
const tools = await toolset.getTools()import {McpToolset} from "@iqai/adk";
const toolset = new McpToolset({
name: "Limitless MCP Client",
description: "Client for Limitless prediction markets",
transport: {
mode: "stdio",
command: "pnpm",
args: ["dlx", "@iqai/mcp-limitless"],
env: {
PATH: process.env.PATH || "",
},
},
})
const tools = await toolset.getTools(){
"mcpServers": {
"limitless-mcp-server": {
"command": "pnpm",
"args": ["dlx", "@iqai/mcp-limitless"]
}
}
}Available Tools
GET_AUTH_STATUSNo parameters
GET_AUTH_STATUSNo parameters
Description
Check the current authentication status for the Limitless API session. Returns whether you're logged in and your Ethereum address. Session persists automatically across all tool calls.
GET_SIGNING_MESSAGEaddress:string
GET_SIGNING_MESSAGEDescription
Get a signing message with a randomly generated nonce for authentication purposes. Use this before logging in. Requires a wallet address.
VERIFY_AUTHNo parameters
VERIFY_AUTHNo parameters
Description
Verify if the user is authenticated by checking the session cookie. Returns the authenticated Ethereum address.
LOGINaccount:stringsigningMessage:stringsignature:stringuserData:object
LOGINDescription
Authenticate a user with a signed message and create a session. First get a signing message, sign it with your wallet, then call this with the signature.
LOGOUTNo parameters
LOGOUTNo parameters
Description
Log out the user by clearing the session cookie. Requires authentication.
SEARCH_MARKETSquery:stringlimit:numberpage:numbersimilarityThreshold:number
SEARCH_MARKETSDescription
Search for prediction markets on Limitless based on semantic similarity. Returns markets matching the search query with details like volume, liquidity, and end dates.
GET_MARKETaddressOrSlug:string
GET_MARKETDescription
Get detailed information about a specific prediction market on Limitless. Provides market question, outcomes, prices, volume, liquidity, and other trading data.
GET_ACTIVE_MARKETScategoryId:numberpage:numberlimit:numbersortBy:string
GET_ACTIVE_MARKETSDescription
Browse active (unresolved) prediction markets on Limitless. Returns markets with volume, liquidity, and other trading data. Supports filtering by category and sorting.
GET_ACTIVE_MARKETS_BY_CATEGORYcategoryId:numberpage:numberlimit:numbersortBy:string
GET_ACTIVE_MARKETS_BY_CATEGORYDescription
Browse active (unresolved) markets filtered by category ID with optional pagination and sorting.
GET_CATEGORIESNo parameters
GET_CATEGORIESNo parameters
Description
Get all available categories on Limitless with their IDs, names, priorities, and metadata. Use this to discover available categories for filtering markets.
GET_CATEGORIES_COUNTNo parameters
GET_CATEGORIES_COUNTNo parameters
Description
Get the number of active markets for each category and the total market count.
GET_ACTIVE_SLUGSNo parameters
GET_ACTIVE_SLUGSNo parameters
Description
Get slugs, strike prices, tickers, and deadlines for all active markets and groups. Useful for discovering available markets.
GET_MARKET_ORDERBOOKslug:string
GET_MARKET_ORDERBOOKDescription
Get the current orderbook for a prediction market on Limitless. Shows all open buy (bids) and sell (asks) orders with prices and sizes.
GET_HISTORICAL_PRICEslug:stringfrom:stringto:stringinterval:string
GET_HISTORICAL_PRICEDescription
Retrieve historical price data for a specific market with configurable time intervals. Useful for analyzing price trends.
GET_FEED_EVENTSslug:stringpage:numberlimit:number
GET_FEED_EVENTSDescription
Get the latest feed events related to a specific market with pagination support.
GET_MARKET_EVENTSslug:stringpage:numberlimit:number
GET_MARKET_EVENTSDescription
Get recent events for a specific market including trades, orders, and liquidity changes.
GET_LOCKED_BALANCEslug:string
GET_LOCKED_BALANCEDescription
Get the amount of funds locked in open orders for the authenticated user in a specific market. Requires authentication.
GET_USER_ORDERSslug:string
GET_USER_ORDERSDescription
Get all orders placed by the authenticated user for a specific market. Requires authentication.
GET_PORTFOLIO_POSITIONSNo parameters
GET_PORTFOLIO_POSITIONSNo parameters
Description
Get your active portfolio positions on Limitless with P&L calculations and market values. Requires authentication via session token.
GET_PORTFOLIO_TRADESNo parameters
GET_PORTFOLIO_TRADESNo parameters
Description
Retrieve all trades executed by the authenticated user. Requires authentication.
GET_PORTFOLIO_HISTORYpage:numberlimit:numberfrom:stringto:string
GET_PORTFOLIO_HISTORYDescription
Get paginated history including AMM trades, CLOB trades, splits/merges, and NegRisk conversions. Requires authentication.
GET_PORTFOLIO_POINTSNo parameters
GET_PORTFOLIO_POINTSNo parameters
Description
Get points breakdown for the authenticated user. Requires authentication.
GET_USER_TRADED_VOLUMEaccount:string
GET_USER_TRADED_VOLUMEDescription
Get total traded volume and statistics for a specific user. This is a public endpoint that doesn't require authentication.
GET_PUBLIC_USER_POSITIONSaccount:string
GET_PUBLIC_USER_POSITIONSDescription
Get all positions for a specific user address. This is a public endpoint that doesn't require authentication.
GET_USER_PROFILEaddress:string
GET_USER_PROFILEDescription
Get detailed profile information for a user by their Ethereum address. Returns comprehensive user data including username, bio, profile picture, rank, points, leaderboard position, referral information, and account status. Requires authentication. Users can view their own profile when authenticated.
GET_TRADING_ALLOWANCEtype:string
GET_TRADING_ALLOWANCEDescription
Check USDC allowance for CLOB or NegRisk trading contracts. Requires authentication.
CREATE_ORDERorder:objectownerId:numberorderType:stringmarketSlug:string
CREATE_ORDERDescription
Create a buy or sell order for prediction market positions on Limitless. Requires signed order data and authentication. Returns order details and match information if filled immediately.
CANCEL_ORDERorderId:string
CANCEL_ORDERDescription
Cancel an open order on Limitless and return locked funds. Requires authentication and order ownership.
CANCEL_ORDER_BATCHorderIds:array
CANCEL_ORDER_BATCHDescription
Cancel multiple orders in a single batch operation on Limitless. All orders must be from the same market. Requires authentication and order ownership.
CANCEL_ALL_ORDERSslug:string
CANCEL_ALL_ORDERSDescription
Cancel all of a user's open orders in a specific market on Limitless. Requires authentication.
Environment Variables
No required environment variables. This MCP server works out of the box.
Usage Examples
Here's a complete example of using MCP Limitless with an ADK agent:
import { McpLimitless, AgentBuilder } from "@iqai/adk";
import dotenv from "dotenv";
dotenv.config();
async function main() {
// Initialize Limitless MCP toolset
const toolset = McpLimitless({
debug: false,
retryOptions: {
maxRetries: 3,
initialDelay: 500,
},
});
// Get available tools
const limitlessTools = await toolset.getTools();
// Create agent with Limitless tools
const { runner } = await AgentBuilder.create("limitless_agent")
.withModel("gemini-2.5-flash")
.withDescription(
"An agent that interacts with Limitless prediction markets",
)
.withTools(...limitlessTools)
.build();
try {
// Example queries
const response = await runner.ask(
"Show me trending prediction markets on Limitless",
);
console.log(response);
} finally {
// Clean up resources
await toolset.close();
}
}
main().catch(console.error);Best Practices
- Resource Cleanup: Always call
await toolset.close()when done to properly close connections - Error Handling: Implement proper error handling for market data requests
- Rate Limits: Be aware of API rate limits and implement appropriate retry logic
Error Handling
Error Scenarios
The server handles various error scenarios gracefully.
🔄 Invalid market identifiers: Verify market IDs are correct 🌐 Network issues: Check your internet connection and API status
Resources
- Limitless - Limitless prediction market platform
- Model Context Protocol - MCP specification and standards