7935b671d3
Exposes homelab topology to MCP-compatible AI clients (Claude Code, etc.) over LAN via HTTP/SSE on port 8001. - New mcp/ service: FastAPI + mcp SDK, SSE transport - Auth: X-API-Key for AI clients, X-MCP-Service-Key for backend (Docker-internal) - Resources: canvas, nodes, edges, scan/pending, scan/runs - Tools: create/update/delete nodes+edges, trigger scan, approve/hide devices - Backend deps.py: accepts JWT or MCP service key (no plain-text password) - 40 tests (auth, resources, tools) across asyncio + trio - docker-compose.yml: mcp service on port 8001 - README: MCP setup section with Claude Code/Desktop config examples
55 lines
1000 B
YAML
55 lines
1000 B
YAML
services:
|
|
backend:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.backend
|
|
restart: unless-stopped
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
# Override env_file values that differ in Docker
|
|
SQLITE_PATH: /app/data/homelab.db
|
|
CORS_ORIGINS: '["http://localhost:3000"]'
|
|
volumes:
|
|
- backend_data:/app/data
|
|
networks:
|
|
- homelable
|
|
# Required for ping-based status checks
|
|
cap_add:
|
|
- NET_RAW
|
|
|
|
mcp:
|
|
build:
|
|
context: ./mcp
|
|
dockerfile: Dockerfile.mcp
|
|
restart: unless-stopped
|
|
ports:
|
|
- "8001:8001"
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
BACKEND_URL: "http://backend:8000"
|
|
depends_on:
|
|
- backend
|
|
networks:
|
|
- homelable
|
|
|
|
frontend:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.frontend
|
|
restart: unless-stopped
|
|
ports:
|
|
- "3000:80"
|
|
depends_on:
|
|
- backend
|
|
networks:
|
|
- homelable
|
|
|
|
volumes:
|
|
backend_data:
|
|
|
|
networks:
|
|
homelable:
|
|
driver: bridge
|