main.py 729 B

1234567891011121314151617181920212223242526272829303132
  1. """HTTP/SSE entrypoint for the atlas2-mcp server."""
  2. from __future__ import annotations
  3. from datetime import datetime, timezone
  4. from typing import Dict
  5. from fastapi import FastAPI
  6. from .mcp_server import mcp
  7. START_TIME = datetime.now(timezone.utc)
  8. app = FastAPI(
  9. title="Atlas2-MCP",
  10. description="Atlas2 semantic resolution scaffold (single resolve tool).",
  11. version="0.0.1",
  12. )
  13. app.mount("/mcp", mcp.sse_app())
  14. @app.get("/health", tags=["liveness"])
  15. async def health() -> Dict[str, object]:
  16. now = datetime.now(timezone.utc)
  17. uptime_seconds = (now - START_TIME).total_seconds()
  18. return {
  19. "status": "ok",
  20. "uptime_seconds": round(uptime_seconds, 2),
  21. "tools": ["resolve"],
  22. }