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
436
-
437
-
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.
438
-
439
-
```python
440
-
# This will now raise a validation error
441
-
from mcp.types import CallToolRequestParams
442
-
443
-
params = CallToolRequestParams(
444
-
name="my_tool",
445
-
arguments={},
446
-
unknown_field="value", # ValidationError: extra fields not permitted
447
-
)
448
-
449
-
# Extra fields are still allowed in _meta
450
-
params = CallToolRequestParams(
451
-
name="my_tool",
452
-
arguments={},
453
-
_meta={"progressToken": "tok", "customField": "value"}, # OK
454
-
)
455
-
```
456
-
457
429
### Lowlevel `Server`: decorator-based handlers replaced with `RequestHandler`/`NotificationHandler`
458
430
459
431
The lowlevel `Server` class no longer uses decorator methods for handler registration. Instead, handlers are `RequestHandler` and `NotificationHandler` objects passed to the constructor.
@@ -616,6 +588,34 @@ server = Server(
616
588
server.experimental.enable_tasks(task_store)
617
589
```
618
590
591
+
## Deprecations
592
+
593
+
<!-- Add deprecations below -->
594
+
595
+
## Bug Fixes
596
+
597
+
### Extra fields no longer allowed on top-level MCP types
598
+
599
+
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.
600
+
601
+
```python
602
+
# This will now raise a validation error
603
+
from mcp.types import CallToolRequestParams
604
+
605
+
params = CallToolRequestParams(
606
+
name="my_tool",
607
+
arguments={},
608
+
unknown_field="value", # ValidationError: extra fields not permitted
609
+
)
610
+
611
+
# Extra fields are still allowed in _meta
612
+
params = CallToolRequestParams(
613
+
name="my_tool",
614
+
arguments={},
615
+
_meta={"progressToken": "tok", "customField": "value"}, # OK
616
+
)
617
+
```
618
+
619
619
## New Features
620
620
621
621
### `streamable_http_app()` available on lowlevel Server
0 commit comments