supermemory/apps
sreedharsreeram f355dc8039 feat(mcp): validate API keys via /session (#1839)
## What

The Supermemory API now serves the session endpoint unversioned at `/session` (supermemoryai/mono#3626). `sm_` API-key validation in the MCP worker calls `/session` instead of `/v3/session`. One-line code change.

- `apps/mcp/src/server/auth/index.ts`: `fetchSession` requests `/session`.
- `apps/mcp/src/server/auth/index.test.ts`: asserts the new URL and that a refused key makes exactly one request.
- `apps/mcp/src/shared/types.ts`: comment updated.

## Deploy order

This worker depends on the API serving `/session`. **Deploy mono#3626 first.** Until then, production answers `/session` with 404 for full keys and 403 for scoped keys (the scope allowlist is checked before routing), and every `sm_` key would be rejected.

No fallback to `/v3/session` on purpose: the only "old server" in scope is that deploy window, and a failed-request fallback would blur 403/404 semantics for a case merge ordering already covers.

## Verification

- `bun run check-types`, `vitest run src` (29/29).
- Against the API with mono#3626 running: full key → `/session` 200 valid; scoped key → `/session` 200 valid; bad key → `/session` 401 rejected, single call.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-10-24 23:59:06 +00:00
..
docs docs: explain optional content in v5 document lists (#1830) 2026-10-21 18:19:21 +00:00
mcp feat(mcp): validate API keys via /session (#1839) 2026-10-24 23:59:06 +00:00
memory-graph-playground fix(deps): bump next to 16.3.3 in chatapp, sdk-playground, and memory-graph-playground (#1655) 2026-09-09 23:01:32 -07:00
sdk-playground feat(tools)!: @supermemory/tools 3.0 on the v5 API, retire @supermemory/ai-sdk (#1773) 2026-10-06 17:03:47 +00:00
web fix(auth): upgrade Better Auth to patched 1.7.6 (#1719) 2026-10-02 17:05:13 -07:00