
filesystem-mcp
Asistente local inteligente para operaciones del sistema de archivos usando Llama-3. Proyecto didáctico pensado para entender y aprender a implementar LLMs locales + MCP.
3 years
Works with Finder
0
Github Watches
0
Github Forks
0
Github Stars
⚠️ Nota importante: Este proyecto no está pensado para uso en producción. Es un ejercicio didáctico que desarrollé con fines de aprendizaje, para experimentar con modelos LLM locales y explorar la tecnica de Model‑Context‑Protocol (MCP).
Toda la implementación está contenida en un solo archivo Python autocontenido, para facilitar su lectura, comprensión y modificación por parte de quienes están aprendiendo sobre la integración de LLMs locales con MCP y herramientas personalizadas.
FileSystem MCP
FileSystem MCP es un asistente inteligente de línea de comandos para gestionar operaciones del sistema de archivos mediante lenguaje natural, aprovechando el modelo Meta Llama‑3 8B Instruct con capacidades de function calling.
📝 Descripción
Este proyecto implementa un sistema Model‑Context‑Protocol (MCP) que permite:
- Crear, copiar, mover, renombrar y eliminar archivos y directorios.
- Listar contenidos de carpetas y obtener información detallada de archivos.
- Interactuar de forma conversacional, sin tener que recordar comandos del sistema.
- Ejecutar un modelo Llama‑3 localmente, sin depender de servicios en la nube.
🚀 Características destacadas
- Interfaz conversacional en español.
- Sistema de permisos configurable (READ_ONLY, BASIC, STANDARD, ADVANCED, ADMIN).
- Confirmaciones inteligentes para evitar operaciones destructivas.
- UI enriquecida con Rich para formatos de texto, tablas y progreso.
- Function calling optimizado con Llama‑3 Instruct Q4_K_M (8B parámetros).
🖥️ Requisitos del sistema
- Hardware mínimo: GPU con 8 GB de VRAM (recomendado NVIDIA).
- CPU: moderado (multinúcleo recomendado).
- RAM: 16 GB o más.
- Espacio en disco: ~5 GB para el modelo.
- Sistema operativo: Windows, macOS o Linux.
- Python 3.8 o superior.
📦 Instalación
- Clona o descarga este repositorio:
git clone https://github.com/Haslick/filesystem-mcp.git cd filesystem-mcp
- Asegúrate de tener Python 3.8+ instalado.
- Ejecuta el script; instalará dependencias automáticamente la primera vez:
python filesystem_mcp.py
- Se instalarán
llama-cpp-python
yrich
si faltan. - Se descargará (o solicitará ruta) el modelo de ~5 GB.
- Se instalarán
⚙️ Uso
Al ejecutar el script, se te guiará para configurar:
- Directorio base de operaciones.
- Nivel de permisos.
- Confirmaciones de seguridad.
Después de la configuración inicial, ingresa tus peticiones en lenguaje natural:
Tú: Mueve los archivos informe.pdf y datos.csv a la carpeta Backup
Y el asistente procesará la operación.
🎛️ Argumentos de línea de comandos
Puedes pasar opciones al invocar filesystem_mcp.py
:
Argumento | Descripción |
---|---|
--base-dir <ruta> |
Directorio base donde se realizarán las operaciones |
--model <ruta> |
Ruta al archivo GGUF del modelo Llama‑3 |
--permission-level |
Nivel de permisos inicial (READ_ONLY, BASIC, …) |
--confirm-all |
Forzar confirmación para todas las operaciones |
Ejemplo:
python filesystem_mcp.py --base-dir ~/MisProyectos --permission-level ADMIN
🛠️ Comandos especiales
Durante la sesión, usa comandos precedidos por /
:
Comando | Descripción |
---|---|
/ayuda |
Muestra la ayuda de comandos |
/dir [ruta] |
Ver o cambiar el directorio base |
/permisos [NIVEL] |
Consultar o cambiar nivel de permisos |
/herramientas |
Lista las operaciones permitidas |
/estado |
Muestra el estado actual (configuración) |
/limpiar |
Limpia la pantalla |
/salir |
Finaliza la sesión |
📚 Ejemplos de uso
-
Crear directorio:
Tú: Crea una carpeta llamada Proyectos Asistente: ¡Listo! He creado la carpeta 'Proyectos'.
-
Listar contenido:
Tú: ¿Qué hay en la carpeta actual? Asistente: Archivos: - informe.txt - datos.csv Carpetas: - Proyectos
-
Mover varios archivos:
Tú: Mueve img1.png e img2.png a la carpeta Imágenes Detalles: Función: move_multiple_files, Argumentos: {"files": ["img1.png", "img2.png"], "destination": "Imágenes"} ¿Confirmar esta operación? [y/n]: y Asistente: He movido img1.png y img2.png a 'Imágenes'.
💡 Ejecución local del modelo
El modelo Meta-Llama-3‑8B Instruct se ejecuta completamente en tu máquina mediante llama-cpp-python
. Esto garantiza:
- Privacidad total de tus datos.
- Baja latencia (no hay llamadas a la nube).
- Optimización Q4-K_M que permite correrlo en 8 GB de VRAM.
Importante: Ajusta
n_gpu_layers
enCONFIG["MODEL_PARAMS"]
según tu GPU.
🤝 Contribuciones
¡Las contribuciones son bienvenidas! Para reportar errores o proponer mejoras:
- Abre un issue en GitHub.
- Realiza un fork, crea una rama y envía un pull request.
📄 Licencia
Este proyecto está bajo la licencia MIT. Consulta el archivo LICENSE para más detalles.
Desarrollado por Leonardo con ayuda de Claude Sonnet 3.7 thinking mode (Abril 2025).
相关推荐
🔥 1Panel provides an intuitive web interface and MCP Server to manage websites, files, containers, databases, and LLMs on a Linux server.
PDF scientific paper translation with preserved formats - 基于 AI 完整保留排版的 PDF 文档全文双语翻译,支持 Google/DeepL/Ollama/OpenAI 等服务,提供 CLI/GUI/MCP/Docker/Zotero
Easily create LLM tools and agents using plain Bash/JavaScript/Python functions.
Artifact2MCP Generator allows generation of MCP server automatically & dynamically given smart contract's compiled artifact (chain‑agnostic)
Reviews

user_gti3osBR
filesystem-mcp by Haslick is an indispensable tool for anyone working with complex file systems. Its seamless integration and user-friendly interface make it incredibly easy to manage and manipulate files efficiently. The robust features and reliability of filesystem-mcp have significantly streamlined my workflow, saving me time and effort. Highly recommended for professionals in need of a powerful file system management solution!

user_SvbrepEq
filesystem-mcp by Haslick is an outstanding application for managing and optimizing your file systems. As a dedicated user, I appreciate its user-friendly interface and robust functionality. It significantly improves the efficiency of my file management tasks and integrates seamlessly with my workflow. Highly recommended for anyone looking for a reliable and effective file system management tool.

user_jxlybXQJ
I've been using filesystem-mcp by Haslick for a while now, and it's been a game-changer. The intuitive interface and reliable performance make managing my files a breeze. Highly recommend it to anyone looking for a robust file system solution!

user_HdbcBWeC
I have been using filesystem-mcp by Haslick for a while now, and it's been an incredible experience. The seamless integration and user-friendly interface make managing my files exceptionally simple. Highly recommend it!

user_Grgw6pq8
As a loyal user of filesystem-mcp by Haslick, I can confidently say it's an outstanding tool. It has significantly streamlined my file management processes. The user interface is intuitive, and the functionality covers all my needs efficiently. This application is a game-changer for anyone looking to enhance their productivity. Highly recommended!

user_8VxJ5Suz
As a loyal user of filesystem-mcp, I can confidently say that it's a game-changer! Developed by Haslick, this tool simplifies file management to an incredible extent. Its intuitive interface and robust functionality make organizing and accessing files a breeze. Highly recommended for anyone looking to streamline their workflow.

user_YNrZnMHj
I've been using filesystem-mcp by Haslick for a few months now, and it's been a game-changer for my file management needs. The interface is incredibly user-friendly, making it easy to organize and access my files efficiently. Highly recommend this tool for anyone looking to streamline their file system!

user_rIhskUEu
As a dedicated user of filesystem-mcp, I highly recommend this product! Developed by Haslick, it offers a seamless and user-friendly experience for managing file systems. The efficient interface and robust performance truly stand out. It's perfect for both beginners and advanced users, making file management a breeze. Check it out!

user_cgDByHy9
I've been using filesystem-mcp by Haslick for a few weeks now, and it's proved to be an invaluable tool for managing my file systems. It's user-friendly and highly efficient, making my daily tasks much easier. Highly recommended for anyone looking to streamline their workflow!