Skip to content

uvicorn got eagerly imported via sse-starlette #1770

Description

@CNSeniorious000

Initial Checks

Description

I noticed that you intend to lazy-import uvicorn because it's only used for HTTP/SSE transports. However, I found that it's still being imported immediately, as sse-starlette imports it eagerly, and sse-starlette is imported here:

https://github.com/search?q=repo%3Amodelcontextprotocol%2Fpython-sdk+sse_starlette+language%3APython&type=code

Example Code

import sys, mcp

assert "uvicorn" in sys.modules

Python & MCP Python SDK

1.23.3

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions