You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Let operators set the instructions an MCP endpoint returns #7279
An MCP server can return instructions in its initialize result, and in its server/discover result under the 2026-07-28 revision. Clients such as Claude Code, Claude Desktop and LibreChat add those instructions to the model's context while the server is connected.
An operator who runs a server through ToolHive often needs to add guidance of their own: a policy the model should follow when it uses the server, or usage notes for a third-party server they cannot change. ToolHive has no way to do this. MCPToolConfig rewrites tool names and descriptions only, and mutating webhooks transform requests, not responses. Today the operator has to rebuild or patch the server image.
Proposal
Add an optional instructions field with the same shape to MCPServer, MCPRemoteProxy and VirtualMCPServer:
spec:
instructions:
mode: append # replace | append | prepend; default appendvalue: | Text the model should see while this server is connected.
replace: clients receive value.
append: clients receive the server's instructions, a blank line, then value.
prepend: clients receive value, a blank line, then the server's instructions.
When the server returns no instructions, every mode returns value.
The proxy runner applies the field as a middleware, the way it applies tool filters and overrides. The middleware sets the instructions of successful initialize and server/discover results and passes every other response through unchanged. It reads JSON and event-stream bodies, and covers the legacy SSE transport, where the result arrives on the stream a GET opened. vMCP applies the same middleware to its own endpoint, on top of whatever instructions it produces. thv run gets --instructions-file and --instructions-mode, next to --tools-override.
Activity