Skip to content

feat: expose MCP server-wide instructions on ServerConfig#60

Merged
abewheel merged 1 commit intomainfrom
abewheel/mcp-instructions-field
May 6, 2026
Merged

feat: expose MCP server-wide instructions on ServerConfig#60
abewheel merged 1 commit intomainfrom
abewheel/mcp-instructions-field

Conversation

@abewheel
Copy link
Copy Markdown
Contributor

@abewheel abewheel commented May 6, 2026

Summary

  • Adds an instructions?: string field to ServerConfig. The MCP SDK already supports this as a ServerOptions field that's sent in the initialize response — 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.
  • Wired up in both the dev server (createAppServer) and the production server (createProductionMcpServer); toInternalConfig already forwards serverInfo whole.
  • Documentation updated across docs/app-framework/tools/server-entry.mdx (added instructions plus the previously undocumented title/description/websiteUrl/icons fields), docs/app-framework/tools/production-server.mdx, docs/mcp-apps/mcp/overview.mdx, the template src/server.ts, the create-sunpeak-app skill, and CLAUDE.md.

Test plan

  • pnpm --filter sunpeak typecheck
  • pnpm --filter sunpeak lint
  • pnpm --filter sunpeak test -- --run (369 passing, including 2 new tests asserting instructions appears in the initialize result when set and is absent when unset)
  • pnpm --filter sunpeak build
  • generate-examples --skip-install (full validate pipeline blocked by unpublished 0.20.17, unrelated to this change)

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.
@abewheel abewheel merged commit 7d41c07 into main May 6, 2026
3 checks passed
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