Skip to content

mcp-hub: list endpoint returns a slim summary — use a lenient projector - #220

Merged
FMXExpress merged 3 commits into
mainfrom
claude/mcp-hub-list-summary
Jun 10, 2026
Merged

FMXExpress merged 3 commits into
mainfrom
claude/mcp-hub-list-summary

Conversation

@FMXExpress

Copy link
Copy Markdown
Owner

Why entries still skipped after #219

PR #219 ran every hub row through ProjectHubEntryToCatalog, which required endpointUrl (for HTTP) or command (for stdio). I verified by curl'ing the real registry:

GET https://pasclaw.dev/api/public/v1/mcp?limit=20
{"results":[
  {"slug":"replicate","displayName":"Replicate","summary":"…","transport":"http"},
  {"slug":"delphi-build-mcp-server","summary":"…","transport":"stdio"},
  …
]}

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 at GET /mcp/<slug>. So every list row failed the strict projector's "missing endpointUrl" / "missing command" check, and the operator kept seeing:

(showing built-in 5 entries)
(10 hub entry/entries skipped -- unsupported transport)

GetMCPHubEntry (used by pasclaw 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. Just Name + Transport + Desc + Docs. Returns False only when the row is structurally unusable (missing slug). Unknown transports DO project so the operator can see what's available in the registry.
  • ProjectHubEntryToCatalog unchanged — still strict, still validates endpointUrl / command / args[], still drives GetMCPHubEntry. An install that doesn't have those fields fails clearly instead of writing a broken Cfg.MCPServers row.
  • ResolveMCPCatalog now routes the list response through the summary projector. HubSkipped only 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 OK
  • Live on a box with OpenSSL: pasclaw mcp catalog should show 10 hub rows with the transport column tagging http / 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

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/pkg/mcp/PasClaw.MCP.Hub.pas Resolved
claude added 2 commits June 10, 2026 21:53
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
FMXExpress merged commit dfb76ff into main Jun 10, 2026
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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants