Manifold Markets
Interact with Manifold Markets prediction markets, including market creation, trading, and liquidity management.
Manifold Markets MCP Server
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.
Architecture
The server implements a complete mapping of Manifold Markets' API capabilities through a structured tool system:
Core Components
- Schema Layer: Zod-based validation schemas for all operations
- API Integration: Direct mapping to Manifold's REST endpoints
- Tool Handlers: Request processing with proper error management
- Type Safety: Full TypeScript implementation
Tool Categories
Market Creation & Management
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 markets
Market Interaction
follow_market: Track markets of interestreact: Like/dislike markets and commentsadd_bounty: Add bounties for analysisaward_bounty: Reward valuable contributions
Trading Operations
place_bet: Execute market tradescancel_bet: Cancel limit orderssell_shares: Liquidate positions
Liquidity Management
add_liquidity: Provide market liquidityremove_liquidity: Withdraw provided liquidity
Information Retrieval
search_markets: Find markets with filtersget_market: Detailed market informationget_user: User profile dataget_positions: Portfolio tracking
Social Features
send_mana: Transfer mana between users
Verified Capabilities
The server has been tested through comprehensive interaction trajectories:
Successfully Tested
-
Market Discovery & Following
- ✅ Market search with filters
- ✅ Market following
- ✅ Detailed market information retrieval
-
Trading Operations
- ✅ Liquidity provision
- ✅ Bet placement with probability updates
- ✅ Position liquidation
- ✅ Share selling
-
Permission Management
- ✅ Role-based access control
- ✅ Authentication handling
- ✅ Error messaging
Permission-Restricted Operations
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)
Prerequisites
- Node.js 18 or higher
- npm or yarn
- Manifold Markets API key
- Minimum M$1000 balance for market creation
Installation
1. Install the package
npm install manifold-mcp-server
2. Get your API Key
- Log in to Manifold Markets
- Go to your profile settings
- Generate an API key
- Ensure account has sufficient mana for intended operations
3. Configure MCP Settings
For Claude Desktop
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"
}
}
}
}
For Cline (VSCode Extension)
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"
}
}
}
}
Tool Documentation
Market Creation & Management
create_market
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_market
Unresolve a previously resolved market:
{
contractId: string
answerId?: string // For multiple choice markets
}
close_market
Close a market for trading:
{
contractId: string
closeTime?: number // Optional close time
}
Market Interaction
follow_market
Follow or unfollow a market:
{
contractId: string
follow: boolean
}
react
React to markets or comments:
{
contentId: string
contentType: 'comment' | 'contract'
remove?: boolean
reactionType: 'like' | 'dislike'
}
Trading Operations
place_bet
Place a bet on a market:
{
marketId: string
amount: number
outcome: 'YES' | 'NO'
limitProb?: number // 0.01-0.99
}
sell_shares
Sell shares in a market:
{
marketId: string
outcome?: 'YES' | 'NO'
shares?: number // Defaults to all
}
Liquidity Management
add_liquidity
Add liquidity to market pool:
{
marketId: string
amount: number
}
remove_liquidity
Remove liquidity from market pool:
{
contractId: string
amount: number
}
Error Handling
The server implements comprehensive error handling:
-
Input Validation
- Parameter type checking via Zod schemas
- Value range validation
- Required field verification
-
API Communication
- Authentication errors
- Network failures
- Rate limiting
- Permission checks
-
Business Logic
- Insufficient balance
- Invalid market states
- Unauthorized operations
-
Error Response Format
{
code: ErrorCode
message: string
details?: any
}
Development
# 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
Contributing
Contributions welcome! Areas of interest:
- Advanced market analysis tools
- Portfolio optimization features
- Integration with other prediction platforms
- Documentation improvements
Security
- API keys handled via environment variables
- Input validation on all parameters
- Rate limiting protection
- Safe error messages
- Role-based access control
License
MIT
Related Servers
Time Server
An MCP server that exposes datetime information to agentic systems and chat REPLs.
Kalshi MCP Server
A simple MCP server to interact with prediction market Kalshi
Latinum Wallet MCP
An MCP server enabling AI agents to pay for services using HTTP 402 requests and MCP tools.
ThreatByte-MCP
ThreatByte-MCP is a deliberately vulnerable, MCP-based case management web app. It mirrors a realistic SOC analyst workflow with a server-rendered UI and a real MCP server. The MCP tools are intentionally vulnerable for training and demonstration.
ADM1 MCP Server
Control anaerobic digestion modeling (ADM1) using natural language.
Image Reader
A server for extracting and understanding content from images.
Pollinations
Multimodal MCP server for generating images, audio, and text with no authentication required
CookUnity MCP Server
MCP server for meal delivery service. Browse menus, manage carts, confirm orders, skip/unskip deliveries, and view order history.
Loxone MCP Server
An MCP server for Loxone home automation systems, allowing AI assistants to control lights, blinds, sensors, and weather.
Interzoid Data Quality
AI-powered data matching, enrichment, standardization, and verification APIs. 29 tools for company/name/address deduplication, business intelligence, email trust scoring, and more. Supports x402 crypto micropayments.