mcpay
Version:
SDK and CLI for MCPay functionality - MCP servers with payment capabilities
13 lines • 642 B
JavaScript
import createMcpHandlerWithPlugins, { makePlugins } from "../index.js";
import { withX402 } from "../plugins/with-x402.js";
/**
* createPaidServer
* Creates a Request handler for an MCP server augmented with X402 paid tools.
* You provide your server initializer and the X402 configuration; this wires
* the `withX402` plugin automatically.
*/
export function createMcpPaidHandler(initializeServer, x402, serverOptions, config) {
const plugins = makePlugins((server) => withX402(server, x402));
return createMcpHandlerWithPlugins(initializeServer, { ...serverOptions, plugins }, config);
}
//# sourceMappingURL=x402-server.js.map