1. Conduid
  2. Developer Tools
  3. X402 MCP
MCP server · Developer Tools

X402 MCP

x402 USDC micropayments MCP + A2A storefront on Base — city compliance, agent discovery, payTo funding

Unclaimed MIT last commit 10 months ago devtools
57Fair

Scored 12 days ago · breakdown

About X402 MCP

X402 MCP is an MCP server published by ethanniser in the Developer Tools category: x402 USDC micropayments MCP + A2A storefront on Base — city compliance, agent discovery, payTo funding.

The repository has 22 stars and 15 forks, with the last commit 10 months ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues before depending on it in production.

Install

From source
git clone https://github.com/ethanniser/x402-mcp

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about X402 MCP

Powered by Claude · Grounded in docs

I know everything about X402 MCP. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

Static checks derived from the repository 5 days ago. Heuristics on the source, not an audit.

  • ✓README presentThe repository ships documentation.
  • ✓License declaredUsable under a stated license.
  • !Tests presentNo tests found. Behaviour changes may go unnoticed between versions.
  • ✓Dependencies pinnedA lockfile pins dependency versions.
  • ✓No dynamic code executionSource scan found no eval, dynamic Function, or shell execution.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

README

x402 + MCP + AI SDK

Check out apps/example for a working example!

// server
import { createPaidMcpHandler } from "x402-mcp";
import z from "zod";

const handler = createPaidMcpHandler(
  (server) => {
    server.paidTool(
      "get_random_number",
      "Get a random number between two numbers",
      { price: 0.001 },
      {
        min: z.number().int(),
        max: z.number().int(),
      },
      {},
      async (args) => {
        const randomNumber =
          Math.floor(Math.random() * (args.max - args.min + 1)) + args.min;
        return {
          content: [{ type: "text", text: randomNumber.toString() }],
        };
      }
    );
  },
  {
    recipient: process.env.WALLET_ADDRESS,
  }
);

export { handler as GET, handler as POST };

// client
import { convertToModelMessages, stepCountIs, streamText, UIMessage } from "ai";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
import { experimental_createMCPClient as createMCPClient } from "ai";
import { withPayment } from "x402-mcp";

const mcpClient = await createMCPClient({
  transport: new StreamableHTTPClientTransport(url),
}).then((client) => withPayment(client, { account: process.env.PRIVATE_KEY }));

const tools = await mcpClient.tools();

const result = streamText({
  model,
  tools,
  messages: convertToModelMessages(messages),
  stopWhen: stepCountIs(5),
  onFinish: async () => {
    await mcpClient.close();
  },
  system: "ALWAYS prompt the user to confirm before authorizing payments",
});

README fetched from the repository 5 days ago. The original is authoritative.

Questions

About X402 MCP

How do I install X402 MCP?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is X402 MCP safe to use with an AI agent?

Its trust score is 57 out of 100 (fair). It passes 4 of the 6 static security checks run so far; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is X402 MCP still maintained?

The last commit was 10 months ago and 6 open issues. That's long enough that you should check whether the maintainer is responding to issues before depending on it.