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
### Extra fields no longer allowed on top-level MCP types
388
-
389
-
MCP protocol types no longer accept arbitrary extra fields at the top level. This matches the MCP specification which only allows extra fields within `_meta` objects, not on the types themselves.
390
-
391
-
```python
392
-
# This will now raise a validation error
393
-
from mcp.types import CallToolRequestParams
394
-
395
-
params = CallToolRequestParams(
396
-
name="my_tool",
397
-
arguments={},
398
-
unknown_field="value", # ValidationError: extra fields not permitted
399
-
)
400
-
401
-
# Extra fields are still allowed in _meta
402
-
params = CallToolRequestParams(
403
-
name="my_tool",
404
-
arguments={},
405
-
_meta={"progressToken": "tok", "customField": "value"}, # OK
406
-
)
407
-
```
408
-
409
381
### Lowlevel `Server`: decorator-based handlers replaced with `RequestHandler`/`NotificationHandler`
410
382
411
383
The lowlevel `Server` class no longer uses decorator methods for handler registration. Instead, handlers are `RequestHandler` and `NotificationHandler` objects passed to the constructor.
@@ -568,6 +540,34 @@ server = Server(
568
540
server.experimental.enable_tasks(task_store)
569
541
```
570
542
543
+
## Deprecations
544
+
545
+
<!-- Add deprecations below -->
546
+
547
+
## Bug Fixes
548
+
549
+
### Extra fields no longer allowed on top-level MCP types
550
+
551
+
MCP protocol types no longer accept arbitrary extra fields at the top level. This matches the MCP specification which only allows extra fields within `_meta` objects, not on the types themselves.
552
+
553
+
```python
554
+
# This will now raise a validation error
555
+
from mcp.types import CallToolRequestParams
556
+
557
+
params = CallToolRequestParams(
558
+
name="my_tool",
559
+
arguments={},
560
+
unknown_field="value", # ValidationError: extra fields not permitted
561
+
)
562
+
563
+
# Extra fields are still allowed in _meta
564
+
params = CallToolRequestParams(
565
+
name="my_tool",
566
+
arguments={},
567
+
_meta={"progressToken": "tok", "customField": "value"}, # OK
568
+
)
569
+
```
570
+
571
571
## New Features
572
572
573
573
### `streamable_http_app()` available on lowlevel Server
0 commit comments