Skip to content

mcp: catalog of public MCP servers + install-by-name#91

Merged
FMXExpress merged 2 commits into
mainfrom
claude/mcp-catalog
May 30, 2026
Merged

mcp: catalog of public MCP servers + install-by-name#91
FMXExpress merged 2 commits into
mainfrom
claude/mcp-catalog

Conversation

@FMXExpress

Copy link
Copy Markdown
Owner

Adds two subcommands to pasclaw mcp so users can preload remote MCP servers from a curated catalog without having to look up the URL + bearer-header shape themselves.

pasclaw mcp catalog               # list known public MCP servers
pasclaw mcp install <name>        # add one from the catalog

Not preloaded — picoclaw seeds nothing, and the same rule fits PasClaw. No MCP server reaches a remote endpoint until the operator opts in. The catalog just removes the "look up the URL and the bearer shape" step that's the #1 way remote MCPs end up "broken on arrival" in someone's config.

Catalog entries

name env var provider
replicate REPLICATE_API_TOKEN Run AI models on Replicate.
digitalocean-apps DIGITALOCEAN_TOKEN DigitalOcean App Platform.
digitalocean-databases DIGITALOCEAN_TOKEN DigitalOcean Managed Databases.
runpod-docs (none) Search RunPod documentation.
huggingface HF_TOKEN Search models / datasets / papers / Spaces.

Each catalog row carries Name + URL + EnvVar + AuthFmt (Bearer %s) + Desc + Docs. ResolveAuthHeader formats the literal Authorization-header value from EnvVar + AuthFmt at install time. Stored as the args field on the mcp_servers entry — the exact shape the existing HTTP MCP client expects (PasClaw.MCP.HttpClient.pas line 11-13: "Auth tokens come from the configured args slot, shaped as 'Bearer ...'").

Install behavior

  • Idempotent — running install again refreshes the args slot in place rather than appending a duplicate row.
  • Env unset — warns clearly, installs anyway with empty Authorization, suggests "set <ENV_VAR> and re-run pasclaw mcp install <name>" so the user can refresh after fixing the env.
  • No auth (e.g. runpod-docs) — installs immediately.
  • Unknown name — errors with hint to run pasclaw mcp catalog.

list / remove / test / show / edit all work normally afterwards since the installed entry is just a regular mcp_servers row.

Verification (live smoke)

PASCLAW_HOME=/tmp/x

$ pasclaw mcp catalog
name                       env var               status
               replicate   REPLICATE_API_TOKEN   unset
       digitalocean-apps   DIGITALOCEAN_TOKEN    unset
  digitalocean-databases   DIGITALOCEAN_TOKEN    unset
             runpod-docs                         (no auth)
             huggingface             HF_TOKEN    unset

$ pasclaw mcp install replicate
! env var REPLICATE_API_TOKEN is not set. Installing anyway with empty Auth…

$ REPLICATE_API_TOKEN=r8_FAKE12345 pasclaw mcp install replicate
✓ installed MCP server replicate

$ cat $PASCLAW_HOME/config.json | jq .mcp_servers
[
  {
    "name": "replicate",
    "cmd": "https://mcp.replicate.com",
    "args": "Bearer r8_FAKE12345",
    "env": "",
    "enabled": true
  }
]

Adding more providers

Append a TMCPCatalogEntry record to KnownMCPServers in PasClaw.MCP.Catalog. No other code touches the catalog data; list / install / show / test paths need no changes.

https://claude.ai/code/session_01TBcLtmpj7dqA5tyFbGnQon


Generated by Claude Code

Adds two subcommands to `pasclaw mcp`:

  catalog          list the hand-curated public MCP servers PasClaw
                   knows the URL + auth shape for.
  install <name>   write an mcp_servers entry from a catalog row,
                   pulling the bearer token out of the env var the
                   catalog entry names.

Why this exists rather than preloading the entries with
enabled=true: picoclaw seeds nothing, and the same rule fits
PasClaw — no MCP server reaches out to a remote endpoint until the
operator explicitly opts in. The four providers we know about all
ship real MCP servers (they're not REST endpoints we'd wrap as
skills), so they belong in mcp_servers; the catalog just removes
the "look up the URL and the bearer shape" step that's the #1 way
remote MCPs end up "broken on arrival" in someone's config.

Catalog entries (PasClaw.MCP.Catalog.KnownMCPServers):

  replicate                  REPLICATE_API_TOKEN
  digitalocean-apps          DIGITALOCEAN_TOKEN
  digitalocean-databases     DIGITALOCEAN_TOKEN
  runpod-docs                (no auth — public docs MCP)
  huggingface                HF_TOKEN

Each row carries:
  Name     — short identifier (kebab-case)
  URL      — the remote MCP endpoint
  EnvVar   — env var holding the bearer token (empty = no auth)
  AuthFmt  — Authorization-header template, e.g. "Bearer %s"
  Desc     — one-liner shown by `pasclaw mcp catalog`
  Docs     — URL to the provider's MCP docs

ResolveAuthHeader formats the literal Authorization-header
value from EnvVar + AuthFmt at install time. Stored as the args
field on the mcp_servers entry — exact shape the existing
HTTP MCP client already expects (see PasClaw.MCP.HttpClient.pas
line 11-13: "Auth tokens come from the configured `args` slot,
shaped as 'Bearer ...'").

`install` is idempotent — running it again after setting the env
var refreshes the args slot in place rather than appending a
duplicate row. List/remove/test/show/edit all work normally
afterwards since the entry is just a regular mcp_servers row.

Live smoke (PASCLAW_HOME=tmp):
  `pasclaw mcp catalog`                — lists 5 rows, marks each
                                         env-var as set / unset.
  `pasclaw mcp install replicate`
    with env unset                     — installs anyway, prints a
                                         "set REPLICATE_API_TOKEN
                                         and re-run" warning,
                                         args left empty.
  `pasclaw mcp install replicate`
    with env=r8_FAKE12345               — overwrites the previous
                                         install with args =
                                         "Bearer r8_FAKE12345".
  `pasclaw mcp install runpod-docs`    — installs immediately
                                         (no auth required).
  `pasclaw mcp install bogus`          — errors with hint to run
                                         catalog.
  config.json mcp_servers carries cmd=URL, args=Bearer <tok>,
  enabled=true — matches the persistence shape the existing
  `pasclaw mcp add` produces.

Adding more providers is "append a TMCPCatalogEntry record to
KnownMCPServers"; no other code touches the catalog data and
none of the list/install/show/test paths need changes.

dproj DCCReference added for the new unit. README's MCP section
gains the catalog + install lines and a 5-row table.

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: 537198363b

ℹ️ 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.Catalog.pas Outdated
Live probe of the catalog URLs surfaced that the Replicate entry
was missing the /mcp path: POST to https://mcp.replicate.com
returns 404 Not Found, while POST to https://mcp.replicate.com/mcp
returns the expected 401 invalid_token shape (auth-shape ✓,
real REPLICATE_API_TOKEN authenticates).

Verified all five catalog endpoints accept the cataloged auth shape:

  replicate                  401 invalid_token        (token shape ✓)
  digitalocean-apps          200 full handshake       ✓
  digitalocean-databases     200 full handshake       ✓
  huggingface                401 Unauthorized         (token shape ✓)
  runpod-docs                200 SSE response         ✓ (no auth)

This also resolves the Codex P1 on PR #91 — the bot inferred OAuth
from Replicate's Claude-Code-specific install UX, but the underlying
transport is plain Bearer-token Streamable HTTP, which our HTTP MCP
client already handles (PasClaw.MCP.HttpClient.RoundTrip sends
Authorization + Accept: application/json, text/event-stream and
CollapseSSE handles the SSE-framed responses).

https://claude.ai/code/session_01TBcLtmpj7dqA5tyFbGnQon
@FMXExpress FMXExpress merged commit 489b783 into main May 30, 2026
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