Rename FastMCP to MCPServer (#1951)

This commit is contained in:
Marcelo Trylesinski 2026-01-25 14:45:52 +01:00 • committed by GitHub
commit 65c614e48e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2,7 +2,7 @@ import pytest
from mcp import Client
from mcp.client.session import ClientSession
from mcp.server.fastmcp import FastMCP
from mcp.server.mcpserver import MCPServer
from mcp.shared.context import RequestContext
from mcp.types import (
CreateMessageRequestParams,
@ -16,7 +16,7 @@ from mcp.types import (
@pytest.mark.anyio
async def test_sampling_callback():
server = FastMCP("test")
server = MCPServer("test")
callback_return = CreateMessageResult(
role="assistant",
@ -60,7 +60,7 @@ async def test_sampling_callback():
@pytest.mark.anyio
async def test_create_message_backwards_compat_single_content():
"""Test backwards compatibility: create_message without tools returns single content."""
server = FastMCP("test")
server = MCPServer("test")
# Callback returns single content (text)
callback_return = CreateMessageResult(