Documentation Index
Fetch the complete documentation index at: https://docs.snack.money/llms.txt
Use this file to discover all available pages before exploring further.
What is MCP?
The Model Context Protocol (MCP) is an open protocol that standardizes how AI systems interact with external tools and data sources. Snack Money implements MCP with x402 payment support, enabling AI agents to make paid API calls seamlessly.How It Works
MCP uses JSON-RPC 2.0 for communication. When an AI agent calls a Snack Money tool through MCP:- Tool Discovery - Agent queries available tools via
tools/list - Tool Invocation - Agent calls a tool with
tools/call - Payment Required - Server returns error code
-32402with payment requirements - Payment Signing - Agent signs the payment using x402 protocol
- Retry with Payment - Agent retries with payment proof
- Success - Server processes the payment and returns results
MCP Payment Flow
Available Tools
Snack Money provides the following MCP tools, each requiring x402 payment:| Tool | Description | Parameters |
|---|---|---|
pay_farcaster | Send USDC to a Farcaster user | receiver, amount, description |
pay_twitter | Send USDC to a Twitter/X user | receiver, amount, description |
pay_email | Send USDC to an email address | receiver, amount, description |
pay_web | Send USDC to a web domain owner | receiver, amount, description |
pay_github | Send USDC to a GitHub user | receiver, amount, description |
batch_pay | Send USDC to multiple recipients | payments[] |
Quick Start
1. Install Dependencies
2. Initialize MCP Session
3. List Available Tools
4. Call a Tool with Payment
Full Example
Check out the complete MCP example in our GitHub repository for:- Base (EVM) network implementation
- Solana network implementation
- Tool listing and discovery
- Batch payment support
- Error handling
Integration with AI Agents
Coinbase CDP Payments MCP
Snack Money’s MCP implementation is compatible with Coinbase CDP Payments MCP, allowing you to:- Use Snack Money as a payment provider in CDP-powered AI agents
- Send payments to social media users through CDP’s MCP interface
- Integrate with Coinbase’s wallet infrastructure
- Leverage CDP’s security and compliance features
Other AI Development Tools
Popular AI development tools that support MCP include:- Claude Desktop - Native MCP support for tool calling
- Continue.dev - VS Code extension with MCP support
- Cline - Command-line interface for MCP tools
- Custom Agents - Build your own using the MCP SDK
Security Considerations
- All payments require cryptographic signatures via x402
- Task IDs prevent replay attacks
- Payments are verified on-chain before processing
- Rate limiting applies to prevent abuse
Related Documentation
- x402 Protocol - Learn about the payment protocol
- A2A Protocol - Agent-to-Agent communication
- API Reference - Full API documentation