Cover image
Try Now
2025-04-14

Asistente local Inteligente para operaciones del sistema de archivos usando llama-3. Proyecto Didáctico Pensado Para entender y Prorender A impleftar LLMS LOCALLES + 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

  1. Clona o descarga este repositorio:
    git clone https://github.com/Haslick/filesystem-mcp.git
    cd filesystem-mcp
    
  2. Asegúrate de tener Python 3.8+ instalado.
  3. Ejecuta el script; instalará dependencias automáticamente la primera vez:
    python filesystem_mcp.py
    
    • Se instalarán llama-cpp-python y rich si faltan.
    • Se descargará (o solicitará ruta) el modelo de ~5 GB.

⚙️ 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 en CONFIG["MODEL_PARAMS"] según tu GPU.

🤝 Contribuciones

¡Las contribuciones son bienvenidas! Para reportar errores o proponer mejoras:

  1. Abre un issue en GitHub.
  2. 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).

相关推荐

  • av
  • Exécutez sans effort LLM Backends, API, Frontends et Services avec une seule commande.

  • 1Panel-dev
  • 🔥 1Panel fournit une interface Web intuitive et un serveur MCP pour gérer des sites Web, des fichiers, des conteneurs, des bases de données et des LLM sur un serveur Linux.

  • WangRongsheng
  • 🧑‍🚀 全世界最好的 LLM 资料总结 (数据处理、模型训练、模型部署、 O1 模型、 MCP 、小语言模型、视觉语言模型) | Résumé des meilleures ressources LLM du monde.

  • rulego
  • ⛓️RULEGO est un cadre de moteur de règle d'orchestration des composants de nouvelle génération légère, intégrée, intégrée et de nouvelle génération pour GO.

  • Byaidu
  • PDF Traduction de papier scientifique avec formats conservés - 基于 AI 完整保留排版的 PDF 文档全文双语翻译 , 支持 Google / Deepl / Olllama / Openai 等服务 , 提供 CLI / GUI / MCP / DOCKER / ZOTERO

  • sigoden
  • Créez facilement des outils et des agents LLM à l'aide de fonctions Plain Bash / JavaScript / Python.

  • hkr04
  • SDK C ++ MCP (Protocole de contexte modèle léger)

  • RockChinQ
  • 😎简单易用、🧩丰富生态 - 大模型原生即时通信机器人平台 | 适配 QQ / 微信 (企业微信、个人微信) / 飞书 / 钉钉 / Discord / Telegram / Slack 等平台 | 支持 Chatgpt 、 Deepseek 、 Dify 、 Claude 、 GEMINI 、 XAI 、 PPIO 、 OLLAMA 、 LM Studio 、阿里云百炼、火山方舟、 Siliconflow 、 Qwen 、 Moonshot 、 ChatGlm 、 Sillytraven 、 MCP 等 LLM 的机器人 / Agent | Plateforme de bots de messagerie instantanée basés sur LLM, prend en charge Discord, Telegram, WeChat, Lark, Dingtalk, QQ, Slack

  • dmayboroda
  • Rag de conversation sur site avec des conteneurs configurables

  • modelscope
  • Commencez à construire des applications multi-agents LLM, plus facilement.

    Reviews

    3.4 (9)
    Avatar
    user_gti3osBR
    2025-04-24

    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!

    Avatar
    user_SvbrepEq
    2025-04-24

    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.

    Avatar
    user_jxlybXQJ
    2025-04-24

    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!

    Avatar
    user_HdbcBWeC
    2025-04-24

    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!

    Avatar
    user_Grgw6pq8
    2025-04-24

    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!

    Avatar
    user_8VxJ5Suz
    2025-04-24

    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.

    Avatar
    user_YNrZnMHj
    2025-04-24

    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!

    Avatar
    user_rIhskUEu
    2025-04-24

    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!

    Avatar
    user_cgDByHy9
    2025-04-24

    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!