Conversation
docs/migration.md
Outdated
| from mcp.server.mcpserver import MCPServer | ||
|
|
||
| # Transport params in constructor | ||
| mcp = FastMCP("Demo", json_response=True, stateless_http=True) | ||
| mcp = MCPServer("Demo", json_response=True, stateless_http=True) | ||
| mcp.run(transport="streamable-http") | ||
|
|
||
| # Or for SSE | ||
| mcp = FastMCP("Server", host="0.0.0.0", port=9000, sse_path="/events") | ||
| mcp = MCPServer("Server", host="0.0.0.0", port=9000, sse_path="/events") |
There was a problem hiding this comment.
| from mcp.server.mcpserver import MCPServer | |
| # Transport params in constructor | |
| mcp = FastMCP("Demo", json_response=True, stateless_http=True) | |
| mcp = MCPServer("Demo", json_response=True, stateless_http=True) | |
| mcp.run(transport="streamable-http") | |
| # Or for SSE | |
| mcp = FastMCP("Server", host="0.0.0.0", port=9000, sse_path="/events") | |
| mcp = MCPServer("Server", host="0.0.0.0", port=9000, sse_path="/events") | |
| from mcp.server.fastmcp import FastMCP | |
| # Transport params in constructor | |
| mcp = FastMCP("Demo", json_response=True, stateless_http=True) | |
| mcp.run(transport="streamable-http") | |
| # Or for SSE | |
| mcp = FastMCP("Server", host="0.0.0.0", port=9000, sse_path="/events") |
| @@ -1,8 +0,0 @@ | |||
| """FastMCP - A more ergonomic interface for MCP servers.""" | |||
There was a problem hiding this comment.
Guessing we don't want a backwards compatible shim since we'll be making breaking changes anyway?
docs/migration.md
Outdated
| ```python | ||
| # Before (v1) | ||
| mcp = FastMCP("App", json_response=True) | ||
| mcp = MCPServer("App", json_response=True) |
There was a problem hiding this comment.
| mcp = MCPServer("App", json_response=True) | |
| mcp = FastMCP("App", json_response=True) |
| ``` | ||
|
|
||
| ### `mount_path` parameter removed from FastMCP | ||
| ### `mount_path` parameter removed from MCPServer |
There was a problem hiding this comment.
add a section for the rename
| """Convert a result to a sequence of content objects. | ||
|
|
||
| Note: This conversion logic comes from previous versions of FastMCP and is being | ||
| Note: This conversion logic comes from previous versions of MCPServer and is being |
There was a problem hiding this comment.
| Note: This conversion logic comes from previous versions of MCPServer and is being | |
| Note: This conversion logic comes from previous versions of MCPServer (previously called FastMCP) and is being |
very minor nit, probably easy to dismiss since we should remove this anyway
| ### Server | ||
|
|
||
| The FastMCP server is your core interface to the MCP protocol. It handles connection management, protocol compliance, and message routing: | ||
| The MCPServer server is your core interface to the MCP protocol. It handles connection management, protocol compliance, and message routing: |
There was a problem hiding this comment.
"The MCPServer Server" is gonna get confusing.. didn't think about that before
| mcp = FastMCP( | ||
| title="FastMCP Server", | ||
| mcp = MCPServer( | ||
| title="MCPServer Server", |
There was a problem hiding this comment.
"MCPServer Server" not super nice :/
|
|
||
| model_config = SettingsConfigDict( | ||
| env_prefix="FASTMCP_", | ||
| env_prefix="MCP_", |
There was a problem hiding this comment.
worth calling this out in migration docs
There was a problem hiding this comment.
I think I'll drop this Settings before the end of the refactor.
| """Create a FastMCP server for testing.""" | ||
| server = FastMCP("test") | ||
| def mcpserver_server() -> MCPServer: | ||
| """Create a MCPServer server for testing.""" |
There was a problem hiding this comment.
| """Create a MCPServer server for testing.""" | |
| """Create an MCPServer server for testing.""" |
Should be "an" because MCPServer starts with an "em" sound.
tests/client/test_client.py
Outdated
| """Create a FastMCP server for testing.""" | ||
| server = FastMCP("test") | ||
| def app() -> MCPServer: | ||
| """Create a MCPServer server for testing.""" |
There was a problem hiding this comment.
| """Create a MCPServer server for testing.""" | |
| """Create an MCPServer server for testing.""" |
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
Code reviewIssues FoundMissing PR Description (CLAUDE.md violation) The PR body is empty, which violates the CLAUDE.md requirement for pull requests:
This PR performs a significant breaking change (renaming
While the migration guide in Code Review Summary:
|
|
Rude. |
No description provided.