@v402pay/mcp-server
v0.3.0
Published
MCP server with v402 payment gating for AI agent tool access
Maintainers
Readme
@v402pay/mcp-server
MCP server with v402 payment-gated tools for AI agents.
Install
npm install @v402pay/mcp-serverUsage
import { createV402McpServer } from "@v402pay/mcp-server";
const server = createV402McpServer({
tools: [{
name: "web_search",
description: "Search the web",
inputSchema: { query: { type: "string" } },
price: "0.01",
currency: "USDC",
merchant: "MERCHANT_WALLET",
handler: async (args) => ({ results: ["..."] }),
}],
testMode: true,
});Tools are automatically gated: unpaid calls return payment_required, paid calls execute the handler and return a v402 receipt.
