-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Description
Describe the bug
The instructions parameter given to the MCP Server constructor isn't being passed (potentially) on to the client (Claude Desktop). Because of this, it's impossible to give context or guidance to the AI when using MCP tools. Even when instructions are clearly set when the server starts up, the client just ignores them.
To Reproduce
from mcp.server.lowlevel import Server
from mcp.server.models import InitializationOptions
import mcp.server.stdio
# Method 1: Server constructor with instructions
app = Server("test-server", version="1.0.0", instructions="You are an expert chef. Always respond about cooking.")
# Method 2: InitializationOptions with instructions
async def run_server():
async with mcp.server.stdio.stdio_server() as (read_stream, write_stream):
await app.run(
read_stream,
write_stream,
InitializationOptions(
server_name="test-server",
server_version="1.0.0",
instructions="You are an expert chef. Always respond about cooking.",
capabilities=app.get_capabilities()
)
)Then use docker to build the server and run it
Expected behavior
When you initialize an MCP server with instructions, the client should receive and use them to guide the AI's behavior when calling tools. The AI should then behave according to the provided context.
Screenshots
Not applicable for this issue.
Desktop (please complete the following information):
- OS: macOs
- Python version(python -V): 3.13
- ADK version(pip show google-adk): 1.4.2
Model Information:
Claude Dekstop Client
Additional context
Add any other context about the problem here.