diff --git a/src/mcp/types.py b/src/mcp/types.py index 2c27f83..4e1628c 100644 --- a/src/mcp/types.py +++ b/src/mcp/types.py @@ -285,6 +285,8 @@ class InitializeResult(Result): """The version of the Model Context Protocol that the server wants to use.""" capabilities: ServerCapabilities serverInfo: Implementation + instructions: str | None = None + """Instructions describing how to use the server and its features.""" class InitializedNotification(Notification): diff --git a/tests/client/test_session.py b/tests/client/test_session.py index d15d16f..7de0473 100644 --- a/tests/client/test_session.py +++ b/tests/client/test_session.py @@ -51,6 +51,7 @@ async def test_client_session_initialize(): prompts=None, ), serverInfo=Implementation(name="mock-server", version="0.1.0"), + instructions="The server instructions." ) ) @@ -92,6 +93,7 @@ async def test_client_session_initialize(): assert result.protocolVersion == LATEST_PROTOCOL_VERSION assert isinstance(result.capabilities, ServerCapabilities) assert result.serverInfo == Implementation(name="mock-server", version="0.1.0") + assert result.instructions == "The server instructions." # Check that the client sent the initialized notification assert initialized_notification