Manifold MCP服务端添加福利群:解决AI开发者的「MCP实战痛点」一个用于与 Manifold Markets 预测市场交互的 MCP 服务器。该服务器通过简洁的 MCP 接口提供了对 Manifold 功能的全面访问,从而实现复杂的市场互动和集体智能机制。
服务器通过结构化的工具系统实现了对 Manifold Markets API 能力的完整映射:
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:在用户之间转移 mana服务器已经通过全面的交互轨迹进行了测试:
市场发现与关注
交易操作
权限管理
这些操作已经实现,但需要特定的用户角色:
npm install manifold-mcp-server
添加到 ~/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"
}
}
}
}

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

服务器实现了全面的错误处理:
输入验证
API 通信
业务逻辑
错误响应格式
{
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

欢迎贡献!感兴趣的领域:
MIT