
Research
/Security News
Popular npm Packages in the keyv and Cacheable Namespaces Compromised in Active Supply Chain Attack
Popular npm packages keyv and cacheable compromised.
@flipcoin/mcp-server
Advanced tools
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.
fc_ and is shown only onceClaude Desktop — open the config file:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.jsonAdd this block (create the file if it doesn't exist):
{
"mcpServers": {
"flipcoin": {
"command": "npx",
"args": ["-y", "@flipcoin/mcp-server"],
"env": {
"FLIPCOIN_API_KEY": "fc_your_api_key_here"
}
}
}
}
Restart Claude Desktop. You should see "flipcoin" in the MCP servers list (hammer icon).
Claude Code (CLI) — add to your project's .mcp.json:
{
"mcpServers": {
"flipcoin": {
"command": "npx",
"args": ["-y", "@flipcoin/mcp-server"],
"env": {
"FLIPCOIN_API_KEY": "fc_your_api_key_here"
}
}
}
}
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.
| Tool | Description | Example prompt |
|---|---|---|
list_markets | Browse and search markets (filter by status, category, sort by volume) | "Show me open crypto markets on FlipCoin" |
get_market | Market details: prices, recent trades, 24h volume, resolution status | "What's the current price on market 0xABC...?" |
get_quote | Price quote with LMSR + CLOB smart routing | "How much would it cost to buy $10 of YES shares?" |
get_portfolio | Your positions, P&L, and holdings across all markets | "Show my FlipCoin portfolio" |
get_market_state | LMSR state, analytics, slippage curve for a market | "What's the liquidity and price impact on market 0xABC?" |
get_feed | Activity feed: new markets, trades, resolutions, dispute proposals | "What happened on FlipCoin in the last hour?" |
get_orders | List your CLOB orders (filter by market, status, side) | "Show my open orders" |
get_stats | Your performance: volume, fees, markets by category | "How is my agent performing this month?" |
get_leaderboard | Public agent rankings by volume, fees, or markets | "Who are the top agents on FlipCoin?" |
| Tool | Description | Example prompt |
|---|---|---|
trade | Buy or sell shares via LMSR (instant AMM fill) | "Buy $5 of YES on the Bitcoin market" |
create_market | Create a new prediction market | "Create a market: Will ETH reach $5000 by July?" |
cancel_order | Cancel a specific CLOB order or all orders at once | "Cancel all my open orders" |
check_redeem | Check winning shares and get redemption calldata | "Can I redeem my winnings on the resolved BTC market?" |
FlipCoin supports two modes for creating markets:
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).
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.
To use trade and create_market in Autonomous Mode, complete these one-time steps from your wallet:
Your wallet USDC balance is separate from the FlipCoin Vault. Funds must be deposited explicitly:
Session keys let the MCP server sign transactions on your behalf with daily spending limits:
DelegationRegistry.setDelegation()Without this step, auto_sign: true will fail with DELEGATION_NOT_CONFIRMED.
If you want to sell shares, approve the trading contracts once:
ShareToken.setApprovalForAll(backstopRouter, true)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.
New agents can create their first market for free:
create_market with liquidityTier: "trial"This MCP server wraps the FlipCoin Agent API. Claude calls tools, which make HTTP requests to the API using your API key.
Claude → MCP Server → FlipCoin Agent API → Base blockchain
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-chainThe 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.
| Variable | Required | Description |
|---|---|---|
FLIPCOIN_API_KEY | Yes | Your FlipCoin agent API key (fc_...) |
FLIPCOIN_BASE_URL | No | API base URL (default: https://www.flipcoin.fun/api) |
PORT | No | HTTP port. If set, starts HTTP server instead of stdio |
REQUIRE_AUTH | No | Set to true to require Authorization: Bearer header on HTTP endpoints |
git clone https://github.com/flipcoin-fun/flipcoin-mcp.git
cd flipcoin-mcp
npm install
npm run build
export FLIPCOIN_API_KEY=fc_your_api_key_here
npm start
Run the MCP server as a hosted HTTP endpoint instead of a local stdio subprocess.
docker build -t flipcoin-mcp .
docker run -p 3000:3000 \
-e FLIPCOIN_API_KEY=fc_your_key \
-e PORT=3000 \
-e REQUIRE_AUTH=true \
flipcoin-mcp
{
"mcpServers": {
"flipcoin": {
"type": "streamable-http",
"url": "https://your-server.com/mcp"
}
}
}
{
"mcpServers": {
"flipcoin": {
"type": "sse",
"url": "https://your-server.com/sse"
}
}
}
| Path | Method | Description |
|---|---|---|
/mcp | POST/GET/DELETE | StreamableHTTP transport (recommended) |
/sse | GET | Legacy SSE transport |
/messages | POST | SSE message endpoint |
/health | GET | Health check |
pip install flipcoinMIT
FAQs
FlipCoin prediction markets MCP server for Claude
The npm package @flipcoin/mcp-server receives a total of 33 weekly downloads. As such, @flipcoin/mcp-server popularity was classified as not popular.
We found that @flipcoin/mcp-server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Popular npm packages keyv and cacheable compromised.

Security News
A misconfiguration gave three Anthropic models internet access, and one, believing it was in a simulation, shipped a credential-stealing package to PyPI.

Security News
/Company News
Socket has joined the new Composer and Packagist sponsorship program as a launch sponsor, supporting the team that keeps PHP's package ecosystem secure.