Skip to main content
Glama
Manifold Markets MCP Server

Manifold Markets MCP Server

by bmorphism

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 markets

  • close_market: Close markets for trading

  • add_answer: Add options to multiple choice markets

Market Interaction

  • follow_market: Track markets of interest

  • react: Like/dislike markets and comments

  • add_bounty: Add bounties for analysis

  • award_bounty: Reward valuable contributions

Trading Operations

  • place_bet: Execute market trades

  • cancel_bet: Cancel limit orders

  • sell_shares: Liquidate positions

Liquidity Management

  • add_liquidity: Provide market liquidity

  • remove_liquidity: Withdraw provided liquidity

Information Retrieval

  • search_markets: Find markets with filters

  • get_market: Detailed market information

  • get_user: User profile data

  • get_positions: Portfolio tracking

Social Features

  • send_mana: Transfer mana between users

Related MCP server: polymarket-mcp

Verified Capabilities

The server has been tested through comprehensive interaction trajectories:

Successfully Tested

  1. Market Discovery & Following

    • ✅ Market search with filters

    • ✅ Market following

    • ✅ Detailed market information retrieval

  2. Trading Operations

    • ✅ Liquidity provision

    • ✅ Bet placement with probability updates

    • ✅ Position liquidation

    • ✅ Share selling

  3. 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

  1. Log in to Manifold Markets

  2. Go to your profile settings

  3. Generate an API key

  4. 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:

  1. Input Validation

    • Parameter type checking via Zod schemas

    • Value range validation

    • Required field verification

  2. API Communication

    • Authentication errors

    • Network failures

    • Rate limiting

    • Permission checks

  3. Business Logic

    • Insufficient balance

    • Invalid market states

    • Unauthorized operations

  4. 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

Available Tools

18 tools
add_answerB

Add a new answer to a multiple choice market

Inputs: contractId (required), text (required).

add_bountyB

Add bounty to a market

Inputs: contractId (required), amount (required).

add_liquidityB

Add mana to market liquidity pool

Inputs: marketId (required), amount (required).

award_bountyB

Award bounty to a comment

Inputs: contractId (required), commentId (required), amount (required).

cancel_betB

Cancel a limit order bet

Inputs: betId (required).

close_marketC

Close a market for trading

Inputs: contractId (required), closeTime.

create_marketC

Create a new prediction market

Inputs: outcomeType (required), question (required), description, closeTime, +10 more.

follow_marketC

Follow or unfollow a market

Inputs: contractId (required), follow (required).

get_marketC

Get detailed information about a specific market

Inputs: marketId (required).

get_positionsB

Get user positions across markets

Inputs: userId (required).

get_userA

Get user information by username

Inputs: username (required).

place_betB

Place a bet on a market

Inputs: marketId (required), amount (required), outcome (required), limitProb.

reactC

React to a market or comment

Inputs: contentId (required), contentType (required), remove, reactionType.

remove_liquidityC

Remove liquidity from market pool

Inputs: contractId (required), amount (required).

search_marketsC

Search for prediction markets with optional filters

Inputs: term, limit, filter, sort.

sell_sharesC

Sell shares in a market

Inputs: marketId (required), outcome, shares.

send_manaC

Send mana to other users

Inputs: toIds (required), amount (required), message.

unresolve_marketC

Unresolve a previously resolved market

Inputs: contractId (required), answerId.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 18 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose, such as adding liquidity, placing bets, or searching markets. No two tools overlap in functionality, making it easy for an agent to select the correct tool.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern in snake_case (e.g., add_liquidity, get_market, sell_shares). There are no deviations or mixed conventions, ensuring predictability.

    Tool Count5/5

    With 18 tools covering market creation, trading, liquidity, user info, and more, the count is well-scoped for a prediction market server. It provides comprehensive functionality without being excessive.

    Completeness4/5

    The tool set covers most core operations, including create, read, trade, and liquidity management. However, missing explicit tools for resolving markets and creating comments represent notable gaps that agents may need to work around.

    Related MCP Connectors

    • The Manifold Markets MCP server provides comprehensive access to prediction market features, enabling users to create and manage markets, execute trades, and manage liquidity through a clean interface. It facilitates sophisticated market interactions with Manifold's platform, including market discovery, trading operations, information retrieval for users and portfolios, and social features like following markets and transferring mana.

    • Your agent needs the crowd's number — live odds on elections, policy, macro prints and sport, from the venues where people put money behind the opinion. **What you can ask for** • "What are the current odds on this event?" • "List the open markets on this topic across both venues." • "Show recent trades and how the price moved." • "What is the implied probability now versus a week ago?" **How to use it** Point any MCP client at https://mcp.aisa.one/prediction-market-data/mcp and sign in with OAuth — there is no key to create or paste. 5 tools: Kalshi markets and trades, Polymarket markets, events and activity. **Why this rather than the source** Both venues in one shape, so the same question can be priced twice. **It is also a door to the rest** The same login reaches 26 sources and 580+ operations. Read the odds here, then ask the same agent for the market data or the news behind them — without adding a second server. **What it costs** Finding and inspecting an operation is free. Running one is billed per call at API prices, with no seat and no monthly minimum, and every call takes max_price_usd so an agent cannot overspend by accident. **Where else it reaches** https://mcp.aisa.one/finance/mcp for equities, crypto and prediction markets in one place.

    • Read-only MCP server for live Polymarket, Kalshi, Limitless odds; Manifold sentiment.

      https://mcp.parlay.run/mcp

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      MCP server for Polymarket prediction markets, enabling search, market details, pricing, and bet analysis through 6 tools, with optional authenticated trading via API key.
      6
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to query Polymarket prediction markets and analyze market data through the MCP interface.
      9
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Wraps the Manifold Markets public REST API into an MCP server, providing 40 tools for querying markets, users, groups, bets, comments, and more.
      10 npm
      MIT