pay-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@pay-mcp Check my USDC balance"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Pay-MCP šø
MCP server for USDC payments on Base ā Enable any Claude Code agent to send and receive payments.
šÆ Overview
Pay-MCP is a Model Context Protocol (MCP) server that wraps USDC payment capabilities on the Base blockchain. It allows AI agents (like Claude Code) to:
š° Check USDC balances ā Query any wallet's USDC balance
š¤ Send USDC payments ā Transfer USDC to any address
š„ Generate payment requests ā Create payment links with deep linking support
š View transaction history ā List recent sent/received transfers
Related MCP server: @true402.dev/mcp-server
šļø Architecture
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā Your Computer ā
ā āāāāāāāāāāāāāāāāāāā stdio āāāāāāāāāāāāāāāāāāāāāāāā ā
ā ā Claude Code āāāāāāāāāāāāāāāāāŗā Pay-MCP ā ā
ā ā (MCP Client) ā JSON-RPC ā (MCP Server) ā ā
ā āāāāāāāāāāāāāāāāāāā ā ā ā
ā ā āāāāāāāāāāāāāāāāāā ā ā
ā ā ā PayWallet ā ā ā
ā ā ā āā viem ā ā ā
ā ā ā āā ERC-20 ABI ā ā ā
ā ā āāāāāāāāāāāāāāāāāā ā ā
ā āāāāāāāāāāāā¬āāāāāāāāāāāā ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¼āāāāāāāāāāāāāāāā
ā HTTPS/RPC
ā¼
āāāāāāāāāāāāāāāāāāāāāāāā
ā Base Blockchain ā
ā āāāāāāāāāāāāāāāāāā ā
ā ā USDC Contract ā ā
ā ā (Circle) ā ā
ā āāāāāāāāāāāāāāāāāā ā
āāāāāāāāāāāāāāāāāāāāāāāāš Quick Start
Installation
# Clone the repository
git clone https://github.com/koriyoshi2041/pay-mcp.git
cd pay-mcp
# Install dependencies
npm install
# Build
npm run buildConfiguration
Copy the example environment file:
cp .env.example .envEdit
.envwith your private key:
# Required: Your wallet's private key
PRIVATE_KEY=your_private_key_here
# Optional: Network (mainnet or testnet)
NETWORK=mainnetā ļø Security Warning: Never commit your
.envfile or share your private key!
Add to Claude Code
Add this to your Claude Code MCP settings:
Location: ~/.claude/claude_desktop_config.json (macOS/Linux) or via Claude Code settings
{
"mcpServers": {
"pay-mcp": {
"command": "node",
"args": ["/path/to/pay-mcp/dist/index.js"],
"env": {
"PRIVATE_KEY": "your_private_key_here",
"NETWORK": "mainnet"
}
}
}
}Alternative: Run directly with source:
{
"mcpServers": {
"pay-mcp": {
"command": "npx",
"args": ["tsx", "/path/to/pay-mcp/src/index.ts"],
"env": {
"PRIVATE_KEY": "your_private_key_here",
"NETWORK": "mainnet"
}
}
}
}š ļø Tools
pay_balance
Check USDC balance for your wallet or any address.
Parameter | Required | Description |
| No | Address to check. Defaults to your wallet. |
Example prompt:
Check my USDC balancepay_send
Send USDC to an address.
Parameter | Required | Description |
| Yes | Recipient address (0x...) |
| Yes | Amount in USDC (e.g., "10.50") |
| No | Note for this payment |
Example prompt:
Send 25 USDC to 0x742d35Cc6634C0532925a3b844Bc9e7595f8d123 for "Coffee subscription"pay_request
Generate a payment request link.
Parameter | Required | Description |
| Yes | Amount to request in USDC |
| No | Description for the request |
Example prompt:
Create a payment request for 50 USDC for "Consulting services"pay_history
View recent USDC transactions.
Parameter | Required | Description |
| No | Number of transactions (default: 20, max: 100) |
Example prompt:
Show my last 10 USDC transactionsš» Development
Project Structure
pay-mcp/
āāā src/
ā āāā index.ts # MCP server entry point
ā āāā config.ts # Configuration and constants
ā āāā wallet.ts # Blockchain interaction layer (viem)
ā āāā tools.ts # MCP tool definitions
āāā test/
ā āāā test.ts # Test script
āāā dist/ # Compiled output
āāā .env.example # Environment template
āāā package.json
āāā tsconfig.json
āāā README.mdCommands
# Build TypeScript
npm run build
# Run in development mode
npm run dev
# Run tests (uses testnet)
npm test
# Clean build output
npm run cleanRunning Tests
# Run with auto-generated test wallet
npm test
# Run with your own testnet wallet
PRIVATE_KEY=your_testnet_key npm testš Network Configuration
Mainnet (Default)
Setting | Value |
Chain | Base (Chain ID: 8453) |
USDC Contract |
|
Explorer |
Testnet
Set NETWORK=testnet in your .env:
Setting | Value |
Chain | Base Sepolia (Chain ID: 84532) |
USDC Contract |
|
Explorer |
š” To get testnet USDC, use the Base Sepolia Faucet.
āļø Environment Variables
Variable | Required | Default | Description |
| ā Yes | - | Wallet private key (without 0x prefix) |
| No |
|
|
| No | Public RPC | Custom RPC endpoint |
| No |
| Gas estimate multiplier |
| No |
| Maximum gas limit |
š Security Considerations
Private Key Storage:
Never commit your private key to version control
Consider using environment variables or a secrets manager
For production, use hardware wallets or key management services
Transaction Safety:
Always test on testnet first
Double-check recipient addresses
Consider implementing daily/per-transaction limits
Network Selection:
Verify network configuration before mainnet transactions
Use testnet for development and testing
š§ Tech Stack
Component | Technology |
Runtime | Node.js 18+ |
Language | TypeScript 5.7 |
MCP SDK | @modelcontextprotocol/sdk |
Blockchain | viem |
Validation | zod |
š¤ Contributing
Contributions are welcome! Please:
Fork the repository
Create a feature branch (
git checkout -b feature/amazing-feature)Make your changes
Run tests (
npm test)Commit your changes (
git commit -m 'Add amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
š License
MIT License - see LICENSE for details.
š Acknowledgments
Model Context Protocol by Anthropic
Base by Coinbase
Viem - TypeScript Ethereum library
Available Tools
4 toolspay_balanceA
Check USDC balance on Base. Returns the balance for your wallet or a specified address.
Inputs: address.
pay_historyA
Get recent USDC transaction history on Base. Shows both sent and received transfers.
Inputs: limit.
pay_requestA
Generate a payment request. Creates a payment link that others can use to send you USDC.
Inputs: amount (required), memo.
pay_sendB
Send USDC payment on Base. Transfers USDC to the specified address.
Inputs: to (required), amount (required), memo.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogā¦
TDQS
Scored across 4 tools
Each tool has a distinct purpose: balance checking, sending, requesting, and viewing history. There is no overlap or ambiguity between them.
All tools share the 'pay_' prefix and use snake_case, which is consistent. However, 'pay_balance' and 'pay_history' are noun-based while 'pay_send' is verb-based, a minor deviation from a pure verb_noun pattern.
Four tools cover the core functionality of a simple USDC payment server without bloat. The count is well-scoped for the domain.
The toolset covers the essential lifecycle: checking balance, sending payments, requesting payments, and viewing transaction history. No critical operations are missing for a basic payment server.
Maintenance
Related MCP Connectors
PHANTOM ID MCP payment server: agent-to-agent USDC payments on Base.
MCP server for AI agents to discover campaigns by humans and donate USDC directly on Base.
Agent-commerce MCP server for x402/USDC payments and affiliate splits on Base.
Non-custodial stablecoin bill-pay rails on Celo & Base for AI agents, settled on-chain via MCP.
Related MCP Servers
AlicenseAqualityBmaintenanceMCP server for AI image generation with automatic USDC payments on Base mainnet. Generate, remove backgrounds, and upscale images via simple tool calls.4515 npm1MIT- AlicenseAqualityBmaintenanceAn MCP server that enables AI agents to access paid AI inference and web tools via HTTP 402 micropayments in USDC on Base, using the agent's wallet as identity.36124 npmMIT
- AlicenseNot gradedqualityCmaintenanceAn MCP server for agentic commerce, enabling AI agents to discover services, make x402 payments with USDC across multiple chains, and manage crypto wallets and token swaps.339 npm1MIT

zunivo-mcpofficial
AlicenseAqualityCmaintenanceMCP server that lets AI agents discover and pay for .agent services using USDC over x402, with daily budget controls and payment link creation.625 npmMIT