Add Streamable HTTP transport, bearer auth, and Docker deployment

- Enable stateless_http + json_response on FastMCP for scalable HTTP
  serving without sticky sessions (Traefik-friendly)
- Add MCP_TRANSPORT env var to select stdio (default) vs streamable-http
- Add bearer token auth middleware (MCP_AUTH_TOKEN) with /health bypass
- Add Dockerfile (Python 3.12-slim + uv) and docker-compose.yml with
  Traefik v2/v3 labels, ACME TLS, and health check routing
- Add .env.example with multi-instance config for mini/tn-sb/tn-mr2/p-mba
- Add uvicorn + starlette as runtime dependencies

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
PiersandClaude Opus 4.6 committed 2026-02-16 19:31:45 +11:00
1 parent 5ca58735eb
commit 39d6994738
5 files changed
+4 -28

No files matched your search

-2
View File
@@ -24,8 +24,6 @@ def _run_http() -> None:
token = os.environ.get("MCP_AUTH_TOKEN", "").strip()
if token:
# Wrap the ASGI app with bearer-token middleware and run via
# uvicorn directly so we keep the session-manager lifespan intact.
import uvicorn
from syncthing_mcp.auth import BearerAuthMiddleware