Repository navigation
fix(cli): warn in doctor when the MCP endpoint lacks the /mcp suffix - #698
Conversation
Add a pure classifyMcpEndpoint + MCP_PATH_SUFFIX shared with mcpToRestBase, thread a source id through resolveProjectConnection/ resolveConnection/loadControl, and use both in doctor's endpointCheck to WARN (never FAIL) with the offending source and a fix command — closing the gap where a suffix-missing endpoint passed every doctor check via the suffix-agnostic REST probes and then 404s for MCP clients.
Update docs/cli.md, packages/cli/README.md, the self-host SKILL.md (Step 8 + version bump to 1.0.1, mirrored to the plugin copy), and self-host.mdx Step 3 to describe the new WARN when a resolved MCP endpoint does not end in /mcp — replacing the old "check the suffix yourself" guidance now that doctor does it automatically.
|
The dashboard preview for this PR — redeployed on each push that changes the web app.
Preview always points at this PR's latest commit; Deployment is the immutable build of |
|
| Gate | Status | Details |
|---|---|---|
| Description vs. code | Docs list omits llms.txt/template.md and remote.mdx, added in 3eabed0. | |
| Prior review feedback | ✅ | Earlier review comments are resolved. |
| Documentation | ✅ | Docblocks, docs/cli.md, README, llms.txt and both docs pages explain the WARN and its fix. |
| Self-review signals | ✅ | No debug logs, leftover TODOs, or unreviewed stubs. |
| Code review | ✅ | The multi-lens review found no blocking issues. |
Found
Quality — produced 1 → posted inline 0 · cleared 0 · carried forward 0 · deferred 0 · below-bar 0
Optimality — ran — 0 proposals: a pure offline shape check plus source threading fits the existing resolver; a live MCP probe was considered and rejected (it would fail on proxies doctor cannot judge)
Standards — ran — 3 governing docs, 0 findings (user-facing docs + llms.txt updated together; skill version bumped)
Run
full · 234 lines in delta · tier deep · depth checkout
Integrations — not activated — no manifest or lockfile in the diff
CI — still pending: Typecheck, Test & Lint (affected), Web — Vercel preview (changed) / Deploy Vercel preview, Web — Storybook interaction + visual tests (changed) · 6 passed
Memories — 1 indexed · 1 used (1 hotspot)
- hotspot
hotspot::packages/cli/src/commands/doctor.mjs
Nothing to report — measurability (skipped), severity, 0 files skipped.
pr-reviewer · commit 3eabed0 · full review · how these findings are produced · updated
…-installed gate A plain `lorekit install --project|--global --endpoint <u>` early-returns on an installed scope, so the printed fix rewrote nothing. Add --force to every install fix and prove each one rewrites an already-installed entry.
…co host A *.supabase.co endpoint like /rest/v1 got a placeholder fix even though the host only serves MCP at one path; suggest the concrete URL instead.
Why
An endpoint like
https://<ref>.supabase.co/functions/v1(missing the/mcpsuffix) passes everylorekit doctorcheck today — the connectivity/authentication probes go over REST viamcpToRestBase, which is suffix-agnostic — and only 404s once an actual MCP client tries to use it.What changed
classifyMcpEndpoint(sharedMCP_PATH_SUFFIXwithmcpToRestBase) that judges whether an endpoint's path is shaped correctly, with a stricter rule on*.supabase.cohosts.sourceid throughresolveProjectConnection/resolveConnection/loadControlso doctor can name exactly which config (flag,.mcp.json,~/.claude.json,.lorekit.json, or an env var) produced a bad endpoint.doctor'sendpointcheck now WARNs (never fails) on a wrong-shaped endpoint, names the source, and prints a ready-to-run fix. The install fixes carry--force(or--mcp-jsonfor the committable web entry) so they get past install's already-installed early return. On a*.supabase.cohost, a wrong path gets<origin>/functions/v1/mcpas the suggested URL. A healthy endpoint's output is unchanged.llms.txttemplate (regenerated) to describe the new warning.*.supabase.coneeds/functions/v1/mcp; a custom domain or reverse proxy only needs the path to end in/mcp.resolveProjectConnectiontests no longer read the real~/.claude.json.How to verify
cd packages/cli && node --test test/doctor.test.mjs test/config.test.mjs. TheFIX_CASEStest installs with a bad endpoint, runs each printed fix, and asserts the entry changed.