Skip to main content
Glama
Professional Python MCP Server

Professional Python MCP Server

by bash20cu
README.md
# Professional MCP Repository (Python & Next.js)

Este repositorio contiene una implementación profesional de **Model Context Protocol (MCP)** diseñada para asistir en el desarrollo de aplicaciones Fullstack (Python y Next.js).

## Características

- **MCP Server (`server.py`)**: Implementado con `FastMCP`.
  - `read_code`: Lectura segura de archivos (.py, .ts, .tsx, etc).
  - `write_code`: Escritura y actualización de código.
  - `run_terminal`: Ejecución de comandos con captura de logs.
  - `list_models`: Descubrimiento de modelos Gemini disponibles.
  - `notify_dev`: Notificaciones nativas en Linux (KDE).
- **Utilidades**:
  - `check_models.py`: Script independiente para verificar tu API Key y modelos.
  - **MCP Agent (`agent.py`)**: Cliente inteligente usando **Gemini 3 Flash** (por defecto).
  - Selección interactiva de modelos al inicio.
  - Narración de pasos antes de ejecutar acciones.
  - Conector `stdio` para comunicación robusta con el servidor.

## Requisitos

- Python 3.10+
- `uv` (Gestor de paquetes y entornos)
- Gemini API Key

## Instalación

1.  **Clonar el repositorio**:
    ```bash
    git clone <repository-url>
    cd mcp_server
    ```

2.  **Configurar el entorno**:
    ```bash
    uv venv --python 3.10
    source .venv/bin/activate
    ```

3.  **Instalar dependencias**:
    ```bash
    uv pip install -e .
    ```

4.  **Configurar variables de entorno**:
    Crea un archivo `.env` basado en `.env.example`:
    ```bash
    cp .env.example .env
    # Edita .env y añade tu GEMINI_API_KEY
    ```

## Uso

### Iniciar el Agente
El agente iniciará automáticamente el servidor MCP en segundo plano.

```bash
uv run agent.py
```

### Ejemplo de Interacción
- "Léeme el archivo server.py y explica qué hace cada herramienta."
- "Crea un componente de Next.js llamado `UserProfile.tsx` que reciba un nombre y un email."
- "Ejecuta `ls -la` y dime qué archivos hay en la raíz."
- "Envíame una notificación diciendo que el despliegue ha terminado."

## Notas de Desarrollo

- El servidor está configurado para ejecutarse mediante `uv run server.py`, lo que garantiza que las dependencias estén siempre actualizadas.
- Si simplemente pulsas **Enter**, usará por defecto `gemini-3-flash-preview` (rápido y eficiente).
- Se ha incluido un `.gitignore` profesional para evitar subir secretos o entornos virtuales.

---
Desarrollado con ❤️ para agilizar flujos de trabajo Fullstack.

TDQS

B3.4/5.0

Scored across 5 tools

Disambiguation5/5

Each tool has a clearly distinct purpose with no overlap: list_models_with_limits handles model information, notify_dev manages notifications, read_code and write_code handle file I/O (one for reading, one for writing), and run_terminal executes shell commands. The descriptions reinforce these distinct roles, making misselection unlikely.

Naming Consistency4/5

The tool names follow a consistent verb_noun pattern (e.g., list_models_with_limits, read_code, write_code, run_terminal), which is predictable and readable. The only minor deviation is notify_dev, which uses 'notify' as the verb instead of a more standard action like 'send_notification', but it still fits the overall pattern well.

Tool Count4/5

With 5 tools, the count is reasonable for a server focused on Python development utilities, covering model listing, notifications, file operations, and terminal execution. It feels slightly thin but well-scoped, as each tool serves a clear purpose without unnecessary bloat.

Completeness3/5

The server covers basic development tasks like file I/O, command execution, and notifications, but there are notable gaps for a 'Professional Python' scope, such as missing tools for code analysis (e.g., linting, testing), dependency management, or environment handling. The surface is functional but incomplete for advanced workflows.