feat: adopt MCP 2025-11-25 serverInfo metadata (description, websiteUrl)#47
feat: adopt MCP 2025-11-25 serverInfo metadata (description, websiteUrl)#47evilmachina wants to merge 3 commits into
Conversation
…rl, icon) Add the human-readable description, websiteUrl, and PinMeTo brand icon (embedded 48x48 PNG data URI) to serverInfo's Implementation metadata, introduced in MCP spec revision 2025-11-25. Clients receive richer context and branding during initialization. Per the investigation in #45: - Per-tool icons (SEP-973) deferred: registerTool in @modelcontextprotocol/sdk 1.29.0 does not forward an icons field to tools/list. - Sampling tools/toolChoice: not needed for the review-insights summarizer. Refs #45 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthrough
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
ℹ️ Review info
⚙️ Run configuration
Configuration used: Central YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: 9780ff65-5e37-4c10-864c-bc85f07a7908
📒 Files selected for processing (4)
.changeset/server-info-2025-11-25.mdsrc/icons.tssrc/mcp_server.tstests/mcp_server.test.ts
| // Human-readable description (MCP 2025-11-25 Implementation.description): gives | ||
| // clients context during initialization and aligns with the registry server.json format. | ||
| description: | ||
| 'Read-only access to the PinMeTo location management platform: locations, ' + | ||
| 'plus Google/Facebook/Apple insights, ratings, reviews, and keywords.', | ||
| websiteUrl: 'https://www.pinmeto.com', | ||
| icons: PINMETO_ICONS, |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Gate 2025-11-25-only serverInfo fields by negotiated protocol version.
src/mcp_server.ts:208-214 adds description, websiteUrl, and icons to a shared serverInfo object, but src/mcp_server.ts:227-235 returns that same object even when the client negotiated 2025-06-18. Since this PR explicitly treats those keys as 2025-11-25 metadata, older clients can now receive a future-schema initialize payload and may reject it if they validate serverInfo strictly. Build serverInfo after selecting protocolVersion, or strip these keys unless the negotiated version is 2025-11-25+.
No current Claude client renders serverInfo.icons: Claude Desktop sources extension branding from the mcpb manifest (which already references img/logo_icon.png), and Claude.ai web does not render serverInfo icons for remote servers. Embedding a data URI only added payload to every initialize response, so remove it along with the now-unused src/icons.ts module. The registry-relevant Implementation.description and websiteUrl fields remain. Refs #45 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Harden the serverInfo test against worker-level fallout and CI flakiness: - Restore process.stdout.write in a finally block so a failure can't leave it patched and cascade into other tests in the worker. - Wait on a response latch (resolved when the id=0 reply lands) instead of a fixed 100ms sleep, which was racey under slower CI. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Fixes Applied SuccessfullyFixed 1 file based on 2 CodeRabbit feedback item(s). Files modified:
Both items were stability hardening on the new
Commit: The latest autofix changes are on the |
Summary
Addresses #45 — the relevant
Implementationmetadata additions from MCP spec revision2025-11-25, scoped to what's supported and useful for this stdio, read-only server.What changed
serverInfo.description— a one-line, human-readable description of the server's capabilities (item Refactor configs and http requests #2 in the issue).serverInfo.websiteUrl—https://www.pinmeto.com, aligning with the registryserver.jsonformat.Investigation outcomes (the other items)
serverInfo.icons— evaluated and dropped. No current Claude client renders it: Claude Desktop sources extension branding from themcpbmanifest (which already referencesimg/logo_icon.pngviamanifest.js), and Claude.ai web doesn't renderserverInfoicons for remote servers (anthropics/claude-ai-mcp#152). Embedding a data URI only added payload to every initialize response.McpServer.registerToolAPI in@modelcontextprotocol/sdk1.29.0 (latest) does not forward aniconsfield totools/list(verified empirically); surfacing them would require overriding the list handler via SDK internals.pinmeto_get_google_review_insights) feeds the model a complete batch of review text and asks for a JSON summary back; it does its own fetching/sampling/batching before callingcreateMessage.Test plan
tests/mcp_server.test.tsasserts the initialize result carriesdescriptionandwebsiteUrl.npm run buildclean.Refs #45
🤖 Generated with Claude Code