Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
Evozim avatar

M2mcent

  • Updated June 4, 2026
  • Evozim/m2mcent-sdk

m2mcent is a MCP server that wraps x402 payments for AI agents and MCP servers with USDC settlement on Base L2.

About

m2mcent is a stdio Model Context Protocol server and npm SDK that implements an x402 payment wrapper so developers can charge for agent and MCP tool usage with USDC settlements on Base mainnet. You install m2mcent-sdk locally, point BASE_RPC_URL at Base, fund a relayer wallet via RELAYER_PRIVATE_KEY, and send proceeds to TREASURY_ADDRESS—giving you machine-to-machine payments without building a full billing stack first. It fits SaaS and API products that expose paid MCP endpoints or want agents to pay upstream services per call. Complexity is intermediate because on-chain keys and RPC configuration are required. This is integration infrastructure, not a storefront UI; pair it with your own pricing and auth. After wiring, agents can trigger wrapped tools that enforce payment before execution.

  • stdio MCP via npm package m2mcent-sdk (catalog versions 1.0.2 package / 1.0.3 server metadata)
  • x402 payment wrapper aimed at AI agents and other MCP servers
  • USDC settlements on Base L2 with configurable RPC, relayer key, and treasury address
  • Requires BASE_RPC_URL, RELAYER_PRIVATE_KEY, and TREASURY_ADDRESS environment variables
  • Open-source SDK repository at github.com/Evozim/m2mcent-sdk

M2mcent by the numbers

  • Data as of Jul 7, 2026 (Skillselion catalog sync)
terminal
claude mcp add --env BASE_RPC_URL=YOUR_BASE_RPC_URL --env RELAYER_PRIVATE_KEY=YOUR_RELAYER_PRIVATE_KEY --env TREASURY_ADDRESS=YOUR_TREASURY_ADDRESS m2mcent-sdk -- npx -y m2mcent-sdk

Add your badge

Show developers this MCP server is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Packagem2mcent-sdk
TransportSTDIO
AuthRequired
Last updatedJune 4, 2026
RepositoryEvozim/m2mcent-sdk

What it does

Wrap MCP tools and AI agents with x402 micropayments and settle USDC on Base L2 from your own relayer and treasury setup.

Who is it for?

Best when you're shipping paid agent tools or MCP marketplaces and want Base L2 USDC and a local stdio SDK.

Skip if: Fiat-only checkout, no-crypto products, or teams unwilling to manage relayer private keys on mainnet.

What you get

After configuring Base RPC and treasury keys, your MCP stack can enforce x402 flows and settle USDC without a separate payment microservice.

  • stdio MCP server with x402 payment wrapping
  • Configurable USDC settlement path to treasury on Base L2

By the numbers

  • Server metadata version 1.0.3; npm package identifier m2mcent-sdk at version 1.0.2
  • 3 required environment variables documented
  • 1 stdio transport package on npm
README.md

🛰️ M2MCent SDK — x402 Payment Wrapper for AI Agents

npm version License: MIT Base Mainnet

Ultra-lightweight x402 payment interceptor for AI Agents and MCP Servers. Monetize any API in 3 lines of code.

🚀 Quick Start

npm install m2mcent-sdk
import { X402Handler } from 'm2mcent-sdk';

const x402 = new X402Handler({
  rpcUrl: 'https://mainnet.base.org',
  privateKey: process.env.RELAYER_PRIVATE_KEY!,
  recipient: process.env.TREASURY_ADDRESS!
});

// Protect any Express endpoint with a USDC paywall
app.post('/api/analyze', x402.requirePayment("100000"), (req, res) => {
  res.json({ result: "Premium analysis complete", receipt: req.paymentTx });
});

📐 How It Works

M2MCent implements the x402 Payment Protocol — a machine-native payment standard inspired by HTTP 402:

  1. Agent requests a protected endpoint
  2. Server responds with 402 Payment Required + payment metadata (Base64 encoded)
  3. Agent signs an EIP-712 typed data authorization (gasless for the payer)
  4. Server settles atomically on-chain via the M2MCent Escrow contract
  5. Agent receives the premium response + transaction receipt
Agent ──► API Server ──► 402 + metadata
Agent ◄── signs EIP-712 authorization
Agent ──► API Server + Payment-Signature header
          └──► Escrow.settle() on Base L2
Agent ◄── Premium Response + tx hash

⚙️ Configuration

Parameter Description Required
rpcUrl Base Mainnet RPC endpoint
privateKey Relayer wallet private key (for settlement)
recipient Treasury address to receive payments

🔒 Security

  • Non-custodial: Funds flow directly from payer → treasury via on-chain escrow
  • Gasless for payers: Uses EIP-3009 transferWithAuthorization (USDC native)
  • Zero-Leak: No agent data is retained after settlement
  • Atomic: Payment and service delivery happen in a single request cycle

🌐 Network Details

Parameter Value
Network Base Mainnet (Chain ID: 8453)
USDC Contract 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
Escrow Contract 0xf3c3416A843d13C944554A54Ac274BB7fF264BcC
Settlement Atomic, sub-second finality

🧩 MCP Server Integration

Perfect for Model Context Protocol servers:

import express from 'express';
import { X402Handler } from 'm2mcent-sdk';

const app = express();
const x402 = new X402Handler({
  rpcUrl: process.env.BASE_RPC_URL!,
  privateKey: process.env.RELAYER_PRIVATE_KEY!,
  recipient: process.env.TREASURY_ADDRESS!
});

// Any MCP tool endpoint becomes monetizable
app.post('/api/tools/analyze', x402.requirePayment("50000"), async (req, res) => {
  const result = await runMCPTool(req.body);
  res.json({ ...result, paymentTx: req.paymentTx });
});

📊 Ecosystem

M2MCent powers 100+ production MCP servers on Base Mainnet, processing real USDC micro-payments for AI-to-AI commerce.

📄 License

MIT © M2MCent

Recommended MCP Servers

How it compares

On-chain x402 MCP payment layer, not a hosted marketplace catalog or Claude skill.

FAQ

Who is m2mcent for?

Developers and small teams integrating micropayments into MCP servers or agent workflows on Base with USDC.

When should I use m2mcent?

Use it while building integrations when you need x402-style charges before tool execution or between agents and MCP services.

How do I add m2mcent to my agent?

Install the m2mcent-sdk npm package, set BASE_RPC_URL, RELAYER_PRIVATE_KEY, and TREASURY_ADDRESS, and register the stdio MCP server in Claude Code or your MCP config.

Financepaymentsfinance

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.