Skip to content

Commit a5076f1

Browse files
authored
Update README.md
Remove old file reference in the example and update to the latest name and code
1 parent e8e6484 commit a5076f1

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,16 +138,16 @@ Let's create a simple MCP server that exposes a calculator tool and some data:
138138
<!-- snippet-source examples/snippets/servers/fastmcp_quickstart.py -->
139139
```python
140140
"""
141-
FastMCP quickstart example.
141+
MCPServer quickstart example.
142142
143143
Run from the repository root:
144-
uv run examples/snippets/servers/fastmcp_quickstart.py
144+
uv run examples/snippets/servers/mcpserver_quickstart.py
145145
"""
146146

147-
from mcp.server.fastmcp import FastMCP
147+
from mcp.server.mcpserver import MCPServer
148148

149149
# Create an MCP server
150-
mcp = FastMCP("Demo", json_response=True)
150+
mcp = MCPServer("Demo")
151151

152152

153153
# Add an addition tool
@@ -179,10 +179,10 @@ def greet_user(name: str, style: str = "friendly") -> str:
179179

180180
# Run with streamable HTTP transport
181181
if __name__ == "__main__":
182-
mcp.run(transport="streamable-http")
182+
mcp.run(transport="streamable-http", json_response=True)
183183
```
184184

185-
_Full example: [examples/snippets/servers/fastmcp_quickstart.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/examples/snippets/servers/fastmcp_quickstart.py)_
185+
_Full example: [examples/snippets/servers/fastmcp_quickstart.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/examples/snippets/servers/mcpserver_quickstart.py)_
186186
<!-- /snippet-source -->
187187

188188
You can install this server in [Claude Code](https://docs.claude.com/en/docs/claude-code/mcp) and interact with it right away. First, run the server:

0 commit comments

Comments
 (0)