mcpay
Version:
SDK and CLI for MCPay functionality - MCP servers with payment capabilities
15 lines • 1.07 kB
TypeScript
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import createMcpHandlerWithPlugins, { type ServerOptions as BaseServerOptions } from "../index.js";
import type { X402AugmentedServer, X402Config } from "../plugins/with-x402.js";
type HandlerConfig = Parameters<typeof createMcpHandlerWithPlugins>[2];
export type PaidServerOptions = Omit<BaseServerOptions, "plugins">;
export type PaidServerInitialize = (server: McpServer & X402AugmentedServer) => Promise<void> | void;
/**
* 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 declare function createMcpPaidHandler(initializeServer: PaidServerInitialize, x402: X402Config, serverOptions?: PaidServerOptions, config?: HandlerConfig): (request: Request) => Promise<Response>;
export type { X402Config, X402AugmentedServer, RecipientWithTestnet } from "../plugins/with-x402.js";
//# sourceMappingURL=x402-server.d.ts.map