Ajout du Dockerfile pour containeriser l'application MCP - Création du Dockerfile avec l'image Python 3.11 slim - Installation du SDK FastMCP - Copie du code source dans le conteneur - Exposition du port 6666 - Configuration du point d'entrée Ajout du fichier opencode.json pour la configuration MCP Ajout du script Python src/mon_mcp.py avec les outils echo, shout et additionner Ajout du fichier test.py pour les tests de l'API
17 lines
236 B
Docker
17 lines
236 B
Docker
# Dockerfile
|
|
FROM python:3.11-slim
|
|
|
|
WORKDIR /app
|
|
|
|
# Installer le SDK MCP Python
|
|
RUN pip install --no-cache-dir fastmcp
|
|
|
|
# Copier le serveur
|
|
COPY src/* .
|
|
|
|
# Exposer le port
|
|
EXPOSE 6666
|
|
|
|
# Lancer le serveur
|
|
CMD ["python", "./mon_mcp.py"]
|