Repository navigation
Release 0.3.1: store MCP names in saved connections - #15
Merged
Merged
Conversation
A saved MCP connection carried only the release UID and endpoint, because the release detail that mcp-add reads has no name or repository. Hosts labelled listings with two live backend requests per listing, and a backend restart during a refresh left a connection named "Unnamed MCP". - mcp-add reads the release directory projection (search by UID) for the release's name and repository branch, the branch for its repository name, and stores them with the connection as name, display_name and code_repository_branch_uid; a label that cannot be read is left out and never makes a working MCP unavailable - mcp-list returns the stored labels without a backend request; a record saved by an earlier version is completed by the first listing that can read its labels, under the connection lock, and a held lock or failed write still returns the labelled listing - mcp-tools and mcp-call results carry the saved labels on their connection; discovery rows pass the directory's name and code_repository_branch_uid through; malformed stored labels are dropped on read - tests/mcp.test.cjs covers storage, local listing, backfill, denied and mismatched lookups, malformed labels, the held lock and discovery rows Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
Why
A saved MCP connection stored only the release UID and endpoint: the release detail that
mcp-addreads carries no name or repository. Every host listing therefore needed two live backend requests to label a connection, and a backend restart during a refresh showed Unnamed MCP.What changes
mcp-addresolves the release's name and repository branch from the release directory (/api/v1/resource-releases/?search=<uid>), the repository name from the branch, and stores them with the connection asname,display_nameandcode_repository_branch_uid. A label that cannot be read is left out; it never makes a working MCP unavailable.mcp-listreturns the stored labels without a backend request. A record saved by an earlier version is completed by the first listing that can read its labels (persisted under the connection lock; a held lock or failed write still returns the labelled listing).mcp-toolsandmcp-callresults carry the saved labels on their connection. Discovery rows pass the directory'snameandcode_repository_branch_uidthrough. Malformed stored labels are dropped on read.Verification
npm run typecheck,npm test(112 tests, one new covering storage, local listing, backfill, denied and mismatched lookups, malformed labels, the held lock and discovery rows),node scripts/check-release.cjs,npm packandnpm run verify:packagepass locally on Node 22.🤖 Generated with Claude Code