Overview
There's a TODO comment in the codebase indicating that client and server information should be extracted from the initialize request but this functionality is not yet implemented. This information is valuable for analytics and debugging.
Current State
In src/mcpcat/modules/overrides/mcp_server.py, the wrapped_initialize_handler has a TODO comment indicating this feature is missing. The initialize request contains valuable metadata about both the client and server that should be captured.
Requirements
When an MCP server receives an initialize request, we should extract and store:
Client Information:
- Client name and version
- Client capabilities
- Protocol version
Server Information:
- Server name and version
- Server capabilities
- Supported features
Why This Matters
- Helps track which clients are using MCP servers
- Enables version compatibility monitoring
- Provides insights into feature adoption
- Assists in debugging client-server issues
- Improves analytics dashboard usefulness
Acceptance Criteria
Getting Started
- Look at the InitializeRequest and InitializeResult types in MCP SDK
- Find the wrapped_initialize_handler in mcp_server.py
- Review how session_info is currently managed
- Check how other fields are extracted and stored
- Follow the existing event structure patterns
Notes
- Ensure backward compatibility with servers that don't provide all fields
- Consider privacy implications of storing client information
- Make sure the implementation doesn't break existing functionality
Overview
There's a TODO comment in the codebase indicating that client and server information should be extracted from the initialize request but this functionality is not yet implemented. This information is valuable for analytics and debugging.
Current State
In
src/mcpcat/modules/overrides/mcp_server.py, the wrapped_initialize_handler has a TODO comment indicating this feature is missing. The initialize request contains valuable metadata about both the client and server that should be captured.Requirements
When an MCP server receives an initialize request, we should extract and store:
Client Information:
Server Information:
Why This Matters
Acceptance Criteria
Getting Started
Notes