# Fix Applied: MCP SDK Version Update
## Issue
When running `uv run mcp dev calculator_server.py`, the command failed with:
```
ModuleNotFoundError: No module named 'mcp.server.mcpserver'
```
## Root Cause
The MCP SDK (v2 pre-alpha) has a different module structure than the documentation showed. The class `MCPServer` is not available in the current version. Instead, the SDK uses `FastMCP` which is the newer, simpler API.
## Solution
Updated the import statement in `calculator_server.py`:
**Before:**
```python
from mcp.server.mcpserver import MCPServer
calculator = MCPServer("Calculator")
```
**After:**
```python
from mcp.server import FastMCP
calculator = FastMCP("Calculator")
```
## Files Modified
- `calculator_server.py` - Updated import and class name
- `README.md` - Updated code example to use FastMCP
## Verification
✅ Server imports successfully
✅ Server name is correct ("Calculator")
✅ `uv run mcp dev calculator_server.py` command now works
## Testing the Fix
To verify the fix works:
```bash
# Option 1: Run directly
python calculator_server.py
# Option 2: Run with MCP Inspector (development)
uv run mcp dev calculator_server.py
# Option 3: Install to Claude Desktop
uv run mcp install calculator_server.py --name "Calculator"
```
## What is FastMCP?
`FastMCP` is the modern, simplified API for creating MCP servers. It provides:
- Simpler decorator-based syntax
- Automatic tool registration
- Built-in error handling
- Cross-platform compatibility
It's designed to be faster to develop with and includes all the necessary features for building MCP servers.
## No Other Changes Needed
- All 4 calculator tools (add, subtract, multiply, divide) work exactly the same
- The functionality is identical
- The API is compatible with MCP Inspector and Claude Desktop
---
**Status:** ✅ Fixed and verified