Model Context Protocol

Purple Flea MCP Servers
for Claude

Give Claude native access to casino games, live trading positions, multi-chain crypto wallets, and domain registration — all via Anthropic's Model Context Protocol. No wrappers, no glue code.

⬡ View MCP Server on GitHub Read the Docs →

What Is Model Context Protocol?

Model Context Protocol (MCP) is an open standard developed by Anthropic that allows AI models like Claude to securely call external tools, read live data sources, and execute real-world actions during a conversation. Think of it as a universal plugin layer: instead of baking tool logic into every prompt, you register a server once and Claude automatically discovers its capabilities.

MCP servers communicate with Claude over a lightweight JSON-RPC transport — either stdio (for Claude Desktop) or HTTP with Server-Sent Events (for the Claude API). When Claude determines a tool call is appropriate, it sends a structured request to the MCP server, receives a structured response, and incorporates the result naturally into its reply. The user never has to write a single line of function-calling code.

Purple Flea's MCP server is purpose-built for on-chain and financial tooling. It packages nineteen production-ready tools across six categories — casino, trading, wallets, domains, faucet, and escrow — into a single npm package that Claude can use out of the box.

15
MCP tools exposed
4
Tool categories
7
Supported blockchains
2
Transport modes

All 19 MCP Tools at a Glance

Every tool is fully typed with JSON Schema, supports structured error responses, and is safe to call concurrently. Claude will automatically choose the right tool based on your conversation — no explicit invocation syntax needed.

Casino Tools

casino_coin_flip
Flip a provably fair coin. Choose heads or tails, set your wager.
casino_dice
Roll 1–6 dice with configurable sides, win multiplier returned.
casino_roulette
Full European roulette — bet on number, color, odd/even, columns.
casino_crash
Crash game with configurable auto-cashout multiplier.

Trading Tools

trading_open_position
Open a long or short perpetual position with leverage on any listed market.
trading_close_position
Close an open position fully or partially. Returns realized PnL.
trading_get_positions
List all open positions with unrealized PnL and liquidation prices.
trading_get_markets
Fetch available trading pairs, funding rates, and 24h volume.

Wallet Tools

wallet_get_address
Derive the address for a given chain from the agent's HD wallet.
wallet_get_balance
Return native token and ERC-20/SPL balances across all chains.
wallet_send
Broadcast a signed transaction — ETH, BTC, SOL, BNB, MATIC, AVAX.
wallet_swap
Swap tokens using the best aggregated DEX route (1inch, Jupiter, Paraswap).

Domain Tools

domains_check
Check whether a .eth, .sol, or Web2 domain is available.
domains_register
Register an available domain. Handles payment and ownership transfer.
domains_list
List all domains owned by the connected wallet.

Faucet Tools

faucet_claim
Claim $1 free USDC for a new agent — zero deposit required. One-time per agent.
faucet_stats
Get public faucet statistics: total claims, agents onboarded, USDC distributed.

Escrow Tools

escrow_create
Lock funds for an agent-to-agent payment. Set counterparty, amount, and timeout.
escrow_complete
Counterparty signals task completion — triggers release eligibility.
escrow_release
Creator releases locked funds to counterparty. 1% commission deducted.
escrow_status
Get escrow details, event log, and current status (locked/released/disputed).

Set Up in Under 5 Minutes

Purple Flea's MCP server ships as a standard npm package. You install it globally, drop a config block into your Claude Desktop settings file, and restart the app. Claude will immediately list the tools in its system context and use them whenever relevant.

1

Install the package

Install the Purple Flea MCP server globally via npm so the binary is on your PATH.

terminal
npm install -g @purpleflea/mcp-server
2

Get your API key

Sign up at purpleflea.xyz to generate a free API key. Your key authenticates wallet access and casino sessions.

terminal
purpleflea auth login --key YOUR_API_KEY
3

Add to claude_desktop_config.json

Open your Claude Desktop configuration file. On macOS it lives at ~/Library/Application Support/Claude/claude_desktop_config.json. On Windows it is at %APPDATA%\Claude\claude_desktop_config.json. Add the following block:

claude_desktop_config.json
{
  "mcpServers": {
    "purpleflea": {
      "command": "purpleflea-mcp",
      "args": [],
      "env": {
        "PURPLEFLEA_API_KEY": "YOUR_API_KEY_HERE",
        "PURPLEFLEA_WALLET_ID": "YOUR_WALLET_ID",
        "PURPLEFLEA_NETWORK": "mainnet"
      }
    }
  }
}
4

Restart Claude Desktop

Fully quit and relaunch Claude Desktop. You should see a hammer icon in the chat toolbar, confirming that MCP tools are active and discoverable.

How Claude Uses the Tools in a Conversation

Below is a real exchange showing Claude autonomously chaining multiple MCP tool calls — checking a balance, executing a token swap, opening a trading position, and then confirming the result. No special syntax is required from the user; Claude infers tool intent from natural language.

U

Check my ETH balance, swap 0.1 ETH for USDC, and then open a 2x long BTC position with the USDC proceeds.

C
tool call → wallet_get_balance
{ "chain": "ethereum", "asset": "ETH" }
// → { "balance": "0.847 ETH", "usd_value": "$2,114.50" }
tool call → wallet_swap
{ "from": "ETH", "to": "USDC", "amount": "0.1", "chain": "ethereum" }
// → { "received": "249.82 USDC", "tx_hash": "0xabc...def", "route": "1inch" }
tool call → trading_open_position
{ "market": "BTC-PERP", "side": "long", "collateral": "249.82 USDC", "leverage": 2 }
// → { "position_id": "pos_7x92k", "size": "0.0098 BTC", "entry_price": "$50,981" }

Done! Your ETH balance was 0.847 ETH ($2,114). I swapped 0.1 ETH for 249.82 USDC via 1inch with minimal slippage, then opened a 2x BTC long at $50,981 using the full USDC amount. Position ID: pos_7x92k. Liquidation price is approximately $38,235.

Works With the Claude API via HTTP Transport

Claude Desktop uses stdio transport, but if you're building an application on top of the Claude API you can connect Purple Flea's MCP server over HTTP with Server-Sent Events. This lets your backend relay tool calls to the Purple Flea server without the user needing Claude Desktop installed at all.

Start the Purple Flea MCP server in HTTP mode on any port, then pass the server URL when you create a Claude API session. The API will discover available tools from the /mcp/tools endpoint and route tool-use blocks to your server automatically.

start server in HTTP mode
purpleflea-mcp --transport http --port 3099 --api-key YOUR_KEY
claude api request (node.js)
import Anthropic from '@anthropic-ai/sdk';

const client = new Anthropic();

const response = await client.beta.messages.create({
  model: 'claude-opus-4-6',
  max_tokens: 1024,
  mcp_servers: [
    {
      type: 'url',
      url: 'http://localhost:3099/mcp',
      name: 'purpleflea'
    }
  ],
  messages: [
    { role: 'user', content: 'Flip a coin and bet 10 USDC on heads' }
  ]
});

console.log(response.content);

More Ways to Use Purple Flea

Purple Flea's APIs power agents across every major framework. Explore integrations and deep-dive API references below.

Ready to Give Claude Real Blockchain Superpowers?

The Purple Flea MCP server is open source, free to run locally, and takes less than five minutes to configure. Join hundreds of developers already using Claude to trade, game, and transact on-chain.