[Bug]: `mcp` and `cryptography` are imported but not declared: the `fw` MCP server never starts and Watchtower `/settings/` answers 500

Abierto Apto para principiantes
#110 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
68/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python
Área
backend, devops

Línea de trabajo

Empieza por revisar web/requirements.txt y los pasos de instalación del servidor MCP para ver qué entorno debería declarar cada dependencia. Después, revisa las importaciones en agents/mcp/framework_mcp_server.py y web/secrets_store.py, además del uso de /settings/ en web/blueprints/settings.py. Se considerará terminado cuando un entorno limpio creado siguiendo los pasos de instalación documentados pueda iniciar el servidor MCP y cargar /settings/ sin estos errores de paquetes faltantes.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

area:watchtower bug severity:medium status:received triaged
Bug Description

Two Python packages are imported by shipped code but appear in no requirements file and in no install step:

  1. mcp: agents/mcp/framework_mcp_server.py:37-39 (from mcp.server.lowlevel import Server, ...). Without it the server exits at once with ModuleNotFoundError: No module named 'mcp', and Claude Code reports the fw MCP server as "connection closed" at every session start.
  2. cryptography: web/secrets_store.py:19 (from cryptography.fernet import Fernet, InvalidToken), imported by web/blueprints/settings.py (lines 324, 410, 447). Without it /settings/ answers 500 (ModuleNotFoundError: No module named 'cryptography' in the Watchtower log). It is also the one remaining failure in the fw doctor Watchtower smoke test after the #97 fix ("1/54").

web/requirements.txt lists flask, flask-socketio, pyyaml, ... but neither package, and bin/watchtower.sh checks only for flask_socketio (line 219) before starting. An environment built from web/requirements.txt therefore has both failures.

Steps to Reproduce
  1. Create a virtualenv and pip install -r web/requirements.txt only.
  2. python3 .agentic-framework/agents/mcp/framework_mcp_server.py: ModuleNotFoundError: No module named 'mcp'.
  3. Start Watchtower with that Python and open /settings/: HTTP 500, No module named 'cryptography' in the log.
  4. grep -rniE '^(mcp|cryptography)' web/requirements.txt: nothing.
Expected Behavior

Both packages are declared (in web/requirements.txt, or in a requirements file the installer uses for the MCP server), or the code degrades cleanly: the MCP server prints an install hint, and /settings/ shows "secrets store unavailable: install cryptography" instead of a 500. Optionally, fw doctor reports a missing import as it does for flask_socketio.

Actual Behavior

The fw MCP server is "connection closed" in every session, and /settings/ answers 500, with nothing in the install or in fw doctor pointing at the missing packages.

fw doctor output

AI Agent

Claude Code

Operating System

Linux

Additional Context

Seen on 1.8.14 and 1.8.15 in a real project (Linux, Claude Code, a dedicated Python 3.12 for Watchtower), and in a throwaway container on 1.8.15. web/requirements.txt is unchanged on bleeding-edge (0c3b8b6c3). Filed as one issue because both are the same gap (an import with no declared dependency); happy to split it.

Lenguaje dominante
Shell
Estrellas
16
Forks
6
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de DimitriGeelen/agentic-engineering-framework

Todos los issues de DimitriGeelen/agentic-engineering-framework

Issues similares

Más issues de Shell/Bash

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.