Ahora el skill detecta si ya hay archivos .ipynb en el repo o carpeta notebooks. Si existen, simplemente inicia Jupyter via MCP sin reinicializar el proyecto. Se garantiza que siempre use MCP para la integración con Claude. Se agrega Glob a las herramientas permitidas para la detección. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2.9 KiB
name, description, argument-hint, disable-model-invocation, user-invocable, allowed-tools
| name | description | argument-hint | disable-model-invocation | user-invocable | allowed-tools | |
|---|---|---|---|---|---|---|
| init-jupyter | Inicializa o inicia Jupyter Lab via MCP. Detecta notebooks existentes automáticamente. |
|
true | true | Bash, Read, Write, Edit, Glob |
Inicializar/Iniciar Proyecto Jupyter via MCP
Este skill gestiona entornos Jupyter Lab integrados con Claude via MCP. Detecta automáticamente si ya existe un proyecto configurado.
Flujo de decisión
1. Detectar notebooks existentes
Buscar archivos .ipynb en:
- Raíz del proyecto
- Carpeta
notebooks/ - Cualquier subcarpeta
find [ruta] -name "*.ipynb" -type f 2>/dev/null | head -5
2. Si HAY notebooks existentes → Iniciar directamente
2a. Verificar que MCP está configurado
- Comprobar si existe
.claude/settings.local.jsoncon configuración de jupyter - Si no existe, crearlo (ver paso 6 del flujo de inicialización)
2b. Verificar que jupyter-mcp-server está instalado
which jupyter-mcp-server || uv tool install jupyter-mcp-server
2c. Iniciar Jupyter via MCP
source .venv/bin/activate 2>/dev/null || true
jupyter lab --no-browser --NotebookApp.token='' --NotebookApp.password='' --NotebookApp.disable_check_xsrf=True
2d. Informar al usuario que Jupyter está corriendo y puede usar las herramientas MCP de Jupyter desde Claude.
3. Si NO hay notebooks → Inicializar proyecto completo
Seguir estos pasos:
3a. Validar ubicación
- Si se proporciona
$1, usar esa ruta - Si no, usar el directorio actual
3b. Inicializar proyecto con uv (si no existe pyproject.toml)
cd [ruta] && uv init
3c. Crear entorno virtual
uv venv
3d. Instalar dependencias
uv add jupyter jupyter-collaboration
3e. Instalar jupyter-mcp-server
uv tool install jupyter-mcp-server
3f. Configurar MCP para Claude
Crear o actualizar .claude/settings.local.json:
{
"mcpServers": {
"jupyter": {
"command": "jupyter-mcp-server",
"args": []
}
}
}
3g. Crear carpeta notebooks (opcional)
mkdir -p notebooks
3h. Iniciar Jupyter via MCP
source .venv/bin/activate
jupyter lab --no-browser --NotebookApp.token='' --NotebookApp.password='' --NotebookApp.disable_check_xsrf=True
Ejemplos de uso
Iniciar/inicializar en directorio actual:
/init-jupyter
Iniciar/inicializar en ruta específica:
/init-jupyter ~/proyectos/mi-analisis
Notas importantes
- Siempre usa MCP: Jupyter se ejecuta siempre de forma que Claude pueda interactuar via MCP
- Si detecta notebooks existentes, NO reinicializa el proyecto, solo inicia Jupyter
- Si el proyecto ya tiene
pyproject.toml, no ejecutauv init - La configuración MCP se guarda en
.claude/settings.local.jsondel proyecto - El servidor MCP permite a Claude crear, editar y ejecutar celdas de notebooks