Skip to content

Cannot find reference 'MCPServer' in 'mcp.server.mcpserver' in Quickstart code #1970

Description

@jesuspb2

Initial Checks

Description

The Quickstart example code references MCPServer from mcp.server.mcpserver, but this class cannot be found, resulting in an import error.

Expected Behavior:
The MCPServer class should be available for import from mcp.server.mcpserver as shown in the Quickstart documentation.

Actual Behavior:
The IDE cannot locate the MCPServer class in the specified module, preventing the example from running.

Steps to Reproduce:

  1. Follow the Quickstart guide
  2. Copy the example code that imports MCPServer
  3. Attempt to run the code
  4. Observe the import error

Environment:

  • Python version: 3.13.5
  • MCP library version: 1.26.0
  • IDE: PyCharm 2025.3.2
  • OS: macOS

Example Code

from mcp.server.mcpserver import MCPServer
# Create an MCP server
mcp = MCPServer("Demo")

Python & MCP Python SDK

- Python version: 3.13.5
- MCP library version: 1.26.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions