mcp-use
Version:
Opinionated MCP Framework for TypeScript (@modelcontextprotocol/sdk compatible) - Build MCP Agents, Clients and Servers with support for ChatGPT Apps, Code Mode, OAuth, Notifications, Sampling, Observability and more.
33 lines • 1.19 kB
TypeScript
/**
* OAuth Routes
*
* Sets up OAuth 2.0 endpoints based on the provider's mode:
*
* **Direct Mode** (e.g., WorkOS):
* - Clients communicate directly with the OAuth provider
* - MCP server only provides metadata endpoints for discovery
* - No proxying of OAuth requests
*
* **Proxy Mode** (legacy):
* - MCP server proxies OAuth requests to the provider
* - Provides /authorize and /token endpoints
*/
import type { Hono } from "hono";
import type { OAuthProvider } from "./providers/types.js";
/**
* Setup OAuth routes on the Hono app
*
* In direct mode (e.g., WorkOS), creates:
* - GET /.well-known/oauth-authorization-server - Proxies provider's OAuth metadata
* - GET /.well-known/oauth-protected-resource - Protected resource metadata
*
* In proxy mode (legacy), also creates:
* - GET/POST /authorize - Authorization endpoint
* - POST /token - Token exchange endpoint
*
* @param app - The Hono application instance
* @param provider - The OAuth provider
* @param baseUrl - The base URL of this server (for metadata)
*/
export declare function setupOAuthRoutes(app: Hono, provider: OAuthProvider, baseUrl: string): void;
//# sourceMappingURL=routes.d.ts.map