Files
AuthInbox/package.json
T
TooonyChen d6731f8180 feat: optional OAuth on /mcp for claude.ai remote connectors
- Wrap the Worker with @cloudflare/workers-oauth-provider: /oauth/token,
  /oauth/register (dynamic client registration), and /.well-known/* are
  implemented by the library; tokens/grants/clients live in OAUTH_KV.
- New consent page at /oauth/authorize reuses the session cookie;
  unauthenticated visitors bounce through the SPA login via returnTo.
- Grant props store only userId; oauthPropsAuth re-fetches the user from
  D1 on every MCP request, so deleting a user revokes access instantly.
  Permissions still flow exclusively through visibleMails().
- OAuth is optional: without the OAUTH_KV binding the provider is skipped
  entirely and /mcp keeps working with aik_ API keys only. With it, both
  credentials coexist (Bearer aik_ requests pre-route around the provider).
- Docs and wrangler examples updated; KV block commented out by default.
2026-07-08 17:44:05 +12:00

34 lines
1.1 KiB
JSON

{
"name": "auth-inbox",
"version": "2.0.0",
"private": true,
"scripts": {
"build:web": "pnpm -C web run build",
"dev:web": "pnpm -C web run dev",
"deploy": "pnpm run build:web && pnpm run db:migrate:remote && wrangler deploy",
"dev": "wrangler dev",
"start": "wrangler dev",
"test": "vitest",
"cf-typegen": "wrangler types",
"db:migrate:local": "wrangler d1 migrations apply inbox-d1 --local",
"db:migrate:remote": "wrangler d1 migrations apply inbox-d1 --remote"
},
"dependencies": {
"@cloudflare/workers-oauth-provider": "^0.8.1",
"@hono/mcp": "^0.1.4",
"@modelcontextprotocol/sdk": "^1.17.0",
"hono": "^4.9.0",
"zod": "^3.25.0"
},
"devDependencies": {
"@cloudflare/vitest-pool-workers": "^0.5.2",
"@cloudflare/workers-types": "^4.20241004.0",
"typescript": "^5.5.2",
"vitest": "2.0.5",
"wrangler": "^4.73.0"
},
"packageManager": "pnpm@10.32.1",
"description": "Self-hosted email verification code platform on Cloudflare Workers — Hono, multi-user grants, remote MCP server for AI agents.",
"license": "MIT"
}