M2MCent x402 Universal MCP Gateway

v2.2.0
io.github.Evozim/m2mcent Checked 5 hours ago Published 2 days ago

Zero-Config MCP: Markdown ($0.008), B2B OSINT, Wallet KYT, Base Gas + 1,062 x402 V2 Base tools.

Official TypeScript/Node.js client, Zero-Config MCP stdio bridge, and Express x402 V2 paywall SDK for M2MCent (https://api.m2mcent.com). A. 3-Line Programmatic Client (m2mFetch) Call any of the 1,062 deterministic M2MCent nodes from Node.js, cron jobs, LangChain, or ElizaOS. m2mFetch automatically cascades authentication: 1. passToken / M2MCENT_PASS: Uses your prepaid m2m-pass-... Bearer token (from $0.50 USDC or $5 Card Pass at https://m2mcent.com/deposito). 2. privateKey / EVM_PRIVATE_KEY: Automatically signs gasless EIP-3009 Base USDC authorizations on HTTP 402. 3.

Summary extracted from the README.

M2MCent SDK (m2mcent-sdk) — Consume 1,062 AI Tools or Monetize Your API

npm version License: MIT Base Mainnet

Official TypeScript/Node.js client, Zero-Config MCP stdio bridge, and Express x402 V2 paywall SDK for M2MCent (https://api.m2mcent.com).

npm install m2mcent-sdk

1. Consume Tools (1-Step Client & MCP)

A. 3-Line Programmatic Client (m2mFetch)

Call any of the 1,062 deterministic M2MCent nodes from Node.js, cron jobs, LangChain, or ElizaOS. m2mFetch automatically cascades authentication:

  1. passToken / M2MCENT_PASS: Uses your prepaid m2m-pass-... Bearer token (from $0.50 USDC or $5 Card Pass at https://m2mcent.com/deposito).
  2. privateKey / EVM_PRIVATE_KEY: Automatically signs gasless EIP-3009 Base USDC authorizations on HTTP 402.
  3. Zero-Config (?freeTrial=true): Works out-of-the-box for 2 free live calls/day with zero keys.
import { m2mFetch } from "m2mcent-sdk";

// Clean HTML-to-Markdown ($0.008/page — no $19/mo Firecrawl subscription)
const page = await m2mFetch("serp-markdown-crawler-mcp", {
  url: "https://news.ycombinator.com",
});
console.log(page.data.markdown);

// B2B Domain OSINT ($0.025/call)
const company = await m2mFetch("b2b-company-enrich-mcp", { domain: "stripe.com" });

// Base L2 Wallet KYT & OFAC Screening ($0.025/call)
const kyt = await m2mFetch("web3-wallet-kyt-mcp", {
  walletAddress: "0x8aaBAB75bE8825d0f5D514a9a5cBa04B7bF84920",
});

// Live Base Gas Oracle ($0.005/call)
const gas = await m2mFetch("gas-pulse-mcp", { chainId: 8453 });

B. Claude Desktop / Cursor MCP Server (4 Typed First-Class Tools)

Exposes crawl_to_markdown, enrich_company_osint, audit_wallet_kyt, get_base_gas_oracle, search_m2mcent_catalog, and execute_m2mcent_tool:

{
  "mcpServers": {
    "m2mcent": {
      "command": "npx",
      "args": ["-y", "m2mcent-mcp"],
      "env": {
        "M2MCENT_GATEWAY_URL": "https://api.m2mcent.com",
        "M2MCENT_PASS": "m2m-pass-optional-from-m2mcent.com/deposito"
      }
    }
  }
}

2. Monetize Your API (Express / Next.js x402 Paywall)

Protect your own HTTP endpoints or MCP servers with non-custodial Base Mainnet USDC micropayments settled via M2MCentEscrow (0x5d47070A36A37DAf417e64FF27a1e5B3F1c84efa):

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

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

// Gate any route with an atomic Base USDC paywall ("8000" = $0.008 USDC)
app.post("/api/analyze", x402.requirePayment("8000"), (req: any, res) => {
  res.json({ result: "Deterministic analysis complete", txHash: req.paymentTx });
});

Network & Contract Parameters

Parameter Value
Network Base Mainnet (eip155:8453, Chain ID 8453)
USDC Contract 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
M2MCent Smart Escrow V2 0x5d47070A36A37DAf417e64FF27a1e5B3F1c84efa
Gateway & MCP Endpoint https://api.m2mcent.com (/mcp)

License

MIT © M2MCent