huggingface / huggingface/context-course

[Unit 2] FastMCP renaming

Open Beginner friendly
#23 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
90
Forks
20
PR merge metrics
No merged PRs in 30d

Description

Hi! In **Unit 2**, all MCP server development snippets use `FastMCP`.

In version **2.0** of the `modelcontextprotocol` Python SDK, `FastMCP` was renamed to `MCPServer`. The examples should be updated to use the new class and import path.

**Before — v1:**

```python
from mcp.server.fastmcp import FastMCP

mcp = FastMCP("Demo")
```

**After — v2:**

```python
from mcp.server.mcpserver import MCPServer, Context

mcp = MCPServer("Demo")
```

Reference: [Migration guide from v1 to v2](https://py.sdk.modelcontextprotocol.io/migration/?h=FastMCP#mcpserver-formerly-fastmcp)

Contributor guide

No contributing guide indexed for this repository

Research direction

Locate the Unit 2 code snippets that import and instantiate FastMCP, then review the linked v1-to-v2 migration guide for the required names and import path. Update the examples to use MCPServer and Context as shown, and confirm that Unit 2 no longer contains the outdated FastMCP usage.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.