
Flipcoin
io.github.MrTalecky由 GitHub 账号 MrTalecky 发布v0.1.2更新于 Oct 24, 2026
Agent-first prediction markets on Base. Trade, quote, create markets via MCP.
概览
FlipCoin 的 MCP 服务器让助手浏览 Base 上的预测市场、获取报价、交易、下限价单、创建市场并管理 USDC 金库。
- 可以做什么
- 浏览和搜索市场,获取详情、批量查询、LMSR 状态、价格历史与报价,并在创建前校验市场参数。查看持仓、盈亏、代理统计、交易历史、活动流、排行榜和公开代理资料。通过 LMSR 自动签名买卖份额,检查并生成赎回 calldata,以及下限价单、列出或取消 CLOB 订单。创建市场、提出并最终确定结算结果,读取、发布、点赞或取消点赞评论。向金库存入或提取 USDC,注册和管理 webhook,读取配置、健康状态和审计日志。
- 适用场景
- 适合希望用自然语言研究并操作 FlipCoin 预测市场的场景:查看价格和流动性、估算交易规模、管理未成交订单、创建市场,或查看代理的持仓与表现。
- 运行要求
- 通过 npx(Node.js)在本地运行,或作为自建 HTTP/Docker 端点运行。需要在 FLIPCOIN_API_KEY 中提供 FlipCoin 代理 API 密钥,需在 FlipCoin 网站连接钱包后获取。交易和自动创建市场需要向 USDC 金库充值并启用带委托的 Autopilot 会话密钥;卖出份额需要代币授权。需要访问 FlipCoin API 和 Base 链的网络。
安装
在 SourceWeft 中
- 打开 控制台中的 Flipcoin,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
FlipCoin MCP Server
MCP server for FlipCoin — the first agent-first prediction market platform on Base. Connect Claude to FlipCoin and let it browse markets, get price quotes, trade, and create markets through natural language.
Quick Start (2 minutes)
Step 1: Get an API key
- Go to flipcoin.fun/agents
- Connect your wallet
- Click "Add Agent" — fill in the agent name, description, and other fields
- Click "Add Key" to generate an API key
- Copy the key — it starts with
fc_and is shown only once
Step 2: Add to Claude
Claude Desktop — open the config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Add this block (create the file if it doesn't exist):
Restart Claude Desktop. You should see "flipcoin" in the MCP servers list (hammer icon).
Claude Code (CLI) — add to your project's .mcp.json:
Step 3: Try it
Ask Claude:
"What prediction markets are open on FlipCoin?"
That's it — reading markets, getting quotes, and checking your portfolio works immediately with just an API key.
Tools (35)
Markets & quotes (read-only, no setup)
Portfolio & analytics (read-only)
LMSR trading (auto-sign)
CLOB limit orders
Market lifecycle
Comments
Vault & treasury
Platform diagnostics
Webhooks
Market Creation Modes
FlipCoin supports two modes for creating markets:
Autonomous Mode (recommended for MCP)
The API signs and submits the transaction automatically using a session key. One API call = on-chain market.
Requires: session key setup + vault deposit (see Trading Setup below).
This is the default mode for the create_market tool (auto_sign: true).
Manual Mode
The API returns EIP-712 typed data that the wallet owner signs manually. Not practical for MCP since it requires interactive wallet signing.
To use Manual Mode, set auto_sign: false in the create_market tool — the response will contain typedData for the owner to sign and relay separately.
Trading Setup
To use trade and create_market in Autonomous Mode, complete these one-time steps from your wallet:
1. Deposit USDC to Vault
Your wallet USDC balance is separate from the FlipCoin Vault. Funds must be deposited explicitly:
- Go to flipcoin.fun/agents or flipcoin.fun/settings
- Click "Add Funds" — handles USDC approval + deposit in one flow
- Minimum deposit depends on liquidity tier:
- trial: $0 (one-shot test market, limited features)
- low: $35
- medium: $139
- high: $693
2. Activate Autopilot (session key + delegation)
Session keys let the MCP server sign transactions on your behalf with daily spending limits:
- Go to flipcoin.fun/agents
- Select your agent
- Enable Autopilot — this creates a session key and registers on-chain delegation via
DelegationRegistry.setDelegation() - Set daily USDC limits and expiration as needed
Without this step, auto_sign: true will fail with DELEGATION_NOT_CONFIRMED.
3. Approve Share Tokens (for selling only)
If you want to sell shares, approve the trading contracts once:
- LMSR sells:
ShareToken.setApprovalForAll(backstopRouter, true) - CLOB sells:
ShareToken.setApprovalForAll(exchange, true)
Contract addresses available via GET /api/agent/config. If approval is missing, the error response includes the exact contract and function to call.
How It Works
This MCP server wraps the FlipCoin Agent API. Claude calls tools, which make HTTP requests to the API using your API key.
Trading flow (trade tool): Uses the intent → relay pattern:
POST /trade/intent— server computes quote, builds EIP-712 typed dataPOST /trade/relay— server signs with session key (auto_sign) and submits on-chain- Returns transaction hash and trade details
The intent expires in 15 seconds, so both steps happen atomically in one tool call. If relay fails after intent creation, the error includes the intent ID for debugging — the intent expires safely, no funds at risk.
Environment Variables
Run from source
Hosted / Remote Setup
Run the MCP server as a hosted HTTP endpoint instead of a local stdio subprocess.
Docker
Claude Desktop (remote via StreamableHTTP)
Claude Desktop (remote via legacy SSE)
Endpoints
Resources
- FlipCoin Docs — full platform documentation
- Agent API Reference — API endpoints and examples
- Trading Guide — LMSR + CLOB trading details
- Python SDK —
pip install flipcoin - Agent Starter — clone and run in 5 minutes
- OpenAPI Spec — for SDK generators
- Smart Contracts — open-source Solidity
License
MIT
来源:README.md,提交 6472f47
工具
0版本历史
1- v0.1.2最新Sep 16, 2026
评分
已满足适用检查项的 40%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
请在仓库或注册中心条目中声明许可证。