feat!: accept only OAuth on /mcp and remove MCP keys #50
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/oauth-only-mcp"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
OAuth is now the only way into
/mcp. MCP keys (mhm_) are removed end to end. Adminmhk_REST tokens are unchanged and still refused on/mcp.trail checkreports 3 conflicts claiming this brings back MCP keys or admin tokens on/mcp. They are keyword matches: keys are deleted here, and a test pins that bothmhm_andmhk_bearers get 401 on/mcp. The learning that describes MCP keys as active still needs replacing.Evidence
Before:
/mcpaccepted a validmhm_key and opened a session as its owner.After:
accepts nothing but an OAuth access tokeninapps/api/test/gateway.test.tspasses:nix develop -c ./scripts/ci.shpassed: lint, typecheck, 538 tests (2 skipped), build, audit. A later commit only removes two unused test imports; lint and the API typecheck were re-run after it.Migration on a throwaway Postgres 18 seeded through 0009 with one MCP key, one admin token, and key-owned and client-owned rows:
The portal change is covered by component tests only. No screenshots were taken.
Merge Danger
Door: one-way
Migration 0010 deletes every MCP key and its access rules. Reverting the code does not restore them; users would have to create new keys and set their rules again.
Blast Radius: integrations
Anything authenticating to
/mcpwith anmhm_key (scripts, automation tools, clients that only take a URL and headers) gets 401 and must move to OAuth or stop. Clients that cannot do OAuth have no replacement. Past tool calls made through a key stay in activity but lose their client name.🤖 Generated with Claude Code