Skip to main content
Glama
MonadWorks
by MonadWorks

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 build

Configuration

  1. Copy the example environment file:

cp .env.example .env
  1. Edit .env with 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 .env file 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

address

No

Address to check. Defaults to your wallet.

Example prompt:

Check my USDC balance

pay_send

Send USDC to an address.

Parameter

Required

Description

to

Yes

Recipient address (0x...)

amount

Yes

Amount in USDC (e.g., "10.50")

memo

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

amount

Yes

Amount to request in USDC

memo

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

limit

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.md

Commands

# Build TypeScript
npm run build

# Run in development mode
npm run dev

# Run tests (uses testnet)
npm test

# Clean build output
npm run clean

Running 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

0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913

Explorer

https://basescan.org

Testnet

Set NETWORK=testnet in your .env:

Setting

Value

Chain

Base Sepolia (Chain ID: 84532)

USDC Contract

0x036CbD53842c5426634e7929541eC2318f3dCF7e

Explorer

https://sepolia.basescan.org

šŸ’” To get testnet USDC, use the Base Sepolia Faucet.


āš™ļø Environment Variables

Variable

Required

Default

Description

PRIVATE_KEY

āœ… Yes

-

Wallet private key (without 0x prefix)

NETWORK

No

mainnet

mainnet or testnet

BASE_RPC_URL

No

Public RPC

Custom RPC endpoint

GAS_MULTIPLIER

No

1.1

Gas estimate multiplier

MAX_GAS_LIMIT

No

100000

Maximum gas limit


šŸ”’ Security Considerations

  1. 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

  2. Transaction Safety:

    • Always test on testnet first

    • Double-check recipient addresses

    • Consider implementing daily/per-transaction limits

  3. 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:

  1. Fork the repository

  2. Create a feature branch (git checkout -b feature/amazing-feature)

  3. Make your changes

  4. Run tests (npm test)

  5. Commit your changes (git commit -m 'Add amazing feature')

  6. Push to the branch (git push origin feature/amazing-feature)

  7. Open a Pull Request


šŸ“„ License

MIT License - see LICENSE for details.


šŸ™ Acknowledgments


Available Tools

4 tools
pay_balanceA

Check USDC balance on Base. Returns the balance for your wallet or a specified address.

ParametersJSON Schema
NameRequiredDescriptionDefault
addressNoAddress to check balance for. If not provided, returns your wallet balance.

TDQS

A4.2/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of transactions to return (default: 20, max: 100)

TDQS

A4/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
memoNoOptional description for this payment request
amountYesAmount to request in USDC (e.g., "25.00")

TDQS

A3.8/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
toYesRecipient address (0x...)
memoNoOptional memo/note for this payment
amountYesAmount in USDC (e.g., "10.50")

TDQS

B3.3/5.0
Behavior2/5

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.

Conciseness4/5

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.

Completeness2/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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.

  1. 4 tool updatesv1.0.0
    • First observedpay_balance
    • First observedpay_history
    • First observedpay_request
    • First observedpay_send

TDQS

A4/5.0
Disambiguation5/5

Each tool has a distinct purpose: balance checking, sending, requesting, and viewing history. There is no overlap or ambiguity between them.

Naming Consistency4/5

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.

Tool Count5/5

Four tools cover the core functionality of a simple USDC payment server without bloat. The count is well-scoped for the domain.

Completeness5/5

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

ActivityInactive
ResponsivenessNo issues

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

Related MCP Servers

Latest Blog Posts

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