Skip to content

feat(mcp): append server instructions to context#32490

Open
Arcadi4 wants to merge 1 commit into
anomalyco:devfrom
Arcadi4:feat/mcp-instructions
Open

feat(mcp): append server instructions to context#32490
Arcadi4 wants to merge 1 commit into
anomalyco:devfrom
Arcadi4:feat/mcp-instructions

Conversation

@Arcadi4

@Arcadi4 Arcadi4 commented Jun 16, 2026

Copy link
Copy Markdown

Issue for this PR

Refs #28567

Close #30084 #7373

Part of the larger MCP revision.

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Append MCP server InitializeResult.instructions to the session system prompt.

Each connected server with instructions contributes a block shaped like:

Instructions from: MCP server <server>
These instructions apply to MCP tools whose names start with `<server>_`, and to prompts/resources from this MCP server.

<server_instructions>

Since tool definitions are separate from the system prompt, this form explicitly links the instruction to the specific set of tools provided by that MCP server.

How did you verify your code works?

Verified locally with focused MCP lifecycle coverage and a prompt-loop request check that observes the instruction block in model context.

Screenshots / recordings

N/A

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

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.

feat: inject MCP server instructions into system prompt

1 participant