Skip to content

Expose server metadata in Server initializer - #258

Open
yonaskolb wants to merge 1 commit into
modelcontextprotocol:mainfrom
yonaskolb:expose-server-info-metadata
Open

yonaskolb wants to merge 1 commit into
modelcontextprotocol:mainfrom
yonaskolb:expose-server-info-metadata

Conversation

@yonaskolb

Copy link
Copy Markdown

Summary

  • expose description, website URL, and icons in the public Server initializer
  • populate the existing Server.Info fields so they are included in initialize responses
  • add a handshake test covering all server metadata, including themed icons

All new parameters default to nil, preserving existing call sites.

Verification

  • swift build
  • swift test (552 tests)
  • swift package generate-documentation --target MCP --warnings-as-errors
  • git diff --check

ianegordon added a commit to ianegordon/swift-sdk that referenced this pull request Sep 12, 2026
Issue titles are now bare 'Upstream PR#<n>'; the merge/investigate/decline
label carries the decision, so the title does not duplicate it. Two places
named the old convention and are updated.

The investigate count was also stale: it said twelve, which was true at
triage on 2026-09-10. Four were declined since (modelcontextprotocol#280, modelcontextprotocol#226, modelcontextprotocol#118, modelcontextprotocol#204) and
two were promoted and merged (modelcontextprotocol#266 as entries 9/9a, modelcontextprotocol#275 as 10/10a/10b),
leaving six — modelcontextprotocol#178, modelcontextprotocol#213, modelcontextprotocol#216, modelcontextprotocol#257, modelcontextprotocol#258, modelcontextprotocol#259 — now listed by number
rather than by count, so the sentence cannot drift again.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Eb9yGSXH1TVkg5Afsu9phk
ianegordon added a commit to ianegordon/swift-sdk that referenced this pull request Sep 12, 2026
Upstream PR modelcontextprotocol#258 (yonaskolb), head adcb230.

The convenience Server.init accepted name/version/title/instructions and
built a Server.Info that silently dropped description, websiteUrl and
icons -- fields Server.Info already declares and the 2025-11-25 spec
already carries in serverInfo. Before this they were reachable only by
constructing Server.Info by hand.

Additive and non-breaking: the three new parameters default to nil and
sit between title: and instructions:, so existing call sites are
unaffected. Client.init already forwarded the same three to Client.Info,
so this closes an asymmetry rather than opening one.

No adaptation; merged as authored.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018zgQXRkSfYjvzQ9PW2Gg9c
ianegordon added a commit to ianegordon/swift-sdk that referenced this pull request Sep 12, 2026
Expose server metadata in the Server initializer. Moves the entry out of
the candidates table into the manifest, corrects the investigate count to
five, and pins the usage example to the tag cut from this commit.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018zgQXRkSfYjvzQ9PW2Gg9c
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.

1 participant