/opt/canhelp/node_modules/better-auth/dist/plugins/mcp/client
Edit: /opt/canhelp/node_modules/better-auth/dist/plugins/mcp/client/index.d.mts (1624B)
//#region src/plugins/mcp/client/index.d.ts
interface McpAuthClientOptions {
authURL: string;
resource?: string;
allowedOrigin?: string;
fetch?: typeof globalThis.fetch;
}
interface McpSession {
accessToken: string;
refreshToken: string;
accessTokenExpiresAt: string;
refreshTokenExpiresAt: string;
clientId: string;
userId: string;
scopes: string;
}
interface NodeLikeRequest {
headers: Record
& {
get?: (name: string) => string | undefined;
authorization?: string;
};
get?: (name: string) => string | undefined;
mcpSession?: McpSession;
}
interface NodeLikeResponse {
set?: (name: string, value: string) => void;
setHeader?: (name: string, value: string) => void;
status?: (code: number) => {
json: (body: unknown) => void;
};
writeHead?: (code: number, headers: Record) => void;
end?: (body: string) => void;
}
interface McpAuthClient {
verifyToken: (token: string) => Promise;
handler: (fn: (req: Request, session: McpSession) => Response | Promise) => (req: Request) => Promise;
discoveryHandler: () => (req: Request) => Promise;
protectedResourceHandler: (serverURL: string) => (req: Request) => Promise;
middleware: () => (req: NodeLikeRequest, res: NodeLikeResponse, next: () => void) => Promise;
authURL: string;
}
declare function createMcpAuthClient(options: McpAuthClientOptions): McpAuthClient;
//#endregion
export { McpAuthClient, McpAuthClientOptions, McpSession, createMcpAuthClient };
//# sourceMappingURL=index.d.mts.map