UNPKG

@tanstack/ai-mcp

Version:

Host-side Model Context Protocol client for TanStack AI: discover and run MCP server tools, resources, and prompts in any adapter's chat() loop, with generated end-to-end types.

31 lines (30 loc) • 882 B
/** * Query parameter that routes a webhook to a local subscription key. * * @experimental */ export declare const MCP_EVENT_CALLBACK_KEY_PARAM = "mcp_event_subscription"; /** * Validate a webhook callback URL. * * https is required. http is allowed only for `127.0.0.1` and `[::1]` when * `allowInsecureLocalhost` is set. Credentials, fragments, and an existing * `mcp_event_subscription` parameter are rejected. * * @experimental */ export declare function validateCallbackUrl(url: string, opts?: { allowInsecureLocalhost?: boolean; }): URL; /** * Append `mcp_event_subscription=<key>` to a validated callback URL. * * @experimental */ export declare function withCallbackKey(url: URL, key: string): string; /** * Read the subscription key from a callback URL. * * @experimental */ export declare function readCallbackKey(url: string): string | undefined;