feat(mcp): add FastMCP server with 14 tools for LLM agent access

- Add backend/innercontext/mcp_server.py with tools covering products,
  inventory, routines, skin snapshots, medications, lab results, and
  grooming schedule
- Mount MCP app at /mcp in main.py using combine_lifespans
- Fix test isolation: patch app.router.lifespan_context in conftest to
  avoid StreamableHTTPSessionManager single-run limitation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Piotr Oleszczyk 2026-02-28 17:59:11 +01:00
parent 4954d4f449
commit ac829171d9
5 changed files with 1101 additions and 2 deletions

View file

@ -6,6 +6,7 @@ readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"fastapi>=0.132.0",
"fastmcp>=2.0",
"google-genai>=1.65.0",
"psycopg>=3.3.3",
"python-dotenv>=1.2.1",