UNPKG

mcpay

Version:

SDK and CLI for MCPay functionality - MCP servers with payment capabilities

18 lines 933 B
import type { McpServer, RegisteredTool, ToolCallback } from "@modelcontextprotocol/sdk/server/mcp.js"; import type { ToolAnnotations } from "@modelcontextprotocol/sdk/types.js"; import type { ZodRawShape } from "zod"; import type { FacilitatorConfig, Network, Price } from "x402/types"; export type RecipientWithTestnet = { address: string; isTestnet?: boolean; }; export type X402Config = { recipient: Partial<Record<Network, string>> | Partial<Record<"evm" | "svm", RecipientWithTestnet>>; facilitator: FacilitatorConfig; version?: number; }; export interface X402AugmentedServer { paidTool<Args extends ZodRawShape>(name: string, description: string, price: Price, paramsSchema: Args, annotations: ToolAnnotations, cb: ToolCallback<Args>): RegisteredTool; } export declare function withX402<S extends McpServer>(server: S, cfg: X402Config): S & X402AugmentedServer; //# sourceMappingURL=with-x402.d.ts.map