Skip to content

uvicon server configured should be able to get extra settings from FastMcp constructor extra args. #1106

Closed
@sahilkamboj334

Description

@sahilkamboj334

Description

Currently FastMcp runs uvicorn app with single worker and it does not have any option to provide workers param with higher value. There is no option to give extra settings to uvicorn server. This is same for sse and streamable http .

async def run_sse_async(self, mount_path: str | None = None) -> None:
    """Run the server using SSE transport."""
    import uvicorn

    starlette_app = self.sse_app(mount_path)

    config = uvicorn.Config(
        starlette_app,
        host=self.settings.host,
        port=self.settings.port,
        log_level=self.settings.log_level.lower(),
    )
    server = uvicorn.Server(config)
    await server.serve()

@Kludex you are fastapi and uvicorn expert. could you please help with this ?

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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy