Skip to content
This repository was archived by the owner on Nov 27, 2026. It is now read-only.

Serve a Server Card, give server.json the Registry shape, and point at the mcp-server skill - #22

Merged
mgoldsborough merged 9 commits into
mainfrom
server-card-and-registry-server-json
Nov 18, 2026
Merged

mgoldsborough merged 9 commits into
mainfrom
server-card-and-registry-server-json

Conversation

@mgoldsborough

@mgoldsborough mgoldsborough commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Brings the template in line with nimblebrain-server-sdk 0.8.0 (now on PyPI) and the mcp-server skill (NimbleBrainInc/skills#70), which replaced mcpb and mcp-best-practices.

A server that describes itself

  • nimblebrain-server-sdk pinned to >=0.8,<0.9 (0.8.0 resolved locally).
  • The server is FastMCP("com.example/example", version=__version__, ...): a reverse-DNS name (the Server Card schema requires it) and its own version (without one, FastMCP reports its own).
  • add_server_card(mcp, title=..., description=...) serves an MCP Server Card at /mcp/server-card. A local NimbleBrain reads it when the server is added with npx nimblebrain mcp add http://127.0.0.1:8000/mcp. A connector, so no placements.

server.json is the deployment document, in the MCP Registry ServerDetail shape: the 2025-12-11 $schema, the same name, title, description and version as the card, repository as an object, and remotes with a placeholder deployed URL. It is what an operator adds to a NimbleBrain connectors catalog, and what mcp-publisher lists on the official MCP Registry. No packages (the release builds .mcpb bundles and publishes nothing to PyPI) and no _meta. The mpak-only fields (@-scoped name, publisher, string repository) are gone; the old file fails the schema on two of them. make bump and build-bundle.yml already move its version; the release job fails when the tag differs from __version__, which the card reports and only make bump moves.

tests/test_server_card.py fetches the card in-process and checks it carries __version__ and agrees with server.json on name, version, title and description.

make run-http binds 127.0.0.1 by default (HOST/PORT override it; on Linux, bind the Docker bridge or 0.0.0.0 for a local NimbleBrain to reach it).

Docs: CONTRIBUTING.md recommends --skill mcp-server and describes designing a tool (annotations, the error contract, failure-path tests); .github/ISSUE_TEMPLATE/new-server.md points at --skill mcp-server and this repo's name, and its definition of done matches what CI and the security scan gate; CLAUDE.md and README.md cover the card, server.json and deploying.

Checks: make check (format, lint, ty, 51 tests); jsonschema validates the new server.json; make run-http served the card (200, application/mcp-server-card+json); in a scratch copy, mcpb pack built and mpak-scanner found no critical or high issues.

Not here: .github/PULL_REQUEST_TEMPLATE.md still asks for "5+ tools"; make bump's sed -i '' is macOS-only (as before).

@mgoldsborough

Copy link
Copy Markdown
Contributor Author

QA Review: server-card-and-registry-server-json

Scope: 9 files, +171/−35 · worktree: loopt22/wt (pr-loop, prepared) · reviewed: f357d67 · CI: pending — lint and test pass; bundle and scan pending (no required checks)
Risk: LOW
Why this exists: the template builds new servers, so it has to match nimblebrain-server-sdk 0.8 (Server Card) and the mcp-server skill that replaced mcpb. Without this PR, every new server starts with an mpak-shaped server.json that fails the Registry schema, no card, and FastMCP's version reported as the server's own.

Critical (must fix)

None.

Fix in-PR (apply mechanically — no adjudication essay expected)

  • r1f1 [PR body] Refresh the body: "locked to 0.8.0" is not true of the repo. uv.lock is gitignored (.gitignore:71) and is not tracked on main or on this branch, so CI's uv sync --dev resolves the newest version in >=0.8,<0.9. Say "pinned to >=0.8,<0.9" (0.8.0 resolved locally) instead.

Suggestions (optional)

  • r1s1 [.github/workflows/build-bundle.yml:31] The release job rewrites version in manifest.json and server.json from the tag, but not __version__ in src/mcp_example/__init__.py. The card now reports __version__, so a release tagged without make bump first ships a bundle whose card version differs from its manifest and server.json. tests/test_server_card.py cannot catch this because it never runs on the release job. A matching sed on __init__.py in that step, or a check that fails when the tag and __version__ differ, would close the gap. This is outside the charter (the step predates this PR), and following make bump avoids it.
  • r1s2 [tests/test_server_card.py:11] httpx2 is imported directly, but it reaches the venv only as a transitive dependency of fastmcp. Declaring it in the dev dependency group would keep the test from depending on fastmcp's dependency list.

What Looks Good

  • version=__version__ is guarded by a test that can fail: with version= removed (in a scratch copy), both card tests fail ('4.2.2' == '0.1.0').
  • The card test fetches over the real ASGI app with the card media type, so it checks the route, the content type and the agreement with server.json in one pass.
  • server.json fits the Registry shape: the name pattern, a description under 100 characters, repository as an object with url and source, and remotes of type streamable-http. The SDK checks the same name and length rules when add_server_card is called, so a mismatch fails at import time.
  • run-http now binds loopback by default, and the Makefile, README and CLAUDE.md all document the Docker-bridge/0.0.0.0 override, including what 0.0.0.0 exposes.
  • No mcpb-skill, mcp-best-practices or FastMCP("Example") references are left in the tree. The PR template's MTF line is named as out of charter.
  • Public-repo hygiene: every link points at public docs or the public Registry repo.

Body claims

  • ✅ make check runs 51 tests: 51 passed locally on f357d67, and CI test passed.
  • ✅ The card is served at /mcp/server-card as application/mcp-server-card+json: the in-process test asserts both and passes.
  • ✅ make bump and build-bundle.yml already move server.json's version (Makefile:77, build-bundle.yml:34-37). See r1s1 for __version__.
  • ✅ Without version=, FastMCP reports its own version: reproduced, it reports 4.2.2.
  • ❌ "locked to 0.8.0": uv.lock is gitignored and untracked (r1f1).
  • Not verified here (no network): the jsonschema validation against the 2025-12-11 schema, and the mcpb pack / mpak-scanner run. CI's bundle and scan jobs are pending on this head and will check both.

Reviewer: Claude subagent (Codex unavailable: usage limit).

machine record
{
  "kind": "review",
  "pr": 22,
  "round": 1,
  "reviewed": "f357d67ef8d48fd9ac34827f413df3134cd35bf9",
  "delta_base": null,
  "ci": "pending",
  "risk": "LOW",
  "stop_gate": "n/a",
  "verdict": "Correct core: the card and the Registry-shaped server.json agree and are held together by a test that can fail. One body-wording fix, two optional suggestions.",
  "label": "eligible-on-green",
  "findings": [
    {
      "id": "r1f1",
      "bucket": "fix-in-pr",
      "file": "PR body",
      "line": null,
      "claim": "The body says the SDK is 'locked to 0.8.0', but uv.lock is gitignored and untracked, so CI resolves the newest version in >=0.8,<0.9.",
      "evidence": "reproduced",
      "receipt": "git check-ignore -v uv.lock -> .gitignore:71; git show origin/main:uv.lock -> not in origin/main; absent from the diff stat",
      "preconditions": null,
      "fix": "Reword the body to 'pinned to >=0.8,<0.9'.",
      "scope": "peripheral",
      "issue": false
    },
    {
      "id": "r1s1",
      "bucket": "suggestion",
      "file": ".github/workflows/build-bundle.yml",
      "line": 31,
      "claim": "The release step rewrites the manifest.json and server.json versions from the tag but not __version__, so a release tagged without make bump serves a card whose version differs from its manifest and server.json.",
      "evidence": "reasoned",
      "receipt": "build-bundle.yml:28-38 jq-rewrites only manifest.json and server.json; the card is built from mcp_example.__version__",
      "preconditions": "release tag != __init__.__version__ (make bump skipped) -> bundle manifest/server.json carry the tag version -> card reports the old __version__",
      "fix": "Also rewrite __version__ in src/mcp_example/__init__.py in that step, or fail the job when the tag and __version__ differ.",
      "scope": "peripheral",
      "issue": false
    },
    {
      "id": "r1s2",
      "bucket": "suggestion",
      "file": "tests/test_server_card.py",
      "line": 11,
      "claim": "httpx2 is imported directly but is only a transitive dependency of fastmcp.",
      "evidence": "reproduced",
      "receipt": "pyproject.toml does not list httpx2; uv.lock lists it only as a dependency of other packages",
      "preconditions": null,
      "fix": "Add httpx2 to the dev dependency group.",
      "scope": "peripheral",
      "issue": false
    }
  ]
}

@mgoldsborough

Copy link
Copy Markdown
Contributor Author

Adjudication round 1: body corrected, release job guards __version__ · fixed at 63e4cd8

Fix in-PR

r1f1 applied (PR body): the SDK line reads "pinned to >=0.8,<0.9 (0.8.0 resolved locally)"; uv.lock is untracked, as the receipt says.

Suggestions

r1s1 taken, 63e4cd8: build-bundle.yml's version step fails the job when the tag differs from __version__ (a check, not a rewrite, so make bump stays the one way the version moves). r1s2 declined.

Verification

CI runs 44396580285 / 44396580421: pending · local: make check (format, lint, ty, 51 passed) · the workflow change runs only on a release, so no PR check exercises it; its sed extraction returned 0.1.0 locally.

machine record
{
  "kind": "adjudication", "pr": 22, "round": 1, "fixed_at": "63e4cd8aa7ad33a2a7d4c3f9f61b144e435fb8f2",
  "verdicts": [
    {"id": "r1f1", "verdict": "valid", "premise": "verified",
     "resolution": "PR body reworded to 'pinned to >=0.8,<0.9 (0.8.0 resolved locally)'"},
    {"id": "r1s1", "verdict": "valid", "premise": "verified",
     "resolution": "release job fails when tag version != __version__, 63e4cd8"},
    {"id": "r1s2", "verdict": "valid", "premise": "accepted",
     "resolution": "declined"}
  ],
  "ci": "pending (runs 44396580285, 44396580421)",
  "local": "make check: format, lint, ty, 51 passed; sed extraction of __version__ -> 0.1.0"
}

@mgoldsborough

Copy link
Copy Markdown
Contributor Author

QA Review: server-card-and-registry-server-json

Scope: 9 files (delta: 1 file, +6/−0) · worktree: loopt22/wt (pr-loop, prepared) · reviewed: 63e4cd8 · CI: pending — lint, test and scan pass; bundle pending (no required checks)
Round: 2 (delta base: f357d67)
Stop gate: SHIP THE CORE
Risk: LOW

Critical (must fix)

None.

Fix in-PR (apply mechanically — no adjudication essay expected)

None.

Suggestions (optional)

None.

What Looks Good

  • r1f1 landed: the body now says "pinned to >=0.8,<0.9 (0.8.0 resolved locally)".
  • r1s1 landed as a check, not a rewrite, so make bump stays the only way __version__ moves. The guard runs before either jq rewrite, so a mismatched tag stops the job before anything is packed. Its sed expression is plain BRE, so it behaves the same on the GNU (ubuntu) and BSD (macos) runners in the matrix. Run against the tree: tags v0.1.0 and 0.1.0 pass, 0.2.0 fails.
  • The hard-coded src/mcp_example/__init__.py path matches the one make bump already writes (Makefile:79), so renaming the package means changing both, as it already did.
  • Severity-floor scan of the full branch (data loss, security, authn/authz): nothing new. run-http binds loopback by default; the release step's tag_name interpolation predates this PR and runs only on a published release.
  • r1s2 declined; it was optional, and nothing here reopens it.

Body claims

  • ✅ "the release job fails when the tag differs from __version__": the guard is at build-bundle.yml:33-38 and exits 1 on a mismatch (reproduced against the tree's __init__.py).
  • ✅ make check runs 51 tests: 51 passed locally on 63e4cd8, and CI test passed on this head.

Reviewer: Claude subagent (Codex unavailable: usage limit).

machine record
{
  "kind": "review",
  "pr": 22,
  "round": 2,
  "reviewed": "63e4cd8aa7ad33a2a7d4c3f9f61b144e435fb8f2",
  "delta_base": "f357d67ef8d48fd9ac34827f413df3134cd35bf9",
  "ci": "pending",
  "risk": "LOW",
  "stop_gate": "ship-the-core",
  "verdict": "Both round-1 fixes landed and hold. The delta (a release-time tag/__version__ guard) is correct on both runner OSes, and the severity-floor scan is clear. No findings.",
  "label": "eligible-on-green",
  "findings": []
}

@mgoldsborough mgoldsborough added the qa-reviewed QA review completed with no critical issues label Nov 18, 2026
@mgoldsborough
mgoldsborough merged commit c7dee31 into main Nov 18, 2026
4 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

qa-reviewed QA review completed with no critical issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant