refactor(api): remove MCP server integration and docs references
This commit is contained in:
parent
5dd8242985
commit
1d8a8eafb8
9 changed files with 9 additions and 1195 deletions
|
|
@ -1,5 +1,5 @@
|
|||
from contextlib import asynccontextmanager
|
||||
from typing import Any, AsyncIterator, Mapping
|
||||
from typing import AsyncIterator
|
||||
|
||||
from dotenv import load_dotenv
|
||||
|
||||
|
|
@ -7,8 +7,6 @@ load_dotenv() # load .env before db.py reads DATABASE_URL
|
|||
|
||||
from fastapi import FastAPI # noqa: E402
|
||||
from fastapi.middleware.cors import CORSMiddleware # noqa: E402
|
||||
from fastmcp.utilities.lifespan import combine_lifespans # noqa: E402
|
||||
from starlette.applications import Starlette # noqa: E402
|
||||
|
||||
from db import create_db_and_tables # noqa: E402
|
||||
from innercontext.api import ( # noqa: E402
|
||||
|
|
@ -19,20 +17,17 @@ from innercontext.api import ( # noqa: E402
|
|||
routines,
|
||||
skincare,
|
||||
)
|
||||
from innercontext.mcp_server import mcp # noqa: E402
|
||||
|
||||
mcp_app = mcp.http_app(path="/mcp")
|
||||
|
||||
|
||||
@asynccontextmanager
|
||||
async def lifespan(app: Starlette) -> AsyncIterator[Mapping[str, Any] | None]:
|
||||
async def lifespan(app: FastAPI) -> AsyncIterator[None]:
|
||||
create_db_and_tables()
|
||||
yield
|
||||
|
||||
|
||||
app = FastAPI(
|
||||
title="innercontext API",
|
||||
lifespan=combine_lifespans(lifespan, mcp_app.lifespan),
|
||||
lifespan=lifespan,
|
||||
redirect_slashes=False,
|
||||
)
|
||||
|
||||
|
|
@ -51,9 +46,6 @@ app.include_router(skincare.router, prefix="/skincare", tags=["skincare"])
|
|||
app.include_router(ai_logs.router, prefix="/ai-logs", tags=["ai-logs"])
|
||||
|
||||
|
||||
app.mount("/mcp", mcp_app)
|
||||
|
||||
|
||||
@app.get("/health-check")
|
||||
def health_check():
|
||||
return {"status": "ok"}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue