Model Context Protocol (MCP) is the standard that lets AI models like Claude and GPT-4o call external services as if they were native capabilities. Instead of writing custom function-calling wrappers for every API your agent needs, you connect an MCP server — a small process that exposes tools the model can discover and invoke automatically.

Purple Flea runs MCP servers for all six of its products. A Claude agent configured with Purple Flea's MCP server can flip a casino coin, check a wallet balance, place a trade, register a domain, create an escrow, or claim faucet funds — just by describing what it wants to do in natural language, with no custom integration code required.

What Is MCP?

MCP was introduced by Anthropic in late 2024 and has since been adopted across the AI tooling ecosystem. It defines a client-server protocol where:

The transport layer can be stdio (for local servers launched as child processes) or StreamableHTTP (for remote servers accessible over the network). Purple Flea's Faucet and Escrow services expose StreamableHTTP MCP endpoints, making them accessible to any agent regardless of where it is running.

MCP vs Direct REST API: What Is the Difference?

Both approaches let your agent call external services. The differences are in developer experience and agent flexibility:

Aspect Direct REST API MCP Server
Setup Write tool definitions manually for each endpoint Add one config block; server advertises all tools automatically
Tool discovery Static — you define what the agent can call Dynamic — agent queries server for available tools at runtime
Schema maintenance Must update manually when API changes Server always returns current schema
Multi-agent sharing Each agent needs its own integration code Any MCP-compatible agent can connect to the same server
Framework portability Specific to OpenAI, Anthropic, or LangChain format Works with any MCP-compatible host

For one-off integrations, a direct REST call is fine. For production agents that need to stay current with API changes and work across frameworks, MCP is the better choice.

Purple Flea's MCP Servers

Purple Flea operates MCP endpoints for all its services. Four run as standard MCP servers, and two — Faucet and Escrow — expose StreamableHTTP endpoints that any remote agent can connect to directly:

Full MCP Configuration for Claude Desktop

To connect all Purple Flea services to Claude Desktop (or any MCP-compatible runtime), add the following to your claude_desktop_config.json:

claude_desktop_config.json
{ "mcpServers": { "purpleflea-casino": { "command": "npx", "args": ["-y", "@purpleflea/mcp-casino"], "env": { "PURPLEFLEA_WALLET_ID": "your-wallet-id" } }, "purpleflea-trading": { "command": "npx", "args": ["-y", "@purpleflea/mcp-trading"], "env": { "PURPLEFLEA_WALLET_ID": "your-wallet-id" } }, "purpleflea-wallet": { "command": "npx", "args": ["-y", "@purpleflea/mcp-wallet"], "env": { "PURPLEFLEA_WALLET_ID": "your-wallet-id" } }, "purpleflea-faucet": { "type": "streamablehttp", "url": "https://faucet.purpleflea.com/mcp" }, "purpleflea-escrow": { "type": "streamablehttp", "url": "https://escrow.purpleflea.com/mcp" } } }

With this config in place, Claude has access to the full Purple Flea platform. Ask it to "claim some faucet funds for my new agent" or "create an escrow for 0.1 XMR" and it will call the appropriate tools automatically.

How Claude Uses MCP: A casino_flip Example

To understand what happens under the hood when Claude calls an MCP tool, here is the sequence for a simple casino flip request:

  1. The user says "flip a coin for 0.01 XMR, guess heads"
  2. Claude sees the casino_flip tool in its available tools list (advertised by the MCP server)
  3. Claude generates a tool call: casino_flip(wallet_id="wlt_abc", amount=0.01, guess="heads")
  4. The MCP host (Claude Desktop or SDK) intercepts the tool call and forwards it to the MCP server
  5. The MCP server makes the actual HTTP call to https://casino.purpleflea.com/api/flip
  6. The result is returned to Claude as tool output
  7. Claude reads the result and responds: "The coin landed on heads — you won 0.0198 XMR!"

From the developer's perspective, none of steps 3-6 require any code. The MCP server handles the translation from model tool call to HTTP request entirely.

Using Purple Flea MCP from a Python Agent

For programmatic agents (not Claude Desktop), use the MCP Python SDK to connect to the StreamableHTTP servers for Faucet and Escrow:

mcp_agent.py
import asyncio from mcp import ClientSession from mcp.client.streamable_http import streamablehttp_client async def claim_faucet_via_mcp(agent_id: str, wallet_address: str): # Connect to Purple Flea Faucet MCP server (StreamableHTTP) async with streamablehttp_client("https://faucet.purpleflea.com/mcp") as (read, write, _): async with ClientSession(read, write) as session: await session.initialize() # List available tools (auto-discovered from server) tools = await session.list_tools() print("Available tools:", [t.name for t in tools.tools]) # Register the agent first reg = await session.call_tool("register_agent", { "agent_id": agent_id, "wallet_address": wallet_address }) print("Registration:", reg.content) # Claim the free XMR claim = await session.call_tool("claim_faucet", { "agent_id": agent_id }) print("Faucet claim:", claim.content) asyncio.run(claim_faucet_via_mcp( agent_id="my-new-agent-001", wallet_address="your-xmr-address" ))

MCP Tools vs MCP Resources

MCP defines two types of server capabilities: tools and resources. Tools are action-oriented — the model calls a tool and gets a result. Resources are data-oriented — the server exposes read-only data that the model can reference as context without an explicit invocation.

Purple Flea's MCP servers primarily expose tools, since financial operations (placing bets, sending funds, creating escrows) are inherently action-oriented. The trading server also exposes market data as resources, allowing Claude to reference current price feeds as background context even when not explicitly making a trade decision.

Quick start: The fastest path to a working Purple Flea MCP integration is the Faucet StreamableHTTP endpoint. It requires no authentication, no wallet setup, and no configuration beyond the URL. Point any MCP client at https://faucet.purpleflea.com/mcp and your agent can claim free XMR in two tool calls.

StreamableHTTP: MCP for Remote Agents

The original MCP transport was stdio — the host launches the MCP server as a child process and communicates via standard input/output. This works perfectly for local agents but breaks down for cloud-hosted agents that cannot launch local processes.

StreamableHTTP solves this. It is an HTTP-based transport where the MCP server is a web endpoint and the client connects over standard HTTPS. This is why Purple Flea's Faucet (https://faucet.purpleflea.com/mcp) and Escrow (https://escrow.purpleflea.com/mcp) are accessible to any agent, anywhere — a Lambda function, a container on GCP, or a Vercel edge function can all connect to them without any local process management.

Conclusion

MCP is rapidly becoming the standard integration layer between AI models and external services. For agents that need to interact with crypto infrastructure, it removes the boilerplate of maintaining tool definitions, handling schema updates, and writing framework-specific wrappers for every API endpoint.

Purple Flea's full suite — Casino, Trading, Wallet, Domains, Escrow, and Faucet — is accessible over MCP. Add the config block, and any MCP-compatible agent has the full Purple Flea financial stack available as first-class tools.