pay-mcp
Click on "Install 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-mcpCheck 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.
| Name | Required | Description | Default |
|---|---|---|---|
| address | No | Address to check balance for. If not provided, returns your wallet balance. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden of behavioral disclosure. It states that the tool 'returns the balance' and implies a read-only operation via 'Check', but it does not explicitly state that it is non-mutating or describe behavior for invalid addresses or edge cases.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence that efficiently conveys purpose and key parameter behavior without any wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with one optional parameter, the description covers the core context: what it checks, on which network, and who it applies to. However, it does not describe the return format, which would be helpful given the absence of an output schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% and the description adds meaning by explaining the optional address parameter ('your wallet or a specified address'). This reinforces the schema and clarifies the default behavior when no address is provided.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool checks USDC balance on Base, which is a specific verb+resource. It distinguishes from sibling tools like pay_send, pay_request, and pay_history by focusing solely on balance checking.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use this tool (to check USDC balance) and provides context about the Base network and optional address parameter. However, it does not explicitly mention alternatives or when not to use it, which would make it a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
pay_historyA
Get recent USDC transaction history on Base. Shows both sent and received transfers.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of transactions to return (default: 20, max: 100) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It adds a useful trait ('Shows both sent and received transfers'), but does not clarify recency bounds, authentication requirements, or the response shape. It is not misleading but is minimal.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is exactly two sentences, with the core purpose in the first sentence and a clarifying detail in the second. It is front-loaded and contains no extraneous information, making it highly concise and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with one optional parameter and no output schema, the description covers the essential purpose, scope, and a distinguishing behavior. It lacks explicit details about return format or recency semantics, but given the tool's simplicity, the description is nearly complete for selection and invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% for the single 'limit' parameter, so the schema fully documents its meaning. The description does not add additional parameter context, which is acceptable given the high schema coverage, thus baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Get') and resource ('USDC transaction history'), with a clear network context ('on Base'). It also explicitly distinguishes the tool from siblings by stating it shows both sent and received transfers, making it clearly a history tool versus balance/send/request functions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides clear context for when to use the tool (to retrieve recent transaction history on Base). However, it does not explicitly mention alternatives or exclusion cases, such as 'use pay_balance for current balance' or 'use pay_send to create transactions'.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
pay_requestA
Generate a payment request. Creates a payment link that others can use to send you USDC.
| Name | Required | Description | Default |
|---|---|---|---|
| memo | No | Optional description for this payment request | |
| amount | Yes | Amount to request in USDC (e.g., "25.00") |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of disclosing behavioral traits. It only mentions generating a link and does not state whether authentication is required, if the link expires, if there are fees, or what side effects occur (e.g., saved to history). For a mutation tool, this is a significant gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is exactly two sentences, front-loaded with the core purpose, and contains no redundant information. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (2 simple params, no output schema), the description covers the main functionality and implies the return value (the payment link). It could be improved by explicitly stating that the link is returned and whether it is saved, but it is sufficient for a straightforward tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, with both 'amount' and 'memo' described. The description adds no parameter-specific meaning beyond the schema, so the baseline of 3 applies. It does not elaborate on format nuances or additional context.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: generating a payment request that creates a link for others to send USDC. The verb 'generate' and resource 'payment request' are specific, and the distinction from siblings (pay_balance, pay_send, pay_history) is apparent.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context: this tool is for receiving USDC via a payment link, which implies use when you want to request payment. It does not explicitly exclude alternatives, but the sibling names make the differentiation obvious, falling just short of explicit 'when-not' guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
pay_sendB
Send USDC payment on Base. Transfers USDC to the specified address.
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Recipient address (0x...) | |
| memo | No | Optional memo/note for this payment | |
| amount | Yes | Amount in USDC (e.g., "10.50") |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden of behavioral disclosure. It merely states that USDC is transferred, but omits important consequences such as irrevocability, gas fees, need for wallet authorization, or network confirmation. This is a significant gap for a payment tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is brief and front-loaded with the main verb and resource. However, 'Transfers USDC to the specified address' is somewhat redundant with 'Send USDC payment', so it is not maximally concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
There is no output schema and no annotations, so the description must cover the full context. It does not mention return values (e.g., transaction hash), failure modes, or prerequisites, leaving an agent underprepared for the actual outcome of the tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%āto, amount, and memo are already well documented. The description adds no new parameter meaning beyond restating the recipient, so the baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb 'Send' and resource 'USDC payment on Base', clearly stating the action and target. It is distinguishable from siblings like pay_balance, pay_request, and pay_history because it focuses on transferring USDC out to an address.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The usage context is implied: use this tool to send USDC payments. However, it does not explicitly compare with pay_request or pay_balance, and gives no exclusions or alternative tool guidance, so the guidance remains implied rather than explicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
4 tool updates
v1.0.0- First observed
pay_balance - First observed
pay_history - First observed
pay_request - First observed
pay_send
TDQS
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
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
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.
15 paid AI agent primitives via x402 (USDC on Base). Pay-per-call MCP server.
Non-custodial USDC yield vaults on Base mainnet with 9 MCP tools for AI agent treasury.
Related MCP Servers
AlicenseAqualityCmaintenanceMCP server for AI image generation with automatic USDC payments on Base mainnet. Generate, remove backgrounds, and upscale images via simple tool calls.42351MIT- AlicenseAqualityAmaintenanceAn 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.14564MIT
- AlicenseNot gradedqualityDmaintenanceAn 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.3551MIT
- AlicenseAqualityBmaintenancePayment infrastructure MCP server enabling AI agents to make gasless USDC payments on Base and JIT single-use virtual card checkouts, with zero-trust card handling, merchant checkout hints, and signed receipts.133031MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/MonadWorks/pay-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server