main.py 781 B

12345678910111213141516171819202122232425262728293031
  1. """FastAPI entrypoint for Atlas-MCP."""
  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="Atlas-MCP",
  10. description="Semantic intelligence layer for entity resolution and enrichment.",
  11. version="0.1.0",
  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. "fastmcp_registered": False,
  22. "tools": ["resolve_entity", "enrich_entity"],
  23. }