- 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>
33 lines
1.0 KiB
YAML
33 lines
1.0 KiB
YAML
---
|
|
# Syncthing MCP — Streamable HTTP deployment behind Traefik
|
|
#
|
|
# Deploy on tn-sb (or any Docker host with Traefik already running).
|
|
# Copy .env.example to .env and fill in API keys before starting.
|
|
|
|
services:
|
|
syncthing-mcp:
|
|
build: .
|
|
container_name: syncthing-mcp
|
|
restart: unless-stopped
|
|
env_file: .env
|
|
environment:
|
|
MCP_TRANSPORT: streamable-http
|
|
MCP_HOST: "0.0.0.0"
|
|
MCP_PORT: "8000"
|
|
expose:
|
|
- "8000"
|
|
networks:
|
|
- traefik
|
|
labels:
|
|
traefik.enable: "true"
|
|
traefik.http.routers.syncthing-mcp.rule: Host(`syncthing-mcp.${DOMAIN:?set DOMAIN in .env}`)
|
|
traefik.http.routers.syncthing-mcp.entrypoints: websecure
|
|
traefik.http.routers.syncthing-mcp.tls.certresolver: letsencrypt
|
|
traefik.http.services.syncthing-mcp.loadbalancer.server.port: "8000"
|
|
traefik.http.services.syncthing-mcp.loadbalancer.healthcheck.path: /health
|
|
traefik.http.services.syncthing-mcp.loadbalancer.healthcheck.interval: 30s
|
|
|
|
networks:
|
|
traefik:
|
|
external: true
|