Repository navigation
feat: improve MCP server modes, discoverability and secret handling - #152
Merged
Merged
Conversation
biersoeckli
force-pushed
the
feat/mcp-server-improvements
branch
from
October 30, 2026 06:56
ca9175c to
ed2666a
Compare
- Namespace MCP tools with quickstack_ prefix and use the package version. - Publish server instructions covering the search -> schema -> execute workflow. - Add AND search, relevance sorting, search limits and full-detail schema guards. - Truncate oversized tool results with narrowing hints. - Add limit/cursor pagination to list endpoints and document log limits. - Pass REST field validation errors through MCP tool errors. - Document write examples, upsert semantics and deploy polling. - Replace deprecated JSON-RPC codes and only export POST on the MCP route. - Add an MCP evaluation harness and Inspector smoke-test documentation.
biersoeckli
force-pushed
the
feat/mcp-server-improvements
branch
from
October 30, 2026 06:59
ed2666a to
4ec0e14
Compare
biersoeckli
marked this pull request as ready for review
November 8, 2026 09:02
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
Sharpens the QuickStack MCP surface for agents and adds an evaluation loop.
1.1.0, serverinstructions, search limits and relevance sorting.items,total,limit,nextCursor), defaulting to 50 items whenlimitis omitted. This breaks callers expecting a bare array; clients must readitemsand follownextCursor.saveApp/saveAgentupsert semantics, destructive side effects, anddeployApp/deployAgentpolling guidance.descriptionand the agent text inx-mcp-description. MCP prefers the override and falls back todescription; the generated OpenAPI spec keeps the override as a valid vendor extension.mcpServerEnabledflag is migrated to the newmcpServerModeparameter..meta({ secret: true }): environment variables, build arguments, registry passwords, Git tokens, SSH private keys, basic-auth passwords, webhook IDs, health-check headers, LLM admin keys and temporary sandbox access URLs/tokens. MCP responses redact those fields by default, for read and write tools. The new Send secrets in MCP responses toggle restores the full REST payload. Secret redaction applies only to MCP responses.-32002/-32001; verified the 2026-07-28 rules (-32002must not be emitted,-32020..-32099reserved) and added app codes1001/1002outside the reserved range. OnlyPOSTis exported, soGET/DELETEreturn405.scripts/mcp-eval.mjsplusdocs/mcp/evaluation.md, with scripted and LLM modes covering success rate, tool calls, errors, tokens and latency.Files:
Evidence
Before: tool names were unprefixed, every
detail: "full"call could dump every schema, and MCP responses always mirrored REST secrets.After:
Full suite:
The remaining failing suites (
git.service.unit.spec.tsand the k3sintegration suites) need a container runtime:
Could not find a working container runtime strategy. They are unrelated tothis change.
yarn tsc --noEmitstill reports only the three pre-existing errors inunrelated spec files (
actions.unit.spec.ts,format.utils.unit.spec.ts,agent-sandbox.utils.unit.spec.ts).MCP Inspector 2.12.0 against the real handler:
The scripted evaluation harness previously passed 3/3 fixture-based tasks in
mcp-eval.integration.spec.ts. The list-projects fixture still returns an array and does not reflect the current paginated REST response; its result does not validate that task against a real instance. The LLM mode was not run because this sandbox hasno live QuickStack instance or LLM credentials; the command is documented.
Merge Danger
Door: two-way.
The commit can be reverted, but the tool rename, access-mode setting and secret
redaction are consumer-visible. Existing MCP clients must update
search_operations/execute_operation/execute_read_operationto thequickstack_names.Pagination is a breaking REST API change: affected list endpoints always return an envelope, with a default limit of 50 even when
limitandcursorare omitted. Existing clients must readitemsand follownextCursorto retrieve all results. The OpenAPI document now also carriesthe additive
x-mcp-descriptionvendor extension on operations that define anMCP-specific text.
Secret redaction is on by default. Agents that need secret fields must be
explicitly enabled by an admin with Send secrets in MCP responses. Write
arguments are still sent to QuickStack even when response redaction is on, so
agents should not paste secrets into prompts that should stay private.
Blast Radius: REST and MCP clients.
Agents that relied on
detail: "full"without a search term now get acorrective error; they must search first. Read-only mode intentionally hides the
write tool and write operations from search. Write descriptions now warn about
destructive behavior explicitly, which may change how agents ask for
confirmation.