Include instructions in MCP inspect output (#4873)

🤖 Generated with Codex
This commit is contained in:
nate nowack 2026-08-21 19:50:27 -05:00 committed by GitHub
commit 743ddffd0a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 0 deletions

View file

@ -489,6 +489,7 @@ async def format_mcp_info(mcp: FastMCP[Any] | SDKServer) -> bytes:
"mcp": importlib.metadata.version("mcp"), # MCP protocol version
},
"serverInfo": server_info,
"instructions": client.initialize_result.instructions,
"capabilities": {}, # MCP format doesn't include capabilities at top level
"tools": tools_result.tools,
"prompts": prompts_result.prompts,

View file

@ -425,6 +425,7 @@ class TestFormatFunctions:
# Check server version in MCP format
assert data["serverInfo"]["version"] == "2.0.0"
assert data["instructions"] == "Test instructions"
# MCP format SHOULD have environment fields
assert "environment" in data