Advertise the Kernel server name on initialize - #131
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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
Metadata-only change to MCP initialize
serverInfo; no auth, tool, or transport behavior changes.Overview
MCP
initializenow reports the Kernel server identity instead ofmcp-handler's default (mcp-typescript server on vercel).The route passes
serverInfo: { name, version }intocreateMcpHandler, withnameandversionimported fromserver.jsonso the MCP handshake matches the registry manifest and they stay in sync.No changes to tools, auth, or transport—only what clients and analytics see for server name/version on initialize.
Reviewed by Cursor Bugbot for commit 37fc687. Bugbot is set up for automated code reviews on this repo. Configure here.