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
Emit deprecation warnings as a visible MCPDeprecationWarning
The SEP-2577 method deprecations now warn via `mcp.MCPDeprecationWarning`, a
`UserWarning` subclass, instead of the built-in `DeprecationWarning`. Python
silences `DeprecationWarning` by default outside `__main__`, so most users never
see it; inheriting from `UserWarning` makes the deprecation visible by default.
Pass `category=MCPDeprecationWarning` to every `@deprecated` decorator, export
the class from `mcp`, and document how to silence it.
- Logging: `ServerSession.send_log_message()`, `ClientSession.set_logging_level()`, `Client.set_logging_level()`, and the `MCPServer``Context` helpers `log()`, `debug()`, `info()`, `warning()`, `error()`
1228
1228
1229
+
The runtime warning is emitted as `mcp.MCPDeprecationWarning`, which subclasses `UserWarning` (not `DeprecationWarning`) so it is visible by default. To silence it, filter that category:
No migration is required during the deprecation window. New code should avoid building on these features, since they may be removed in a future spec version.
0 commit comments