| 1234567891011121314151617181920212223242526272829303132 |
- """HTTP/SSE entrypoint for the atlas2-mcp server."""
- from __future__ import annotations
- from datetime import datetime, timezone
- from typing import Dict
- from fastapi import FastAPI
- from .mcp_server import mcp
- START_TIME = datetime.now(timezone.utc)
- app = FastAPI(
- title="Atlas2-MCP",
- description="Atlas2 semantic resolution scaffold (single resolve tool).",
- version="0.0.1",
- )
- app.mount("/mcp", mcp.sse_app())
- @app.get("/health", tags=["liveness"])
- async def health() -> Dict[str, object]:
- now = datetime.now(timezone.utc)
- uptime_seconds = (now - START_TIME).total_seconds()
- return {
- "status": "ok",
- "uptime_seconds": round(uptime_seconds, 2),
- "tools": ["resolve"],
- }
|