feat: expose MCP server-wide instructions on ServerConfig#60
Merged
Conversation
Adds an `instructions?: string` field to `ServerConfig` that's passed through to the MCP SDK and surfaced in the `initialize` response. Hosts may inject it into the model's system prompt to teach cross-tool relationships and constraints that don't fit in per-tool descriptions. Wired up in both the dev server (`createAppServer`) and the production server (`createProductionMcpServer`). Tests verify the field shows up in the initialize result when set and is absent otherwise. Documented in the server-entry and production-server pages, the MCP overview, the template's server.ts, the create-sunpeak-app skill, and CLAUDE.md.
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
instructions?: stringfield toServerConfig. The MCP SDK already supports this as aServerOptionsfield that's sent in theinitializeresponse — sunpeak just wasn't surfacing it. Hosts (ChatGPT, Claude) may inject the string into the model's system prompt to teach cross-tool relationships, workflow patterns, and constraints that don't fit in per-tool descriptions.createAppServer) and the production server (createProductionMcpServer);toInternalConfigalready forwardsserverInfowhole.docs/app-framework/tools/server-entry.mdx(addedinstructionsplus the previously undocumentedtitle/description/websiteUrl/iconsfields),docs/app-framework/tools/production-server.mdx,docs/mcp-apps/mcp/overview.mdx, the templatesrc/server.ts, the create-sunpeak-app skill, andCLAUDE.md.Test plan
pnpm --filter sunpeak typecheckpnpm --filter sunpeak lintpnpm --filter sunpeak test -- --run(369 passing, including 2 new tests assertinginstructionsappears in the initialize result when set and is absent when unset)pnpm --filter sunpeak buildgenerate-examples --skip-install(full validate pipeline blocked by unpublished 0.20.17, unrelated to this change)