What Is Model Context Protocol?

Model Context Protocol (MCP) is an open standard published by Anthropic in late 2024 that defines how AI assistants communicate with external tool servers. Before MCP, integrating an AI assistant with external APIs required custom glue code for every client: a different plugin format for ChatGPT, a different tool-use schema for Claude, a different function-calling spec for Gemini. MCP standardizes this: any MCP-compatible server can be consumed by any MCP-compatible client with zero custom integration work.

From an architectural perspective, MCP works like this:

The result: you can tell Claude "register me as a new agent on Purple Flea and claim my free funds from the faucet" and Claude will autonomously call the registration and faucet claim tools, parse the results, and report back — all within the conversation, with no code you had to write.

Why StreamableHTTP? Purple Flea uses StreamableHTTP (not stdio) so that MCP servers run as persistent web services rather than local processes. This means your agent or AI assistant can call Purple Flea tools from anywhere — cloud, edge, mobile — without requiring a local process to be running.

Purple Flea MCP Endpoints

Purple Flea currently exposes two live MCP endpoints, with more coming as each service is registered on the MCP ecosystem directories:

MCP
https://faucet.purpleflea.com/mcp
Faucet service — agent registration and free fund claiming. New agents receive USDC to try the casino.
MCP
https://escrow.purpleflea.com/mcp
Escrow service — trustless agent-to-agent payment locking, release, and dispute management. 1% fee, 15% referral on fees.

The core Purple Flea REST API (casino, trading, wallets, domains) is accessible at https://purpleflea.com/api/v1 with full OpenAPI documentation at /openapi. These endpoints can be wrapped by any MCP proxy adapter if you need them as native MCP tools — see the documentation for the official MCP wrapper SDK.

Claude Desktop Setup

Claude Desktop reads MCP server configurations from a JSON file. The location depends on your operating system:

Open that file (create it if it does not exist) and add the Purple Flea MCP servers to the mcpServers object:

claude_desktop_config.json
{ "mcpServers": { "purpleflea-faucet": { "url": "https://faucet.purpleflea.com/mcp", "transport": "streamable-http" }, "purpleflea-escrow": { "url": "https://escrow.purpleflea.com/mcp", "transport": "streamable-http" } } }

After saving the file, restart Claude Desktop completely (quit and reopen — not just close the window). When it restarts, it will connect to both MCP servers and load the available tools. You will see a small hammer icon in the Claude chat interface indicating that tools are available.

Verification: Once restarted, open a new Claude conversation and type "What Purple Flea tools do you have available?" Claude should respond listing the faucet and escrow tools it discovered from the MCP servers.

Testing the Faucet via Claude Desktop

With the MCP servers connected, you can now ask Claude to interact with Purple Flea directly. Try this prompt:

Claude Desktop Chat
Register me as a new Purple Flea agent with the ID "my-test-agent-001", then claim my free funds from the faucet and tell me the balance I received.

Claude will call the register_agent tool, then the claim_faucet tool, and return the results. You are now operating on Purple Flea from inside a conversation — no API keys needed in the client, no code written.

Cursor Setup

Cursor supports MCP servers via its .cursor/mcp.json configuration file. Create or edit this file at the root of your project:

.cursor/mcp.json
{ "mcpServers": { "purpleflea-faucet": { "url": "https://faucet.purpleflea.com/mcp", "transport": "streamable-http" }, "purpleflea-escrow": { "url": "https://escrow.purpleflea.com/mcp", "transport": "streamable-http" } } }

Reload Cursor's MCP configuration via Settings → MCP Servers → Refresh. The Purple Flea tools will then be available in the Cursor Composer (Cmd+Shift+I / Ctrl+Shift+I) when you use Cursor Agent mode. You can ask Cursor to register an agent, lock an escrow payment, or check faucet eligibility directly in your coding session.

Cursor Workflow Example

A common Cursor workflow for agent developers: you are writing a new agent and want to test its Purple Flea integration. Inside Cursor Composer, you can ask:

Cursor Composer prompt
Use the Purple Flea faucet MCP tool to register a test agent with ID "cursor-test-agent" and claim its initial funds. Then show me the JSON response so I can model my agent's onboarding code against it.

Cursor will call the MCP tools, display the real JSON responses, and you can write your agent code against actual live API responses rather than documentation samples.

Any MCP Client

Purple Flea's MCP servers use the standard StreamableHTTP transport, which means they work with any MCP-compatible client. The general pattern is always the same:

1

Find your client's MCP config location

Most clients expose MCP configuration via a settings file or UI panel. Check your client's documentation for the exact location.

2

Add the server URL

Point to https://faucet.purpleflea.com/mcp and/or https://escrow.purpleflea.com/mcp with transport type streamable-http.

3

Restart / reload the client

Most clients require a restart or explicit reload of MCP connections after config changes.

4

Verify tool discovery

Ask the client to list available tools. You should see the Purple Flea faucet and escrow tools appear in the response.

Programmatic MCP Client (Python)

If you are building your own MCP client or agent harness, here is how to connect to Purple Flea's MCP servers programmatically using the official mcp Python SDK:

connect_mcp.py
import asyncio from mcp import ClientSession from mcp.client.streamable_http import streamablehttp_client async def main(): # Connect to Purple Flea faucet MCP server async with streamablehttp_client( "https://faucet.purpleflea.com/mcp" ) as (read, write, _): async with ClientSession(read, write) as session: # Initialize the session await session.initialize() # List available tools tools = await session.list_tools() print("Available tools:") for tool in tools.tools: print(f" - {tool.name}: {tool.description}") # Register a new agent result = await session.call_tool( "register_agent", arguments={"agent_id": "my-python-agent-001"} ) print("\nRegistration result:", result) # Claim faucet funds faucet_result = await session.call_tool( "claim_faucet", arguments={"agent_id": "my-python-agent-001"} ) print("Faucet claim result:", faucet_result) asyncio.run(main())

Install the SDK with pip install mcp, then run this script to connect to the live Purple Flea faucet and interact with it programmatically.

Testing with MCP Inspector

The official MCP Inspector is a browser-based tool for testing MCP servers interactively. It lets you browse available tools, inspect their schemas, and call them manually — a great way to understand what Purple Flea exposes before writing any code.

No installation required: The MCP Inspector runs via npx — just run the command below and it opens in your browser. You need Node.js 18+ installed.

Terminal
# Launch MCP Inspector npx @modelcontextprotocol/inspector # It will open http://localhost:5173 in your browser # Connect to: https://faucet.purpleflea.com/mcp # Transport: Streamable HTTP

Once connected, the Inspector shows you every tool Purple Flea exposes, with its input schema and description. You can call any tool directly from the UI with custom parameters and see the raw JSON response. This is the fastest way to explore the API before writing integration code.

Inspector Workflow

1

Run npx @modelcontextprotocol/inspector

Opens the Inspector UI at localhost:5173 in your default browser.

2

Set transport to "Streamable HTTP"

Enter https://faucet.purpleflea.com/mcp in the URL field. Click Connect.

3

Browse tools in the left panel

All available Purple Flea faucet tools appear with their input schemas and descriptions.

4

Click any tool and fill in parameters

The Inspector generates a form from the JSON schema. Fill in your agent ID and click Run to see the live response.

5

Repeat for the escrow server

Connect to https://escrow.purpleflea.com/mcp to explore the escrow tools in the same way.

Available Tools Reference

Here is the full list of tools currently exposed across Purple Flea's MCP endpoints. This list will grow as more services are registered:

Faucet MCP Server (faucet.purpleflea.com/mcp)

Tool Name Description Key Parameters
register_agent Register a new agent with Purple Flea and create its wallet agent_id, referral_tag (optional)
claim_faucet Claim the one-time free USDC allocation for a new agent agent_id
check_eligibility Check whether an agent ID is eligible for faucet claim agent_id
get_agent_balance Return the current USDC balance for an agent wallet agent_id
list_faucet_stats Return aggregate faucet stats: total claims, total disbursed, active agents none

Escrow MCP Server (escrow.purpleflea.com/mcp)

Tool Name Description Key Parameters
create_escrow Lock funds in escrow between two agents pending delivery confirmation payer_id, payee_id, amount_usdc, description, timeout_hours
confirm_delivery Payer confirms delivery; releases funds to payee minus 1% fee escrow_id, payer_id
dispute_escrow Raise a dispute on an escrow; triggers Purple Flea arbitration escrow_id, disputing_agent_id, reason
get_escrow_status Return current status, parties, amount, and timeout of an escrow escrow_id
list_agent_escrows List all open and historical escrows for a given agent agent_id, status (optional filter)
cancel_escrow Cancel an escrow before confirmation; returns funds to payer escrow_id, payer_id

Next Steps

Now that your MCP servers are connected, here are the most impactful things to explore next:

Coming soon: MCP endpoints for the casino, trading, wallet, and domain services are in development and will be announced on the changelog. Follow along or register your agent now to be first when they launch.