mirror of
https://github.com/supermemoryai/claude-supermemory.git
synced 2026-09-14 14:58:03 +08:00
7f10b85b4a
A stored key proves nothing — the command now curls /v4/profile and reports the HTTP status, distinguishing working key (200), revoked or invalid key (401/403), and unreachable API. Ports the idea from #87 (@ayushsingh82). Fixes #95 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1.5 KiB
1.5 KiB
description, allowed-tools
| description | allowed-tools | ||
|---|---|---|---|
| Show Supermemory authentication and connection status |
|
Supermemory Status
Report the user's Supermemory status:
- Read
~/.supermemory-claude/credentials.json(may not exist). Never print the full API key — show at most the first 6 and last 4 characters. The key source is envSUPERMEMORY_CC_API_KEYwhen set, otherwise the credentials file. - Probe real connectivity — a stored key proves nothing by itself. With the resolved key, run:
Interpret loudly:
curl -sS -o /dev/null -w '%{http_code}' -m 8 -X POST "${SUPERMEMORY_API_URL:-https://api.supermemory.ai}/v4/profile" \ -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -H "x-sm-source: claude-code" \ -d '{"containerTag":"<this project's container tag>","q":"connectivity probe"}'200→ reachable and the key works;401/403→ reachable but the key is invalid or revoked (say so explicitly — this is the silent-failure case the probe exists to catch); timeout / connection error /5xx→ API unreachable, report the exact error. - Call the
whoAmIMCP tool if the supermemory MCP server is connected, and say whether the MCP path works too. - Report: authenticated or not, key source, the active project container tag, API reachability (with the probe's HTTP status), and MCP reachability.
If not authenticated, tell the user a new session will open the browser login automatically, or they can set SUPERMEMORY_CC_API_KEY.