Advertise the Kernel server name on initialize - #131
Open
masnwilliams wants to merge 1 commit into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
The MCP server was identifying itself to every client as
mcp-typescript server on vercel—mcp-handler's defaultserverInfo, which we never overrode.server.jsonalready declares the server ascom.onkernel/kernel-mcp-server, so the registry entry and the runtime handshake disagreed.This passes
serverInfothrough tocreateMcpHandler, sourced fromserver.jsonso the two can't drift apart again.Clients now see:
serverInfo.nameis the programmatic identifier (per spec, clients prefer an optionaltitlefor display and fall back toname);mcp-handler'sServerOptionstype only acceptsnameandversion, sotitleis out of scope here.Why it matters beyond cosmetics
serverInfo.namereturned byinitialize.Verification
Ran the real route locally and probed
POST /mcp:initializereturnsserverInfo: { name: "com.onkernel/kernel-mcp-server", version: "1.0.0" }.$mcp_initializeand$mcp_tools_listevents carry$mcp_server_name = com.onkernel/kernel-mcp-serverand$mcp_server_version = 1.0.0, grouped in one session with client name and version intact.tsc --noEmitandprettier --checkpass. No behavior change to tools, auth, or transport.Note
Low Risk
Single configuration pass-through on handler creation with no changes to auth, tools, or request handling.
Overview
MCP handshake identity now matches the registry manifest:
createMcpHandleris given{ serverInfo: { name, version } }imported fromserver.json, so clients getcom.onkernel/kernel-mcp-server/1.0.0oninitializeinstead ofmcp-handler's generic default.This keeps registry consumers, analytics attribution (
$mcp_server_name/ version), and the runtime handshake aligned without duplicating those fields elsewhere. Auth, tools, and transport behavior are unchanged.Reviewed by Cursor Bugbot for commit 3f2458c. Bugbot is set up for automated code reviews on this repo. Configure here.