Skip to main content
Glama

Manifold Markets MCP Server

Manifold Markets MCP 服务器

用于与 Manifold Markets 预测市场交互的 MCP 服务器。该服务器通过简洁的 MCP 界面提供对 Manifold 各项功能的全面访问,从而实现复杂的市场交互和集体智能机制。

建筑学

服务端通过结构化的工具体系实现了Manifold Markets API功能的完整映射:

核心组件

  • 模式层:所有操作的基于 Zod 的验证模式
  • API 集成:直接映射到 Manifold 的 REST 端点
  • 工具处理程序:通过适当的错误管理来处理请求
  • 类型安全:完整的 TypeScript 实现

工具类别

市场创造与管理
  • create_market :创建市场(二进制、多选、伪数字、轮询)
  • unresolve_market :恢复已解决的市场
  • close_market :关闭交易市场
  • add_answer :向多项选择市场添加选项
市场互动
  • follow_market :跟踪感兴趣的市场
  • react :喜欢/不喜欢市场和评论
  • add_bounty :添加赏金以供分析
  • award_bounty :奖励有价值的贡献
交易业务
  • place_bet :执行市场交易
  • cancel_bet :取消限价订单
  • sell_shares :清算头寸
流动性管理
  • add_liquidity :提供市场流动性
  • remove_liquidity :撤回提供的流动性
信息检索
  • search_markets :使用过滤器查找市场
  • get_market :详细的市场信息
  • get_user :用户资料数据
  • get_positions :投资组合跟踪
社交功能
  • send_mana :在用户之间转移法力

已验证的功能

服务器已经通过全面的交互轨迹测试:

测试成功

  1. 市场发现与跟踪
    • ✅ 带过滤器的市场搜索
    • ✅ 市场关注
    • ✅ 详细的市场信息检索
  2. 交易业务
    • ✅ 流动性供应
    • ✅ 投注位置及概率更新
    • ✅ 仓位清算
    • ✅ 出售股票
  3. 权限管理
    • ✅基于角色的访问控制
    • ✅ 身份验证处理
    • ✅ 错误消息

权限受限操作

这些操作已实现但需要特定的用户角色:

  • 市场解决/未解决(市场创造者)
  • 市场关闭(市场创建者)
  • 赏金管理(市场创造者)
  • 流动性移除(流动性提供者)

先决条件

  • Node.js 18 或更高版本
  • npm 或 yarn
  • Manifold Markets API密钥
  • 创建市场最低余额为 1000 马来西亚林吉特

安装

1. 安装软件包

npm install manifold-mcp-server

2. 获取您的 API 密钥

  1. 登录Manifold Markets
  2. 转到您的个人资料设置
  3. 生成 API 密钥
  4. 确保帐户具有足够的法力以进行预期操作

3. 配置 MCP 设置

对于克劳德桌面

添加到~/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" } } } }
对于 Cline(VSCode 扩展)

添加到~/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" } } } }

工具文档

市场创造与管理

创建市场

创建一个新的预测市场:

{ 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 }
未解决的市场

取消解决先前已解决的市场:

{ contractId: string answerId?: string // For multiple choice markets }
收盘价

关闭交易市场:

{ contractId: string closeTime?: number // Optional close time }

市场互动

关注市场

关注或取消关注市场:

{ contractId: string follow: boolean }
反应

对市场或评论做出反应:

{ contentId: string contentType: 'comment' | 'contract' remove?: boolean reactionType: 'like' | 'dislike' }

交易业务

下注

在市场上下注:

{ marketId: string amount: number outcome: 'YES' | 'NO' limitProb?: number // 0.01-0.99 }
出售股票

在市场上出售股票:

{ marketId: string outcome?: 'YES' | 'NO' shares?: number // Defaults to all }

流动性管理

添加流动性

向市场池添加流动性:

{ marketId: string amount: number }
移除流动性

从市场池中移除流动性:

{ contractId: string amount: number }

错误处理

服务器实现了全面的错误处理:

  1. 输入验证
    • 通过 Zod 模式检查参数类型
    • 值范围验证
    • 必填字段验证
  2. API 通信
    • 身份验证错误
    • 网络故障
    • 速率限制
    • 权限检查
  3. 业务逻辑
    • 余额不足
    • 无效的市场状态
    • 未经授权的操作
  4. 错误响应格式
{ 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

贡献

欢迎投稿!感兴趣的领域:

  • 先进的市场分析工具
  • 投资组合优化功能
  • 与其他预测平台集成
  • 文档改进

安全

  • 通过环境变量处理的 API 密钥
  • 所有参数的输入验证
  • 速率限制保护
  • 安全错误消息
  • 基于角色的访问控制

执照

麻省理工学院

Install Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

通过简洁的 MCP 界面提供对 Manifold Markets 预测平台的全面访问,使用户能够创建市场、下注、管理流动性并通过自然语言利用社交功能。

  1. 建筑学
    1. 核心组件
    2. 工具类别
  2. 已验证的功能
    1. 测试成功
    2. 权限受限操作
  3. 先决条件
    1. 安装
      1. 安装软件包
      2. 获取您的 API 密钥
      3. 配置 MCP 设置
    2. 工具文档
      1. 市场创造与管理
      2. 市场互动
      3. 交易业务
      4. 流动性管理
    3. 错误处理
      1. 发展
        1. 贡献
          1. 安全
            1. 执照

              Related MCP Servers

              • -
                security
                A
                license
                -
                quality
                MCP server that provides AI assistants access to stock market data including financial statements, stock prices, and market news through a Model Context Protocol interface.
                Last updated a month ago
                322
                Python
                MIT License
                • Apple
              • -
                security
                F
                license
                -
                quality
                An MCP server that enables AI models like Claude to interact with the Trading Simulator API for checking balances, viewing prices, and executing trades with automatic chain detection.
                Last updated 2 months ago
                TypeScript
                • Linux
                • Apple
              • -
                security
                F
                license
                -
                quality
                Provides real-time access to global stock market data including current prices, historical charts, and company financial information through a Model Context Protocol (MCP) server for AI assistants.
                Last updated 3 months ago
                TypeScript
                • Linux
                • Apple
              • -
                security
                -
                license
                -
                quality
                Provides an MCP server that allows large language models to access real-time and historical Bitcoin market data from Binance, including current prices, order book data, recent trades, and price history through a standardized interface.
                Last updated 3 months ago
                1
                JavaScript
                MIT License

              View all related MCP servers

              MCP directory API

              We provide all the information about MCP servers via our MCP API.

              curl -X GET 'https://glama.ai/api/mcp/v1/servers/bmorphism/manifold-mcp-server'

              If you have feedback or need assistance with the MCP directory API, please join our Discord server