/** * Cloudflare Worker entry point for remote MCP access (Claude iOS, claude.ai). * Deployed at mcp.rewind.rest. * * Uses @cloudflare/workers-oauth-provider for OAuth 2.1 with GitHub as the * upstream identity provider. The OAuth layer is only for the remote transport; * local stdio transport (Claude Desktop, Claude Code) uses REWIND_API_KEY directly. */ import { OAuthProvider, type OAuthHelpers } from '@cloudflare/workers-oauth-provider'; interface Env { OAUTH_KV: KVNamespace; OAUTH_PROVIDER: OAuthHelpers; REWIND_API_URL: string; REWIND_API_KEY: string; GITHUB_CLIENT_ID: string; GITHUB_CLIENT_SECRET: string; /** JSON map of GitHub user ID -> Rewind user_id, e.g. {"12345": 1} */ USER_ALLOWLIST: string; } declare const provider: OAuthProvider; export default provider;