GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — mcp/experimental: add ServerCard convenience helper (SEP-2127) by SamMorrowDrums · Pull Request #1024 · modelcontextprotocol/go-sdk

Conversation

@SamMorrowDrums

@SamMorrowDrums SamMorrowDrums commented Jun 25, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Summary

Draft Go reference implementation for SEP-2127 MCP Server Cards.

This adds an experimental mcp/experimental/servercard package that ports the server-side convenience helper from modelcontextprotocol/python-sdk#2951 for building a static Server Card from mcp.Implementation metadata and serving it with the discovery CORS/cache headers.

Tracking / coordination

  • SEP-2127: MCP Server Cards
  • Spec/source of truth: modelcontextprotocol/experimental-ext-server-card
  • Python reference implementation: Add experimental Server Cards support (SEP-2127) python-sdk#2951
  • Tracks Reference implementations in Python and Go ext-server-card#16
  • Coordinating with the in-flight extensions framework branch: guglielmoc/SEP-2133_extensions_framework

This is opened as a draft because it is a nontrivial experimental API and should be promoted after WG review / proposal soak.

Validation

  • go vet ./...

  • go build ./...

  • go test ./...

  • Adds strong ETag generation plus If-None-Match conditional-request handling for Server Cards; see Discovery: recommend ETag + conditional requests (If-None-Match/304) as a SHOULD for card/catalog endpoints ext-server-card#33.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
This was referenced Jun 25, 2026
Reference implementations in Python and Go modelcontextprotocol/ext-server-card#16
Open
Discovery: recommend ETag + conditional requests (If-None-Match/304) as a SHOULD for card/catalog endpoints modelcontextprotocol/ext-server-card#33
Closed
piyushbag
piyushbag approved these changes Jun 28, 2026
View reviewed changes

@piyushbag piyushbag left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Nice to see SEP-2127 isolated under mcp/experimental/servercard rather than touching core mcp.

Local check on this branch:

go test ./mcp/experimental/servercard/... -count=1

All pass. Validation coverage for version ranges, ETag/If-None-Match, and discovery headers looks solid.

Please rebase onto current main before merge (branch is behind). No other concerns from my side on the experimental API shape.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

SamMorrowDrums reacted with heart emoji
All reactions
  • ❤️ 1 reaction
tadasant
tadasant reviewed Jul 20, 2026
View reviewed changes

@tadasant tadasant left a comment •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Did a pass at an automated review to ensure alignment with some of the latest Server Card changes -- no blockers, lgtm!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

SamMorrowDrums reacted with heart emoji
All reactions
  • ❤️ 1 reaction
@SamMorrowDrums SamMorrowDrums mentioned this pull request Jul 20, 2026
docs(servercard): add developer guidance and validation fixes SamMorrowDrums/go-sdk#5
Merged
@SamMorrowDrums
SamMorrowDrums force-pushed the experimental-server-card branch from ef93f97 to d4fcacc Compare July 20, 2026 20:43
olgasafonova added a commit to olgasafonova/mcp-servercard-go that referenced this pull request Jul 24, 2026
@olgasafonova @claude
docs: SEP-2127 ecosystem check, spec has moved under us (4fe)
028f56f
The bead assumed SEP-2127 had stalled. PR #2127 is still open and
CHANGES_REQUESTED, which reads as stalled, but the work moved elsewhere:

  - PR #2893 merged 26-06-2026, refactoring SEP-2127 from Standards Track
    to an Extensions Track charter that delegates the wire format to
    experimental-ext-server-card
  - .well-known was dropped as the card location; it is now
    GET <streamable-http-url>/server-card
  - modelcontextprotocol/go-sdk#1024 adds an official
    mcp/experimental/servercard package, challenging this repo's
    "reference implementation for Go" framing

So servercard.WellKnownPath, WellKnownPathFor() and the application/json
content type in handler.go are all divergences from normative text. The
card struct in card.go is still correct.

The one production adopter has already migrated: gateway.pipeworx.io
301s from the old path to /mcp/server-card (verified live).

54 claims tagged: 87% HIGH, 11% MEDIUM, 2% LOW.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@SamMorrowDrums SamMorrowDrums mentioned this pull request Jul 27, 2026
docs: add Server Card roadmap priorities modelcontextprotocol/ext-server-card#47
Merged
@SamMorrowDrums
SamMorrowDrums marked this pull request as ready for review July 28, 2026 13:13
SamMorrowDrums added a commit to modelcontextprotocol/ext-server-card that referenced this pull request Aug 12, 2026
@SamMorrowDrums
docs: add Server Card roadmap priorities (#47)
526201b
The WG's proposed priorities for the core-maintainer roadmap, per the
Jul 27 meeting. Three tracks, in priority order:

1. **Graduate the Server Card as an official MCP extension** — gated on
merging an SDK reference impl (Python [python-sdk#2951], Go
[go-sdk#1024], TS [typescript-sdk#2527]), landing best practices
([#40]/[#36]), and keeping the GitHub showcase ([#34]) in sync.
2. **Describe what a server does, not just where to reach it** — the
primitives / static-capability work ([#30]), framed around the problem:
a card lists URLs but no operations for consumers that never connect.
3. **Authentication** — express real-world per-remote auth ([#13]); land
a limited shape first, expand as a fast-follow.

Kept deliberately short as a strawman for public comment. Docs-only;
`format:check` passes.

[python-sdk#2951]:
modelcontextprotocol/python-sdk#2951
[go-sdk#1024]: modelcontextprotocol/go-sdk#1024
[typescript-sdk#2527]:
modelcontextprotocol/typescript-sdk#2527
[#13]:
#13
[#30]:
#30
[#34]:
#34
[#40]:
#40
[#36]:
#36

---------

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 904e057e-7dd0-4dfc-9e15-571ddeb8475f
Copilot-Session: 2eabcc66-5630-47ce-b193-171bbcaff1e8
@ravyg

ravyg commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Status check on this one, since the surrounding context has moved a lot since the last push (Jul 21):

Timeline

  • Jun 25: PR opened as the Go reference implementation for SEP-2127, tracked in experimental-ext-server-card#16.
  • Jun 28: community approval (@piyushbag).
  • Jul 20: ext-server-card#42 (AI Catalog discovery) merged. @tadasant said the reference PRs would be marked ready and merged pending SDK maintainer approval, and left a no-blockers review here.
  • Jul 24 and Aug 12: #46 (ETag revalidation, already covered here) and the WG roadmap landed. The roadmap lists "a merged SDK reference implementation" as the remaining requirement under SEP-2133, and names this PR and python-sdk#2951.
  • Aug 3 and Aug 20: SEP text updates (#3109, #3242).
  • Oct 6: SEP-2127 merged.

Current state of this PR

  • Mergeable and CI green (including client and server conformance).
  • No Go SDK maintainer review yet, so it's the only blocker.
  • schema.json is unchanged upstream since the 3b2d974 pin used in the docs. The only upstream drift is docs/discovery.md.

Small doc updates that look needed

  • The "AI Catalog context" section of docs/server_cards.md (and its .src.md) still describes ext-server-card#42 as a "draft PR" and the "intended discovery direction". It merged Jul 20, so that wording can now point at docs/discovery.md directly.

Scope compared with the other SDKs
This PR is the server-side helper only (build, validate, serve). The TypeScript (#2527) and Python (#3139) drafts also cover the client side:

  • fetching /.well-known/ai-catalog.json
  • fetching and validating the cards it references
  • resolving a remote's URL and headers
  • checking a card against the live initialize result

@SamMorrowDrums, are you still planning to drive this? If it helps, I'm happy to do the doc refresh above. I can also send the client-side discovery as a follow-up PR stacked on this one, so this PR stays server-only and reviewable.

@maciej-kisiel @guglielmo-san, could one of you take a look when you get a chance? Per the WG roadmap, a merged reference implementation is what SEP-2127 is waiting on.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@SamMorrowDrums

SamMorrowDrums commented Nov 10, 2026

Copy link
Copy Markdown
Contributor Author

The server card SEP is merged, conformance tests are planned and so I hope we can unblock SDK implementation now.

guglielmo-san reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

SamMorrowDrums and others added 4 commits November 10, 2026 16:26
@SamMorrowDrums
mcp/experimental: add ServerCard convenience helper
ff85460
Adds experimental Server Card types and helpers for SEP-2127, including
building a card from implementation metadata and serving it with discovery
headers.

Co-authored-by: Copilot <[email protected]>
@SamMorrowDrums
mcp/experimental: add ETag support to ServerCard handler
76175d5
Co-authored-by: Copilot <[email protected]>
@SamMorrowDrums
fix(servercard): align validation with the draft schema
a6c4787
Validate nested input formats, icon themes, URIs, Unicode lengths, and
exact versions. Avoid caching handler error responses.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 38f143e1-c0ff-47a9-ae4d-fd6ea9a5b7fd
@SamMorrowDrums
docs(servercard): add experimental developer guide
11eac37
Document building, serving, and publishing Server Cards with the Go SDK,
including AI Catalog context, security guidance, and checked examples.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 38f143e1-c0ff-47a9-ae4d-fd6ea9a5b7fd
@SamMorrowDrums
SamMorrowDrums force-pushed the experimental-server-card branch from 96edebb to 11eac37 Compare November 11, 2026 15:36
guglielmo-san
guglielmo-san reviewed Nov 13, 2026
View reviewed changes
Comment thread mcp/experimental/servercard/servercard.go
func Handler(card *ServerCard) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
setDiscoveryHeaders(w.Header())
if r.Method != http.MethodGet && r.Method != http.MethodHead {

@guglielmo-san guglielmo-san Nov 13, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

CORS preflight request should be handled too

if r.Method == http.MethodOptions {
	w.WriteHeader(http.StatusNoContent)
	return
}

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread mcp/experimental/servercard/servercard.go

// Handler returns an HTTP handler that serves card as a Server Card discovery
// document.
func Handler(card *ServerCard) http.Handler {

@guglielmo-san guglielmo-san Nov 13, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

If card is static, there is no need to validate, marshal and sha on every request, it can be done once before returning the http.HandlerFunc

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread mcp/experimental/servercard/servercard.go
Comment on lines +179 to +187
if cfg.name == "" {
return nil, errors.New("server card name must be set")
}
if impl.Version == "" {
return nil, errors.New("implementation version must be set to build a Server Card")
}
if cfg.description == "" {
return nil, errors.New("server card description must be set")
}

@guglielmo-san guglielmo-san Nov 13, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

if withDescription() and withName() are not provided, should we fallback to impl.Description and impl.Name ?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread mcp/experimental/servercard/servercard.go
Comment on lines +353 to +357
func setDiscoveryHeaders(h http.Header) {
h.Set("Access-Control-Allow-Origin", "*")
h.Set("Access-Control-Allow-Methods", http.MethodGet)
h.Set("Access-Control-Allow-Headers", "Content-Type")
}

@guglielmo-san guglielmo-san Nov 13, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Suggested change
func setDiscoveryHeaders(h http.Header) {
h.Set("Access-Control-Allow-Origin", "*")
h.Set("Access-Control-Allow-Methods", http.MethodGet)
h.Set("Access-Control-Allow-Headers", "Content-Type")
}
func setDiscoveryHeaders(h http.Header) {
h.Set("Access-Control-Allow-Origin", "*")
h.Set("Access-Control-Allow-Methods", "GET, HEAD, OPTIONS")
h.Set("Access-Control-Allow-Headers", "Content-Type, If-None-Match")
h.Set("Access-Control-Expose-Headers", "ETag")
}

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Wolfe-Jam Wolfe-Jam mentioned this pull request Nov 26, 2026
feat(sep-2127): Server Card conformance scenario modelcontextprotocol/conformance#605
Draft

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@guglielmo-san guglielmo-san guglielmo-san left review comments
+2 more reviewers
@tadasant tadasant tadasant left review comments
@piyushbag piyushbag piyushbag approved these changes
Reviewers whose approvals may not affect merge requirements

At least 1 approving review is required to merge this pull request.

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@SamMorrowDrums @ravyg @tadasant @piyushbag @guglielmo-san
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.