manifold mcp server
Provides comprehensive access to Manifold Markets prediction platform through a clean MCP interface, enabling users to create markets, place bets, manage liquidity, and utilize social features through natural language.
Provides comprehensive access to Manifold Markets prediction platform through a clean MCP interface, enabling users to create markets, place bets, manage liquidity, and utilize social features through natural language.
An MCP server for interacting with Manifold Markets prediction markets. This server provides comprehensive access to Manifold's features through a clean MCP interface, enabling sophisticated market interactions and collective intelligence mechanisms.
The server implements a complete mapping of Manifold Markets' API capabilities through a structured tool system:
create_market
: Create markets (BINARY, MULTIPLE_CHOICE, PSEUDO_NUMERIC, POLL)unresolve_market
: Revert resolved marketsclose_market
: Close markets for tradingadd_answer
: Add options to multiple choice marketsfollow_market
: Track markets of interestreact
: Like/dislike markets and commentsadd_bounty
: Add bounties for analysisaward_bounty
: Reward valuable contributionsplace_bet
: Execute market tradescancel_bet
: Cancel limit orderssell_shares
: Liquidate positionsadd_liquidity
: Provide market liquidityremove_liquidity
: Withdraw provided liquiditysearch_markets
: Find markets with filtersget_market
: Detailed market informationget_user
: User profile dataget_positions
: Portfolio trackingsend_mana
: Transfer mana between usersThe server has been tested through comprehensive interaction trajectories:
✅ Detailed market information retrieval
Trading Operations
✅ Share selling
Permission Management
These operations are implemented but require specific user roles: - Market resolution/unresolving (market creator) - Market closing (market creator) - Bounty management (market creator) - Liquidity removal (liquidity provider)
npm install manifold-mcp-server
Add to ~/Library/Application Support/Claude/claude_desktop_config.json
:
{
"mcpServers": {
"manifold": {
"command": "node",
"args": ["/path/to/manifold-mcp-server/build/index.js"],
"env": {
"MANIFOLD_API_KEY": "your_api_key_here"
}
}
}
}
Add to ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
:
{
"mcpServers": {
"manifold": {
"command": "node",
"args": ["/path/to/manifold-mcp-server/build/index.js"],
"env": {
"MANIFOLD_API_KEY": "your_api_key_here"
}
}
}
}
Create a new prediction market:
{
outcomeType: 'BINARY' | 'MULTIPLE_CHOICE' | 'PSEUDO_NUMERIC' | 'POLL' | 'BOUNTIED_QUESTION'
question: string
description?: string | {
type: 'doc'
content: any[]
}
closeTime?: number // Unix timestamp ms
visibility?: 'public' | 'unlisted'
initialProb?: number // Required for BINARY (1-99)
min?: number // Required for PSEUDO_NUMERIC
max?: number // Required for PSEUDO_NUMERIC
isLogScale?: boolean
initialValue?: number // Required for PSEUDO_NUMERIC
answers?: string[] // Required for MULTIPLE_CHOICE/POLL
addAnswersMode?: 'DISABLED' | 'ONLY_CREATOR' | 'ANYONE'
shouldAnswersSumToOne?: boolean
totalBounty?: number // Required for BOUNTIED_QUESTION
}
Unresolve a previously resolved market:
{
contractId: string
answerId?: string // For multiple choice markets
}
Close a market for trading:
{
contractId: string
closeTime?: number // Optional close time
}
Follow or unfollow a market:
{
contractId: string
follow: boolean
}
React to markets or comments:
{
contentId: string
contentType: 'comment' | 'contract'
remove?: boolean
reactionType: 'like' | 'dislike'
}
Place a bet on a market:
{
marketId: string
amount: number
outcome: 'YES' | 'NO'
limitProb?: number // 0.01-0.99
}
Sell shares in a market:
{
marketId: string
outcome?: 'YES' | 'NO'
shares?: number // Defaults to all
}
Add liquidity to market pool:
{
marketId: string
amount: number
}
Remove liquidity from market pool:
{
contractId: string
amount: number
}
The server implements comprehensive error handling:
Required field verification
API Communication
Permission checks
Business Logic
Unauthorized operations
Error Response Format
{
code: ErrorCode
message: string
details?: any
}
# Clone the repository
git clone https://github.com/bmorphism/manifold-mcp-server.git
cd manifold-mcp-server
# Install dependencies
npm install
# Build
npm run build
# Run tests
npm test
Contributions welcome! Areas of interest: - Advanced market analysis tools - Portfolio optimization features - Integration with other prediction platforms - Documentation improvements
MIT
[
{
"description": "Create a new prediction market",
"inputSchema": {
"properties": {
"addAnswersMode": {
"description": "Optional for MULTIPLE_CHOICE markets. Controls who can add answers",
"enum": [
"DISABLED",
"ONLY_CREATOR",
"ANYONE"
],
"type": "string"
},
"answers": {
"description": "Required for MULTIPLE_CHOICE/POLL markets. Array of possible answers",
"items": {
"type": "string"
},
"type": "array"
},
"closeTime": {
"description": "Optional. ISO timestamp when market will close. Defaults to 7 days.",
"type": "string"
},
"description": {
"description": "Optional description for the market",
"type": "string"
},
"initialProb": {
"description": "Required for BINARY markets. Initial probability (1-99)",
"type": "number"
},
"initialValue": {
"description": "Required for PSEUDO_NUMERIC markets. Initial value between min and max",
"type": "number"
},
"isLogScale": {
"description": "Optional for PSEUDO_NUMERIC markets. If true, increases exponentially",
"type": "boolean"
},
"max": {
"description": "Required for PSEUDO_NUMERIC markets. Maximum resolvable value",
"type": "number"
},
"min": {
"description": "Required for PSEUDO_NUMERIC markets. Minimum resolvable value",
"type": "number"
},
"outcomeType": {
"description": "Type of market to create",
"enum": [
"BINARY",
"MULTIPLE_CHOICE",
"PSEUDO_NUMERIC",
"POLL",
"BOUNTIED_QUESTION"
],
"type": "string"
},
"question": {
"description": "The headline question for the market",
"type": "string"
},
"shouldAnswersSumToOne": {
"description": "Optional for MULTIPLE_CHOICE markets. Makes probabilities sum to 100%",
"type": "boolean"
},
"totalBounty": {
"description": "Required for BOUNTIED_QUESTION markets. Amount of mana for bounty",
"type": "number"
},
"visibility": {
"description": "Optional. Market visibility. Defaults to public.",
"enum": [
"public",
"unlisted"
],
"type": "string"
}
},
"required": [
"outcomeType",
"question"
],
"type": "object"
},
"name": "create_market"
},
{
"description": "Search for prediction markets with optional filters",
"inputSchema": {
"properties": {
"filter": {
"enum": [
"all",
"open",
"closed",
"resolved"
],
"type": "string"
},
"limit": {
"description": "Max number of results (1-100)",
"type": "number"
},
"sort": {
"enum": [
"newest",
"score",
"liquidity"
],
"type": "string"
},
"term": {
"description": "Search query",
"type": "string"
}
},
"type": "object"
},
"name": "search_markets"
},
{
"description": "Get detailed information about a specific market",
"inputSchema": {
"properties": {
"marketId": {
"description": "Market ID",
"type": "string"
}
},
"required": [
"marketId"
],
"type": "object"
},
"name": "get_market"
},
{
"description": "Get user information by username",
"inputSchema": {
"properties": {
"username": {
"description": "Username",
"type": "string"
}
},
"required": [
"username"
],
"type": "object"
},
"name": "get_user"
},
{
"description": "Place a bet on a market",
"inputSchema": {
"properties": {
"amount": {
"description": "Amount to bet in mana",
"type": "number"
},
"limitProb": {
"description": "Optional limit order probability (0.01-0.99)",
"type": "number"
},
"marketId": {
"description": "Market ID",
"type": "string"
},
"outcome": {
"enum": [
"YES",
"NO"
],
"type": "string"
}
},
"required": [
"marketId",
"amount",
"outcome"
],
"type": "object"
},
"name": "place_bet"
},
{
"description": "Cancel a limit order bet",
"inputSchema": {
"properties": {
"betId": {
"description": "Bet ID to cancel",
"type": "string"
}
},
"required": [
"betId"
],
"type": "object"
},
"name": "cancel_bet"
},
{
"description": "Sell shares in a market",
"inputSchema": {
"properties": {
"marketId": {
"description": "Market ID",
"type": "string"
},
"outcome": {
"description": "Which type of shares to sell (defaults to what you have)",
"enum": [
"YES",
"NO"
],
"type": "string"
},
"shares": {
"description": "How many shares to sell (defaults to all)",
"type": "number"
}
},
"required": [
"marketId"
],
"type": "object"
},
"name": "sell_shares"
},
{
"description": "Add mana to market liquidity pool",
"inputSchema": {
"properties": {
"amount": {
"description": "Amount of mana to add",
"type": "number"
},
"marketId": {
"description": "Market ID",
"type": "string"
}
},
"required": [
"marketId",
"amount"
],
"type": "object"
},
"name": "add_liquidity"
},
{
"description": "Get user positions across markets",
"inputSchema": {
"properties": {
"userId": {
"description": "User ID",
"type": "string"
}
},
"required": [
"userId"
],
"type": "object"
},
"name": "get_positions"
},
{
"description": "Unresolve a previously resolved market",
"inputSchema": {
"properties": {
"answerId": {
"description": "Optional. Answer ID for multiple choice markets",
"type": "string"
},
"contractId": {
"description": "Market ID",
"type": "string"
}
},
"required": [
"contractId"
],
"type": "object"
},
"name": "unresolve_market"
},
{
"description": "Close a market for trading",
"inputSchema": {
"properties": {
"closeTime": {
"description": "Optional. Unix timestamp in milliseconds when market will close",
"type": "number"
},
"contractId": {
"description": "Market ID",
"type": "string"
}
},
"required": [
"contractId"
],
"type": "object"
},
"name": "close_market"
},
{
"description": "Add a new answer to a multiple choice market",
"inputSchema": {
"properties": {
"contractId": {
"description": "Market ID",
"type": "string"
},
"text": {
"description": "Answer text",
"type": "string"
}
},
"required": [
"contractId",
"text"
],
"type": "object"
},
"name": "add_answer"
},
{
"description": "Follow or unfollow a market",
"inputSchema": {
"properties": {
"contractId": {
"description": "Market ID",
"type": "string"
},
"follow": {
"description": "true to follow, false to unfollow",
"type": "boolean"
}
},
"required": [
"contractId",
"follow"
],
"type": "object"
},
"name": "follow_market"
},
{
"description": "Add bounty to a market",
"inputSchema": {
"properties": {
"amount": {
"description": "Amount of mana to add as bounty",
"type": "number"
},
"contractId": {
"description": "Market ID",
"type": "string"
}
},
"required": [
"contractId",
"amount"
],
"type": "object"
},
"name": "add_bounty"
},
{
"description": "Award bounty to a comment",
"inputSchema": {
"properties": {
"amount": {
"description": "Amount of bounty to award",
"type": "number"
},
"commentId": {
"description": "Comment ID to award bounty to",
"type": "string"
},
"contractId": {
"description": "Market ID",
"type": "string"
}
},
"required": [
"contractId",
"commentId",
"amount"
],
"type": "object"
},
"name": "award_bounty"
},
{
"description": "Remove liquidity from market pool",
"inputSchema": {
"properties": {
"amount": {
"description": "Amount of liquidity to remove",
"type": "number"
},
"contractId": {
"description": "Market ID",
"type": "string"
}
},
"required": [
"contractId",
"amount"
],
"type": "object"
},
"name": "remove_liquidity"
},
{
"description": "React to a market or comment",
"inputSchema": {
"properties": {
"contentId": {
"description": "ID of market or comment",
"type": "string"
},
"contentType": {
"description": "Type of content to react to",
"enum": [
"comment",
"contract"
],
"type": "string"
},
"reactionType": {
"description": "Type of reaction",
"enum": [
"like",
"dislike"
],
"type": "string"
},
"remove": {
"description": "Optional. true to remove reaction",
"type": "boolean"
}
},
"required": [
"contentId",
"contentType"
],
"type": "object"
},
"name": "react"
},
{
"description": "Send mana to other users",
"inputSchema": {
"properties": {
"amount": {
"description": "Amount of mana to send (min 10)",
"type": "number"
},
"message": {
"description": "Optional message to include",
"type": "string"
},
"toIds": {
"description": "Array of user IDs to send mana to",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"toIds",
"amount"
],
"type": "object"
},
"name": "send_mana"
}
]