# MCPay

> Add pay-per-call on-chain payments to MCP services.

- **URL**: https://followmcp.com/en/servers/mcpay
- **Category**: Dev Tools
- **Origin**: Community
- **Stars**: 90
- **FMRS Score**: 39/100 (Grade D)
- **Source**: https://github.com/microchipgnu/MCPay
- **Transports**: stdio (local process), Streamable HTTP
- **Runtimes**: Node.js
- **Auth**: API key / credential required

## Overview
MCPay is open-source infrastructure for MCP and x402 that can add pay-per-call payments to MCP or OpenAPI services. Its proxy handles 402 price negotiation, on-chain payment confirmation, and request retries, and the project provides a server registry and SDK. The README shows a CLI configuration for connecting to remote MCP services over stdio and a programmatic connection example using a Streamable HTTP client and SDK.

## Best for
- Developers who want to set per-call, per-token, or dynamic pricing for MCP or OpenAPI services through x402.
- Users and agents that need CLI or SDK access to pay-per-call MCP services.

## Not for
- Users expecting this repository to provide a declared set of MCP tools; the README does not list a tool catalog.
- Users who do not want on-chain payments, wallets, or a payment proxy involved.

## Required permissions
- When using an API key, access to that key is needed for the configured paid service.
- Wallet payments require the relevant EVM or SVM wallet credentials; the README example supports setting a maximum payment value.
- Remote service access requires network access and may result in on-chain payments.

## Risks
- Exposure of wallet keys can result in loss of funds; the README cautions against handling private keys insecurely in production.
- Paid calls involve on-chain transactions, with amounts and networks determined by service pricing and the selected network.
- The proxy forwards requests and retries them after payment confirmation; verify the target service, price metadata, and payment policy.

## Client config (JSON)
```json
{
  "mcpServers": {
    "Paid Server": {
      "command": "npx",
      "args": [
        "mcpay",
        "connect",
        "--urls",
        "https://mcpay.tech/v1/mcp/05599356-7a27-4519-872a-2ebb22467470",
        "--api-key",
        "mcpay_YOUR_API_KEY"
      ]
    }
  }
}
```
