m2mcent-sdk
OfficialYou can discover and run M2MCentβs catalog of agentic microservices through two MCP tools.
Search the M2MCent Universal Catalog of 1,004+ services by keyword (e.g.,
pdf,crypto,vision).Execute any listed M2MCent microservice by exact tool name with a JSON-stringified payload or text query.
Use services with per-node fees that vary by tool, typically
$0.01β$0.50 USDCper the schema.
Click on "Deploy 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., "@m2mcent-sdk wrap my API endpoint with a USDC payment gate"
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.
π°οΈ M2MCent SDK β x402 Payment Wrapper for AI Agents
Ultra-lightweight x402 payment interceptor for AI Agents and MCP Servers. Monetize any API in 3 lines of code.
π Quick Start
npm install m2mcent-sdkimport { 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 });
});Related MCP server: Warppay402 Gateway
π How It Works
M2MCent implements the x402 Payment Protocol β a machine-native payment standard inspired by HTTP 402:
Agent requests a protected endpoint
Server responds with
402 Payment Required+ payment metadata (Base64 encoded)Agent signs an EIP-712 typed data authorization (gasless for the payer)
Server settles atomically on-chain via the M2MCent Escrow contract
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 |
| Base Mainnet RPC endpoint | β |
| Relayer wallet private key (for settlement) | β |
| 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 |
|
Escrow Contract |
|
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
Available Tools
2 toolsexecute_m2mcent_toolBInspect
Execute any of the 1,004 M2MCent microservices. Fee varies per node (e.g. $0.01 - $0.50 USDC).
Inputs: payload (required), toolName (required).
search_m2mcent_catalogBInspect
Search the M2MCent Universal Catalog of 1,004+ Agentic Services
Inputs: query (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 2 tools
The two tools have completely distinct purposes: one searches the catalog, the other executes a selected service. There is no overlap or ambiguity about which tool to use for a given task.
Both tools follow a clear verb_noun pattern with the shared 'm2mcent' prefix (search_m2mcent_catalog, execute_m2mcent_tool). The naming is predictable and consistent despite the slightly different second nouns.
For a gateway SDK exposing a catalog of 1,004+ services, two tools are exactly the right scope: search to discover and execute to invoke. Each tool earns its place, and adding more would overcomplicate the surface.
The core lifecycle of discover-then-execute is fully covered. Search returns catalog details, and execute runs the chosen microservice. No obvious gaps exist for the stated purpose of being a thin client to the M2MCent ecosystem.
Maintenance
Related MCP Connectors
Monetize any MCP server: x402 paywall, pay-per-call billing in USDC on Base, agent marketplace.
x402 pay-per-call APIs over MCP, settled in USDC on Base for autonomous agents and developers.
Machine-payable API infrastructure for autonomous agents. Per-call x402 settlement in USDC.
Pay-per-action access to APIs and MCP tools over Lightning L402 and Base USDC x402.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceDrop-in x402 payment middleware for MCP servers. Charge AI agents per tool call using USDC on Base chain β Python and JavaScript SDKs, no payment processor, no KYC.MIT
- AlicenseNot gradedqualityAmaintenancePlug-and-play monetization SDK for MCP tools and TypeScript APIs. Monetize AI agent workflows instantly with x402 V2 micropayments and Base revenue splits.95 npmMIT
- AlicenseNot gradedqualityDmaintenanceMonetization gateway for MCP servers, enabling pay-per-call AI agent access with x402 payment challenges and USDC settlement on Base. Developers can register existing MCP servers, set tool prices, and receive payments without handling payment code.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to discover, call, and pay for existing HTTP APIs over MCP with x402 paywalls, non-custodial settlement, and no code changes to the backend.406 npm79Apache 2.0