Repository navigation
mcp-hub: list endpoint returns a slim summary — use a lenient projector - #220
Merged
Merged
Conversation
You were right: the actual hub response at https://pasclaw.dev/api/public/v1/mcp publishes only four fields per result -- slug / displayName / summary / transport. The previous PR still routed list responses through ProjectHubEntryToCatalog, which requires endpointUrl (for HTTP) or command (for stdio). Every list entry got rejected with "missing endpointUrl" or "missing command", so the operator-visible output stayed stuck at (showing built-in 5 entries) (10 hub entry/entries skipped -- unsupported transport) The fields the strict projector needs only show up in the per-slug detail at /mcp/<slug>. GetMCPHubEntry (used by `pasclaw mcp install`) already fetches that detail and validates it, so install still works once a slug is known -- the catalog browse path was the only broken piece. Fix: split the projection. - ProjectHubSummaryToCatalog (new) -- list-endpoint lenient. Just name + transport + summary + docs. Returns False only on structural unusability (missing slug). Unknown transports DO project so the operator sees what's in the registry; install-time strict transport validation stays in ProjectHubEntryToCatalog. - ProjectHubEntryToCatalog (unchanged) -- detail-endpoint strict. Continues to require endpointUrl / command + args[] / envSchema so an install that doesn't have those fields fails clearly instead of writing a broken Cfg.MCPServers row. - ResolveMCPCatalog now calls ProjectHubSummaryToCatalog. The HubSkipped counter only ticks up on structurally-broken entries (no slug), not on entries whose transport happens to be one the list endpoint doesn't elaborate. Five new test cases pin the summary projector contract: http / stdio / sse all project (Transport tagged but URL / Cmd left empty), missing-transport defaults to http, missing slug rejects with a clear message. https://claude.ai/code/session_01TBcLtmpj7dqA5tyFbGnQon
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f92452762a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
After this PR the only reason ResolveMCPCatalog increments HubSkipped is a malformed list-summary row (no slug). The "-- unsupported transport" message was inherited from the old strict projector and now misleads: unknown transports DO project under the lenient summary projector -- the operator sees them in the catalog tagged with their transport name. Rename to "malformed records on the registry" so a non-zero count points the operator at the actual cause. https://claude.ai/code/session_01TBcLtmpj7dqA5tyFbGnQon
… (Codex P2 #220) Codex P2: with the lenient list-summary projector this PR introduced, hub rows landed in DoCatalog with EnvVar blank because the /mcp?limit=N response carries no envSchema. DoCatalog rendered blank EnvVar as "(no auth)" -- so browsing the live catalog now told the operator that authenticated servers like digitalocean-apps need NO credentials, until they actually ran `mcp install` and hit the warning. Fix: add TMCPCatalogEntry.AuthKnown -- True when the row carries authoritative env info, False when it came from a list-summary that we can't trust. - KnownMCPServers (bundled 5): hand-curated env metadata -> all True. - ProjectHubEntryToCatalog (detail endpoint, both http and stdio branches): walked envSchema, EnvVar is authoritative even when blank -> set True. - ProjectHubSummaryToCatalog (list endpoint): leaves AuthKnown=False (record default) so the catalog display can flag the row. DoCatalog now branches on AuthKnown: - AuthKnown=True: render (no auth) / set / unset as before. - AuthKnown=False: render dim "(see install)" so the operator knows they need to install the entry before they can know its auth posture. Three new test cases pin the contract: - TestListSummaryProjectsHttpEntry now asserts AuthKnown=False. - TestStrictProjectorMarksAuthKnown covers both env-bearing and env-less detail rows. - TestStdioStrictProjectorMarksAuthKnown covers the stdio branch. https://claude.ai/code/session_01TBcLtmpj7dqA5tyFbGnQon
FMXExpress
pushed a commit
that referenced
this pull request
Jun 13, 2026
Both changelog files were stuck at the 2026-06-10 TUI / background- subagent / session_search / tool-RPC entries. ~7 weeks of merged PRs (#214 through #244) had landed without a corresponding entry in either file -- the git log was the only record of features like the knowledgebase, inbound MCP server mode, checkpoints + /undo, heartbeat daemon, shell backends (local | docker), send_message, promptware defense, Windows shell-output encoding fixes, fs_grep ripgrep optimisations, OpenTelemetry traces, and `pasclaw agent --quiet`. Added (newest first): 2026-06-13 #244 agent --quiet log-level clamp 2026-06-12 #243 dcc64 search path + agent --quiet / -q #242 OpenTelemetry traces (OTLP/HTTP+JSON) #241 fs_grep tier 5+6 (byte walker + Boyer-Moore-Horspool) #240 fs_grep tier 1-4 (deferred hash + skip-dirs + binary sniff + size cap) 2026-06-11 #239 Windows shell output: auto-detect UTF-8 vs OEM #238 Hashline fs_read header mojibake fix (¶ vs ¶) #237 Windows shell output: OEM codepage decode 2026-06-10 #233 Shell backends (local | docker via IShellBackend) #232 Heartbeat daemon + reversible condensation (CCR) #230 send_message tool + condenser families + promptware defense + task-aware MEMORY.md slicing 2026-06-09 #223 /goal Ralph loop + judge model + JSON-aware condenser #222 /undo wired into agent + sample dprojs #221 Checkpoints (auto-snapshot + TUI /undo) #220 mcp catalog: lenient hub projector #219 mcp: SSE / Streamable HTTP / stdio hub transports #218 Inbound MCP server mode #217 onboard: offer to index docs into the knowledgebase #214 Knowledgebase (RAG over operator-curated docs) Skipped from this changelog (build-system / Delphi-fix / FPC-fix PRs visible in the git log but not user-facing features): #215, #216, #224, #225, #226, #227, #228, #229, #231, #234, #236. Both files (README.md and docs/changelog.md) updated with the same entries -- intentional mirror so a reader on either surface sees the same history. Same prose in both; same footnote refs at the bottom. Validated: every [#N] reference in both files has a matching [#N]: URL footnote (no broken links).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why entries still skipped after #219
PR #219 ran every hub row through
ProjectHubEntryToCatalog, which requiredendpointUrl(for HTTP) orcommand(for stdio). I verified bycurl'ing the real registry:The list endpoint returns only four fields per row:
slug,displayName,summary,transport. The install-time detail (endpointUrl,command,args[],envSchema[]) only appears in the per-slug detail atGET /mcp/<slug>. So every list row failed the strict projector's "missing endpointUrl" / "missing command" check, and the operator kept seeing:GetMCPHubEntry(used bypasclaw mcp install) already fetches the detail endpoint and validates it, so install was actually working — only the browse path was stuck.Fix
ProjectHubSummaryToCatalog(new) — lenient list-endpoint projector. JustName+Transport+Desc+Docs. ReturnsFalseonly when the row is structurally unusable (missing slug). Unknown transports DO project so the operator can see what's available in the registry.ProjectHubEntryToCatalogunchanged — still strict, still validatesendpointUrl/command/args[], still drivesGetMCPHubEntry. An install that doesn't have those fields fails clearly instead of writing a brokenCfg.MCPServersrow.ResolveMCPCatalognow routes the list response through the summary projector.HubSkippedonly ticks for structurally broken entries.Test plan
make test-mcp-hub-projection— 17 cases green (12 from mcp: accept sse / streamable-http / stdio hub transports (was HTTP-only) #219 + 5 new for the summary projector covering http / stdio / sse / missing-transport-defaults-to-http / missing-slug-rejected)make smoke— all OKpasclaw mcp catalogshould show 10 hub rows with thetransportcolumn tagginghttp/sse/stdio— sandbox here can't reach the hub (no libcrypto)pasclaw mcp install <slug>continues to work for both http and stdio entries (validated via the unchanged detail projector path)https://claude.ai/code/session_01TBcLtmpj7dqA5tyFbGnQon
Generated by Claude Code