from collections.abc import AsyncIterator import pytest from asgi_lifespan import LifespanManager from fastmcp.utilities.tests import ASGIServer from personal_mcp.app import create_app @pytest.fixture async def http_server() -> AsyncIterator[ASGIServer]: app = create_app() async with LifespanManager(app): yield ASGIServer( url="http://127.0.0.1/mcp", app=app, transport_type="http", )