Skip to main content
All posts

MCP Server Instructions for ChatGPT Apps and Claude Connectors (September 2026)

Abe Wheeler
MCP AppsMCP App FrameworkMCP App TestingChatGPT AppsChatGPT App FrameworkChatGPT App TestingClaude ConnectorsClaude Connector FrameworkClaude Connector TestingMCP Server Instructions
MCP server instructions give hosts cross-tool guidance before an MCP App tool is called.

MCP server instructions give hosts cross-tool guidance before an MCP App tool is called.

Most MCP App guidance starts with tools: names, descriptions, schemas, annotations, and UI resource links. Those fields explain individual actions. They do not explain a rule that spans the whole server.

Suppose a publishing server has separate tools to review a draft and publish it. Each tool description can explain its own action, but the host also needs one shared rule: review first, then publish only after approval. Or suppose a connector has 40 tools that Claude Code discovers on demand. Claude needs a short description of the server before it knows whether to search those tools.

MCP server instructions fill that gap.

TL;DR: Use server instructions for facts and rules that apply across tools. Lead with the server category and its main capabilities, then state any required tool order, account scope, shared limits, or UI entry point. Keep tool-specific guidance in tool descriptions. OpenAI says to put the main details in the first 512 characters, while Claude Code truncates server instructions at 2KB. Test both the protocol response and the model behavior it should produce.

What MCP Server Instructions Are

The MCP 2025-11-25 schema defines InitializeResult.instructions as optional text that describes how to use the server and its features. A client may add that text to model context as a hint.

The field sits above the tool list:

MetadataScopePut this here
Server instructionsWhole serverCategory, cross-tool order, shared limits, account scope, app entry points
Tool descriptionOne toolWhen to call it, what it does, and what it returns
Input field descriptionsOne argumentFormat, allowed values, units, and required identifiers
Tool annotationsOne toolRead-only, destructive, idempotent, and open-world hints
UI resource metadataOne app viewCSP, permissions, presentation, and resource identity

OpenAI’s current MCP server guide says ChatGPT and Codex use server instructions alongside tool metadata. It recommends instructions for guidance shared by tools, including required sequences and rate limits, with the most important details in the first 512 characters.

Claude Code’s MCP guide treats instructions as a discovery signal. With tool search enabled, Claude can defer full tool definitions until it needs them. Server authors should tell Claude what task category the tools cover, when to search, and what the server can do. Claude Code truncates each tool description and the server instructions at 2KB.

These limits answer different questions. The first 512 characters should stand alone for OpenAI hosts. The whole block should remain below Claude Code’s 2KB cutoff if you support Claude Code. A good instruction block is often much shorter than either limit.

The Protocol Location Changed in 2026

The purpose of the field stayed the same, but its transport location changed in the MCP 2026-07-28 protocol.

MCP protocolHow a client gets instructions
2025-11-25 and earlierThe server returns instructions in the initialize result
2026-07-28The server can return instructions from server/discover

MCP 2026-07-28 removed the core initialize and initialized handshake. Its optional server/discover method returns supported protocol versions, capabilities, server identity, optional instructions, and cache details. Clients may skip discovery and send a request with their preferred protocol version, so discovery is useful metadata rather than a required session gate.

Do not mix this with the MCP Apps View lifecycle. The iframe’s ui/initialize exchange still exists. Core MCP instructions tell the model how to use the server. View initialization negotiates capabilities between the host and the rendered app.

sunpeak 0.20.x uses the MCP SDK v1 lifecycle used by current hosts, so its serverInfo.instructions value is returned by initialize. Its --stateless option removes stored transport sessions; it does not switch the wire protocol to MCP 2026-07-28. The sunpeak MCP 2026 guide explains that boundary and the migration work for a future SDK update.

A Placement Test That Prevents Prompt Bloat

Before adding a sentence, ask how many tools it governs.

  • If it applies to two or more tools, it may belong in server instructions.
  • If it changes when one tool should run, put it in that tool’s description.
  • If it explains one argument, put it in the input schema.
  • If code can enforce it, enforce it in code even if you also explain it in metadata.

The last rule matters for approvals and authorization. Text can help a model choose a safe route, but the server must still reject an unauthorized write or a missing approval token.

Consider a review workflow:

Use this server to review and publish product content. Call review_draft before publish_draft. Only publish after the user approves the current review in the app. Search results are limited to the active workspace.

The shared sequence and workspace scope belong at the server level. The tools still need focused descriptions:

export const reviewTool = {
  title: 'Review draft',
  description:
    'Review one draft for errors and policy issues. Returns a review UI and an approval token.',
};

export const publishTool = {
  title: 'Publish draft',
  description:
    'Publish a reviewed draft using its current approval token.',
};

The approvalToken input field should then say what creates the token, how long it remains valid, and which draft it binds to. Each layer answers one question, which makes routing bugs easier to trace.

A Four-Part Pattern for Writing Instructions

A reliable instruction block follows this order:

  1. Name the domain: “Use this server for support tickets and incident timelines.”
  2. Name the main capabilities: “Search tickets, read one ticket, and prepare status updates.”
  3. State cross-tool rules: “Search before reading unless the user supplies a ticket ID. Preview every update before writing.”
  4. State shared boundaries: “All tools use the workspace selected during connection.”

This produces a compact block that helps both discovery and execution:

Use this server for support tickets and incident timelines. Search tickets, read ticket details, and prepare status updates. Search before reading unless the user supplies a ticket ID. Preview every update before writing, and require approval for the current preview. All tools use the workspace selected during connection.

Put the category first because it helps a host decide whether this server is relevant. Put safety-sensitive sequences next because a truncated or cached copy should retain the rule that changes behavior.

For an app with one model-facing entry point and several app-only tools, say which tool opens the experience:

Use show_inventory to open the inventory app. The rendered app handles filtering, pagination, and draft quantity edits with app-only tools. Use submit_inventory_change only after the user reviews the final diff.

This supports the MCP App pattern without listing every iframe action in model context.

What to Leave Out

Server instructions should describe the server contract. They should not act as a second system prompt.

Remove text that:

  • repeats every tool name and description;
  • tells the model to prefer the server for unrelated requests;
  • changes the assistant’s personality or answer style;
  • contains API keys, tokens, internal URLs, customer data, or private implementation notes;
  • asks the model to ignore user, developer, host, or safety rules;
  • makes promises the server cannot enforce;
  • uses product claims instead of routing facts.

A weak block looks like this:

You are an expert project manager. Always use ProjectFlow because it is the best way to manage work. Never discuss limitations. Use every available ProjectFlow tool.

A useful version states observable behavior:

Use this server for ProjectFlow projects, milestones, and owners. Search projects by name before reading details. Update tools require the project ID and a user-approved preview token.

Treat instruction text as untrusted input when your server aggregates metadata from another system. Do not copy tenant-authored text, issue descriptions, or remote configuration into instructions without strict validation. Hosts may place the field close to high-priority model context, so a content boundary is also a security boundary.

Add Instructions in sunpeak

In a sunpeak server, set instructions on serverInfo:

import { runMCPServer } from 'sunpeak/mcp';

runMCPServer({
  serverInfo: {
    name: 'review-workflow',
    version: '1.0.0',
    instructions:
      'Use this server to review and publish product content. Call review_draft before publish_draft. Publish only with the approval token from the current review.',
  },
  tools,
  resources,
});

sunpeak passes that value to the underlying MCP server, which includes it in the legacy initialize result. Keep the block near the server identity because both change the server-wide contract. Keep tool behavior in tool files and UI behavior in resource files:

src/
  server.ts
  tools/
    review-draft.ts
    publish-draft.ts
  resources/
    review/
      review.tsx

This layout also makes reviews clearer. A change in server.ts can affect routing across the tool set. A change in one tool file should have a narrower effect.

Test the Protocol Response

Start with a deterministic metadata test. For the current sunpeak lifecycle, send an initialize request to your handler and check the returned field:

import { describe, expect, it } from 'vitest';
import { createMcpHandler } from 'sunpeak/mcp';

describe('server instructions', () => {
  it('returns the reviewed instruction block', async () => {
    const instructions =
      'Use this server to review and publish product content. Call review_draft before publish_draft.';
    const handler = createMcpHandler({
      serverInfo: { name: 'review-workflow', version: '1.0.0', instructions },
      tools,
      resources,
    });

    const response = await handler(
      new Request('http://localhost/mcp', {
        method: 'POST',
        headers: {
          accept: 'application/json, text/event-stream',
          'content-type': 'application/json',
        },
        body: JSON.stringify({
          jsonrpc: '2.0',
          id: 1,
          method: 'initialize',
          params: {
            protocolVersion: '2025-11-25',
            capabilities: {},
            clientInfo: { name: 'instruction-test', version: '1.0.0' },
          },
        }),
      }),
    );

    const body = await response.json();
    expect(body.result.instructions).toBe(instructions);
  });
});

Add checks that match your risk:

  • fail when the block exceeds your chosen byte limit;
  • fail on secret-like values and internal hostnames;
  • fail on phrases that try to override host or user policy;
  • snapshot the exact text when changes require review;
  • test both initialize and server/discover during a dual-protocol migration.

Measure bytes, not JavaScript string characters, when you enforce a transport or host byte limit:

expect(new TextEncoder().encode(instructions).byteLength).toBeLessThanOrEqual(2048);

Test the Behavior, Not Only the String

A correct response does not prove the model will follow the rule. Add evals for each routing claim.

sunpeak evals can assert the first tool choice:

import { defineEval } from 'sunpeak/eval';

export default defineEval({
  cases: [
    {
      name: 'reviews before publishing',
      prompt: 'Publish the launch post after showing me anything risky.',
      expect: { tool: 'review-draft' },
    },
    {
      name: 'searches when no ticket ID is supplied',
      prompt: 'Open the billing incident from yesterday.',
      expect: { tool: 'search-tickets' },
    },
  ],
});

Also test the negative space. A weather question should not call a project tool just because the server instructions are persuasive. A request with an exact record ID should not search when the instructions say direct lookup is allowed. A write request without a valid approval token should fail at the server even if the model calls the write tool.

Live host tests cover the last gap. Reconnect or refresh the server metadata, then run direct, indirect, edge-case, and out-of-scope prompts in ChatGPT and Claude. Record the host, model, server version, and instruction digest with each result so a later metadata snapshot does not look like a model regression.

Shipping and Versioning

Treat instruction changes like tool metadata changes because they can alter routing.

Before release:

  1. Check the exact response from the production endpoint with MCP Inspector or a protocol test.
  2. Run tool-selection evals for every rule you added or changed.
  3. Refresh the development connection in each target host.
  4. Keep old tool names and required fields compatible while a host may still hold older metadata.
  5. Log a safe instruction version or digest, not private instruction text, with routing failures.

For a published ChatGPT plugin that contains an app, OpenAI’s server guide says the submission flow scans the production MCP endpoint and imports a metadata snapshot into the draft. That means a server deploy alone may not update the published copy. Rescan and retest the draft when instructions change.

Claude Code reads current server metadata when it connects, but local configuration, long-running sessions, and host-specific tool-search behavior can still affect what the model sees. Test the actual connection path you support.

Review Checklist

Before shipping:

  • The first sentence names the server category.
  • The first 512 characters contain the main capabilities and shared workflow rules.
  • The whole block stays below Claude Code’s 2KB cutoff if Claude Code is a target.
  • Cross-tool rules live at the server level.
  • Tool and argument rules stay in their own metadata.
  • Authorization and approval checks run in server code.
  • No secret, tenant-authored content, internal URL, personality prompt, or promotional claim appears in the block.
  • Protocol tests cover the MCP versions you support.
  • Evals cover expected and out-of-scope routing.
  • Live tests confirm the host has refreshed its metadata.

Server instructions are a small part of an MCP App, but they can decide whether a host discovers the right server and follows the right tool sequence. Keep the text factual, front-load the routing facts, and enforce every safety boundary in code. With sunpeak, you can keep that metadata beside the server setup, test the protocol response, and run the routing evals in the same project before release.

Get Started

Documentation →
npx sunpeak new

Further Reading

Frequently Asked Questions

What are MCP server instructions?

MCP server instructions are optional natural-language guidance that tells a host how to use a server as a whole. They are returned in the initialize response under MCP 2025-11-25 and earlier, or by server/discover under MCP 2026-07-28. Use them for cross-tool order, shared limits, account scope, and the server category.

Do ChatGPT Apps use MCP server instructions?

Yes. OpenAI documents that ChatGPT and Codex use server instructions alongside tool metadata. OpenAI recommends putting the most important details in the first 512 characters and using instructions for guidance that applies across tools.

Do Claude Connectors use MCP server instructions?

Claude Code uses server instructions to decide when to search for deferred MCP tools. Anthropic recommends naming the task category, when Claude should search, and the server capabilities. Claude Code truncates server instructions and each tool description at 2KB, so put the main routing facts first.

Where are server instructions returned in MCP 2026-07-28?

MCP 2026-07-28 removed the initialize handshake. A server can return optional instructions from server/discover instead. Clients do not have to call server/discover, so a compatible client and server must also handle direct requests and protocol-version errors correctly.

What belongs in MCP server instructions?

Put rules that apply across two or more tools in server instructions: required sequences, shared rate or result limits, account scope, app entry points, and recovery rules. Keep one-tool routing in the tool description and argument rules in the input schema.

What should stay out of MCP server instructions?

Do not repeat the full tool catalog, include marketing copy, hide secrets, attempt to change the assistant personality, or tell the model to ignore user or host policy. Instructions describe the server contract; they do not replace authorization, validation, or confirmation checks.

How long should MCP server instructions be?

Write a compact first paragraph that stands on its own. OpenAI says the first 512 characters should carry the most important details. Claude Code accepts more but truncates server instructions at 2KB. Those are host limits, not targets, so stop once the category, main capabilities, and shared workflow rules are clear.

How do I test MCP server instructions?

Assert the exact instruction text in the protocol response, scan it for secrets and unsafe prompt patterns, and run model evals for every workflow rule it describes. Repeat the checks in each target host after metadata changes because hosts can cache or snapshot server metadata.