UNPKG

mcp-orchestrator

Version:

MCP Orchestrator - Discover and install MCPs with automatic OAuth support. Uses Claude CLI for OAuth MCPs (Canva, Asana, etc). 34 trusted MCPs from Claude Partners.

40 lines (39 loc) 1.59 kB
/** * OAuth Client Provider for MCP Orchestrator * Handles OAuth 2.1 authentication flow with automatic browser opening */ import { OAuthClientProvider } from '@modelcontextprotocol/sdk/client/auth.js'; import type { OAuthClientMetadata, OAuthClientInformation, OAuthTokens, OAuthClientInformationFull } from '@modelcontextprotocol/sdk/shared/auth.js'; export interface OAuthStorage { clientInformation?: OAuthClientInformationFull; tokens?: OAuthTokens; codeVerifier?: string; } /** * In-memory OAuth client provider * Automatically opens browser for authorization */ export declare class MCPOAuthClientProvider implements OAuthClientProvider { private serverName; private onAuthUrlGenerated?; private storage; constructor(serverName: string, onAuthUrlGenerated?: ((url: URL) => void) | undefined); get redirectUrl(): string; get clientMetadata(): OAuthClientMetadata; clientInformation(): OAuthClientInformation | undefined; saveClientInformation(clientInformation: OAuthClientInformationFull): Promise<void>; tokens(): OAuthTokens | undefined; saveTokens(tokens: OAuthTokens): Promise<void>; redirectToAuthorization(authorizationUrl: URL): Promise<void>; saveCodeVerifier(codeVerifier: string): Promise<void>; codeVerifier(): string; /** * Opens URL in user's default browser * Cross-platform support: Windows, macOS, Linux */ private openBrowser; /** * Clear all stored credentials */ invalidateCredentials(scope: 'all' | 'client' | 'tokens' | 'verifier'): Promise<void>; }