mcp-pay-server
0
MCP Pay Server is a standalone implementation of the Model Context Protocol, providing HTTP and SSE transport with a pre-pay credit system using USDC deposits. It supports bidirectional communication and offers various tools and resources.
MCP Pay Server
A standalone implementation of the Model Context Protocol (MCP) server featuring HTTP+SSE transport and a pre-pay credit system.
Features
- Exposes MCP tools, resources, and prompts
- Supports bidirectional communication with HTTP+SSE
- Implements a payment system using USDC deposits on Base or Base Sepolia
- Built with Express, TypeScript, Viem, and Zod
Usage
Start the server and monitor USDC deposits to the configured address.
Payment System Overview
The server uses a pre-pay credit system verified by cryptographic signatures. Clients connect, fetch payment capabilities, send USDC to the server's deposit address, and use paid tools by verifying their balance and signing requests.
Available Endpoints
POST /mcp
for client requestsGET /mcp
for SSE stream
Available Tools
greet
: A greeting tool requiring paymentpayments_getBalance
: Returns the credit balance (free)
Available Resources
mcp-pay://server/payment/info
: Returns the deposit address.