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
Copy file name to clipboardExpand all lines: docs/migration.md
+29-5Lines changed: 29 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -116,6 +116,26 @@ result = await session.list_resources(params=PaginatedRequestParams(cursor="next
116
116
result =await session.list_tools(params=PaginatedRequestParams(cursor="next_page_token"))
117
117
```
118
118
119
+
### `FastMCP` renamed to `MCPServer`
120
+
121
+
The `FastMCP` class has been renamed to `MCPServer` to better reflect its role as the main server class in the SDK. This is a simple rename with no functional changes to the class itself.
122
+
123
+
**Before (v1):**
124
+
125
+
```python
126
+
from mcp.server.fastmcp import FastMCP
127
+
128
+
mcp = FastMCP("Demo")
129
+
```
130
+
131
+
**After (v2):**
132
+
133
+
```python
134
+
from mcp.server.mcpserver import MCPServer
135
+
136
+
mcp = MCPServer("Demo")
137
+
```
138
+
119
139
### `mount_path` parameter removed from MCPServer
120
140
121
141
The `mount_path` parameter has been removed from `MCPServer.__init__()`, `MCPServer.run()`, `MCPServer.run_sse_async()`, and `MCPServer.sse_app()`. It was also removed from the `Settings` class.
@@ -138,14 +158,14 @@ Transport-specific parameters have been moved from the `MCPServer` constructor t
0 commit comments