mirror of
https://github.com/MaksTinyWorkshop/_Assistant_Lead_Tech
synced 2026-06-28 01:53:40 +02:00
leadtech-bmad-mcp: serveur MCP central HTTP via sidecar Tailscale
Transforme le MCP leadtech-bmad de stdio local en service HTTP central conteneurisé, accessible depuis tout périphérique du tailnet. - server.main(): transport piloté par LEADTECH_MCP_TRANSPORT (stdio par défaut → aucune régression locale; streamable-http pour le central). Host/port via LEADTECH_MCP_HOST/_PORT. - _build_transport_security(): whitelist d'hôtes via LEADTECH_MCP_ALLOWED_HOSTS pour lever la protection anti-DNS-rebinding (HTTP 421) derrière le sidecar. - Dockerfile (python:3.11-slim, build index au démarrage, lance le serveur HTTP). - docker-compose.yml: service mcp (réseau interne, aucun port publié) + sidecar tailscale (tailscale serve TLS MagicDNS). user 1000:1000 pour l'écriture dans le bind-mont. ALLOW_WRITE=1 sur l'instance centrale. - tailscale/serve.json, .env.example, mcp.config.http.example.json. - .gitignore: ignore le .env (secrets), garde .env.example. - docs/design_nuc_tailscale.md: statut passé à IMPLÉMENTÉ + URL réelle. Validé: handshake MCP initialize HTTPS via tailnet → 200, 7 tools listables, écriture 95_a_capitaliser.md confirmée, 79 tests verts.
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
# leadtech-bmad-mcp — image du serveur MCP central (transport streamable-http)
|
||||
#
|
||||
# Le code Python est copié dans l'image. La base de connaissance Lead_tech
|
||||
# (LEADTECH_ROOT) n'est PAS copiée : elle est bind-montée au runtime depuis
|
||||
# /srv/helpers/_Assistant_Lead_Tech sur le NUC (source de vérité = clone Git).
|
||||
|
||||
FROM python:3.11-slim
|
||||
|
||||
ENV PYTHONUNBUFFERED=1 \
|
||||
PIP_NO_CACHE_DIR=1 \
|
||||
PIP_DISABLE_PIP_VERSION_CHECK=1
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Dépendances d'abord (cache de build) puis le code.
|
||||
COPY pyproject.toml README.md ./
|
||||
COPY src ./src
|
||||
COPY config ./config
|
||||
|
||||
RUN pip install -e .
|
||||
|
||||
# Transport HTTP par défaut dans l'image ; surchargé par compose si besoin.
|
||||
ENV LEADTECH_MCP_TRANSPORT=streamable-http \
|
||||
LEADTECH_MCP_HOST=0.0.0.0 \
|
||||
LEADTECH_MCP_PORT=8080 \
|
||||
LEADTECH_ROOT=/leadtech
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
# L'index est (re)construit au démarrage car il dépend du contenu bind-monté,
|
||||
# pas du code de l'image. Puis on lance le serveur MCP.
|
||||
CMD ["sh", "-c", "leadtech-bmad-build-index && exec leadtech-bmad-mcp"]
|
||||
Reference in New Issue
Block a user