Coverage for app/main.py: 100%
11 statements
« prev ^ index » next coverage.py v7.8.2, created at 2025-06-16 01:07 +0000
« prev ^ index » next coverage.py v7.8.2, created at 2025-06-16 01:07 +0000
1from fastapi import FastAPI
2from fastapi.middleware.wsgi import WSGIMiddleware
3from fastapi_mcp import FastApiMCP
5from app.endpoint.router import main_router
7app = FastAPI()
8app.include_router(main_router)
10mcp = FastApiMCP(
11 app,
12 name="My API MCP",
13 description="My API description",
14 # base_url="http://localhost:8000",
15)
17# Mount the MCP server directly to your FastAPI app
18mcp.mount()
20# mount gradio ui
21from gradio import mount_gradio_app
22from app.ui.ui import interface
23app = mount_gradio_app(app, interface, path="/gradio")