feat(server): allow appending deployment-specific MCP instructions#203
Open
daltoniam wants to merge 1 commit into
Open
feat(server): allow appending deployment-specific MCP instructions#203daltoniam wants to merge 1 commit into
daltoniam wants to merge 1 commit into
Conversation
The initialize response tells connecting clients how to use the gateway, but the guidance was fixed. Hosted deployments need to add notes that only apply to some tenants — for example that an organization has private resource tunnels and how to target them. Add an option to append extra text to the standard instructions so those deployments can surface capabilities that vary per tenant, without changing what the open-source default sends. 💘 Generated with Crush Assisted-by: Crush:claude-opus-4-8
acmacalister
approved these changes
Jul 10, 2026
acmacalister
left a comment
Collaborator
There was a problem hiding this comment.
All CI checks passed (build, test, lint, security). Clean diff — follows existing Option pattern, extracts baseInstructions cleanly, and the in-memory transport test verifies the initialize handshake. LGTM.
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
The MCP
initializeresponse tells connecting clients how to use the gateway (search before execute, session context, pinning, etc.). That guidance was fixed, so a deployment had no way to add notes that only apply to some tenants — for example that a particular organization has private-resource tunnels and how to target a specific one.What changed
WithExtraInstructions(text)server option that appends deployment-specific guidance to the standard instructions.Tests
Added a test that drives the initialize handshake over an in-memory transport and asserts the base instructions are always present and that supplied extra text is appended only when the option is used.
Context
Enables a hosted deployment to tell assistants, per organization, that private tunnels exist and how to reach them — the client-facing half of making multi-tunnel querying discoverable.
💘 Generated with Crush