Skip to content

Let one ClickStack instance carry the MCP instructions for a multi-environment agent - #8

Draft
mfroembgen wants to merge 1 commit into
fork-sync/app-2.45.0-rebasefrom
fork-sync/app-2.45.0-mcp-instructions
Draft

mfroembgen wants to merge 1 commit into
fork-sync/app-2.45.0-rebasefrom
fork-sync/app-2.45.0-mcp-instructions

Conversation

@mfroembgen

Copy link
Copy Markdown
Owner

An agent that connects one ClickStack MCP server per environment gets the same 1.6 KB tool-selection policy once per environment in every session. With DISABLE_MCP_INSTRUCTIONS=true, an instance sends none, so one instance can carry the policy for all of them.

Summary

 serverInstructions(context)
+  if DISABLE_MCP_INSTRUCTIONS: return undefined   # McpServer sends no instructions
   PromQL enabled ? base + PromQL : base

Stacked on #7 (2.45.0): 2.44.0 is already published and the image workflow never overwrites a version, so this patch ships with 2.45.0. It lands with the force-push of #7's stack, then this branch's commit on top.

Evidence

  • Before: an MCP client created with createTestClient reads 1,560 characters of instructions.
    After: with DISABLE_MCP_INSTRUCTIONS=true, it reads none.
  • vitest run src/mcp: 29 files, 578 tests pass; tsrs --noEmit and ESLint (0 errors) pass. Main runs on ai/release-2.45.0-mcp-instructions.

Merge Danger

Door: two-way

Opt-in; unset, nothing changes.

Blast Radius: opt-in

An agent that connects one ClickStack MCP server per environment receives
the same 1.6 KB tool-selection policy from each of them in every session.
With DISABLE_MCP_INSTRUCTIONS=true the API's MCP server sends none, so one
instance can carry the policy for all of them.
@mfroembgen
mfroembgen marked this pull request as draft November 18, 2026 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant