You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[v2] Use the documented middleware accessor in the tracing opt-out example #3934
While integrating the SDK into mcpstat, I needed to disable the SDK's inbound server spans while preserving other middleware.
The "Turning it off" example uses mcp._lowlevel_server.middleware. This works, but MCPServer exposes the same list through the documented mcp.middleware accessor.
Could the example use mcp.middleware in both places, retaining the existing provisional API warning? This would avoid accessing the internal _lowlevel_server attribute.
Use mcp.middleware in both places in the example, retaining the existing warning about the provisional middleware API and OpenTelemetryMiddleware import.
This would be a documentation-only change. I would be happy to contribute it if the maintainers consider it useful.
Code to reproduce
SDK version
Integration: mcp 2.3.0. Documentation and accessor checked on main at 77001c9.
Activity