Repository navigation
Are "server instructions" actually supported? #364
Pre-submission Checklist
Question Category
Your QuestionI see that there is a way to define "instructions" for the server. builder.Services.AddMcpServer(serverOptions =>
{
serverOptions.ServerInstructions = "Use tool A but not tool B";
})I can see the instructions in the response to the initialize request (using MCP Inspector), but my instructions are ignored by clients (Claude Desktop and VSCode Copilot's agent). So do you know if this feature is actually supported by MCP clients? |
Replies: 1 comment
|
The SDK is sending them correctly. |
The SDK is sending them correctly.
McpServerOptions.ServerInstructionsgoes out in theinitializeresult asinstructions, and the C# client exposes it asMcpClient.ServerInstructions. The host has to put that into the model itself. This SDK doesn't do that automatically. If Inspector shows the text and Claude Desktop or VS Code ignore it, that's the host not applying the hint. In a C# host, addclient.ServerInstructionsto the system prompt if you want the model to follow it.