Solana Projects › MCPay

MCPay

The best way for AI to access and pay for online services.

Programs · 24h on-chain

On-chain activity

All programs →

MCPay

MCPay is an open-source payment layer for Model Context Protocol servers that lets users access paid APIs with pay-per-call pricing instead of subscriptions. It proxies requests, negotiates x402 payment, accepts on-chain payment, retries the MCP call after confirmation, and streams usage and revenue events.

Visit
About

MCPay

MCPay is open-source payment infrastructure that enables AI agents and applications to pay for online services on a per-request basis using the Model Context Protocol (MCP) and the x402 payment standard. Rather than requiring subscriptions or pre-shared API keys, MCPay lets any MCP-compatible client — including AI coding tools like Cursor, agentic frameworks, and custom agents — autonomously pay for individual tool calls at the moment of use. The project was founded in July 2025 and is maintained by the microchipgnu organization on GitHub, with backing from Colosseum, Coinbase, Polygon, Vlayer, and ETHGlobal.

The Problem MCPay Solves

As AI agents grow more capable of acting on the open web, they need a frictionless way to pay for the APIs and tools they call. Traditional approaches — monthly subscriptions, rate-limited free tiers, or provisioned API keys — are not designed for automated, dynamic agent workflows where usage is unpredictable and multi-agent orchestration is common. MCPay addresses this by implementing the x402 protocol, which repurposes the long-dormant HTTP 402 "Payment Required" status code as a machine-readable signal that an endpoint requires on-chain payment before responding.

How x402 and the Payment Flow Work

The x402 flow is straightforward and works without any change to the underlying MCP server's business logic:

  1. An AI client (or agent) calls a protected MCP tool endpoint.
  2. The MCPay proxy intercepts the request and returns an HTTP 402 response carrying structured payment metadata — asset type, amount, destination wallet, a memo, and an expiry timestamp.
  3. The client executes an on-chain transaction transferring the specified stablecoin amount to the provider's wallet.
  4. The client retries the original request with an X-PAYMENT proof header containing the signed transaction.
  5. MCPay verifies the payment on-chain, forwards the request to the upstream MCP server, and streams the response back to the client.

This entire cycle is designed to complete transparently, with no manual intervention required from either the developer or the end user.

Solana Integration

MCPay supports multiple blockchains but has first-class Solana integration. On Solana, payments settle in approximately 1.5 seconds at a cost of fractions of a cent per transaction, making genuine micropayments economically viable. The system uses USDC as the primary payment asset on Solana mainnet, with Solana devnet supported for testing. The self-hosted x402 facilitator component handles payment verification and submission, paying SOL network fees on behalf of agents so that clients only need to hold USDC. EVM-compatible chains (Base, Avalanche, Polygon, IoTeX, and Sei) are also supported, giving developers flexibility to target their preferred network.

Architecture and Key Components

MCPay is structured as a modular stack:

Proxy / Monetizer: A middleware layer that wraps any existing HTTP or MCP endpoint and enforces the payment requirement without requiring the underlying server to be modified. Developers can wrap a tool in minutes by pointing MCPay at an existing endpoint.

JavaScript SDK: The core js-sdk package provides TypeScript-first client and server utilities for handling 402 responses, building payment proofs, and verifying transactions. It is built on top of the MCP SDK and the Hono web framework.

CLI Tool: The npx mcpay connect command provides local proxying capabilities, allowing developers to test payment flows without deploying infrastructure.

Registry: A server discovery layer at v2.mcpay.tech/servers where developers can list their priced MCP tools and where clients can browse available paid endpoints.

MCPay Build: A companion no-code builder for MCP servers with built-in monetization, allowing developers to design, preview, and deploy paid MCP servers without writing proxy configuration by hand.

Pricing Models

MCPay supports three pricing structures:

  • Flat per-call: A fixed price per tool invocation, the simplest and currently default mode. Example pricing cited in the platform is $0.05 per tool call.
  • Tiered/per-tool: Different prices for different tools within the same MCP server.
  • Dynamic pricing: Variable rates based on usage or other parameters, described as forthcoming.

The platform itself charges no transaction fees by default — payments route directly from client wallets to provider wallets. Managed wallet services offered through the platform may carry platform fees, but the core SDK path does not impose any cut.

Security Model

In SDK mode, client private keys remain entirely client-side. MCPay only receives and verifies payment proofs — it never custodies funds or holds signing keys. In managed wallet arrangements, keys are held by wallet providers rather than MCPay itself. This non-custodial architecture means that a compromise of MCPay infrastructure does not expose user funds.

Developer Experience

Integration is designed to be non-intrusive. Providers can monetize an existing MCP server or plain HTTP API without refactoring their service: the MCPay proxy sits in front of the existing endpoint. The TypeScript SDK handles all 402-response parsing, transaction construction, and proof submission automatically. Any language that can send HTTP requests and handle 402 responses can integrate with MCPay using the documented X-PAYMENT proof header convention.

The GitHub repository has accumulated 477 commits on the main branch, 91 stars, and 34 forks since its launch in mid-2025, reflecting active development and growing community interest. Eleven open issues indicate ongoing iteration.

Token and Audit Status

MCPay does not have a native token. The platform uses existing stablecoins — primarily USDC — for all payments, meaning users and providers transact in assets with established liquidity and pricing without exposure to a governance or utility token.

No formal third-party security audit has been publicly disclosed as of July 2025. The codebase is fully open-source on GitHub, making it auditable by anyone. Given that the project launched in July 2025, an audit from a recognized firm would be a meaningful milestone to watch for as the protocol matures and TVL grows.

Fit Within the Solana Ecosystem

MCPay sits at the intersection of two major emerging themes: the agentic AI economy and Solana's positioning as a high-throughput, low-cost settlement layer for micropayments. Solana's sub-second finality and near-zero transaction costs make it uniquely suited to the per-request payment model MCPay implements — fee economics that would be prohibitive on Ethereum mainnet work cleanly on Solana. The project also aligns with Solana Foundation's active support for the x402 standard, which Solana has promoted through developer documentation and guides on its official website.

As the MCP ecosystem expands — Anthropic open-sourced MCP in November 2024 and donated it to the Linux Foundation's Agentic AI Foundation in December 2025 — infrastructure for monetizing MCP servers becomes increasingly relevant. MCPay is one of the earliest and most complete implementations of pay-per-call MCP payments, and its multichain approach with Solana at the core positions it as foundational tooling for the emerging agent-to-agent economy.

Contents

Note: inclusion in Solana Compass directory does not indicate a recommendation or endorsement of this project, its token(s) or its products. Data sourced with thanks from The Grid to aid in building these pages.

Reviews

0.0
0 reviews
Please login to write a review.
Solana tokens

Solana Token Markets

Explore all tokens →