MCP File System Agent
Agente de sistema de archivos MCP
Un asistente local agéntico de sistema de archivos construido con LangChain, Ollama, FastMCP y MCP.
El proyecto demuestra cómo un LLM puede seleccionar y usar autónomamente herramientas expuestas por un servidor MCP para realizar operaciones relacionadas con archivos, como leer, listar, escribir y buscar archivos.
Arquitectura
User
│
▼
┌─────────────────┐
│ LangChain │
│ Agent │
└────────┬────────┘
│
▼
┌─────────────────┐
│ Ollama LLM │
│ Qwen3 1.7B │
└────────┬────────┘
│
Tool selection
│
▼
┌──────────────────────┐
│ LangChain MCP Adapter│
└──────────┬───────────┘
│
MCP / HTTP
│
▼
┌──────────────────────┐
│ FastMCP Server │
│ localhost:8000/mcp │
└──────────┬───────────┘
│
┌─────────────┼─────────────┐
▼ ▼ ▼
read_file list_files write_file
│
▼
Local File SystemRelated MCP server: local-mcp
Características
Arquitectura de herramientas basada en MCP
Servidor FastMCP local usando transporte HTTP
Agente LangChain con llamada a herramientas
Inferencia LLM local a través de Ollama
Lectura de archivos PDF
Lectura y escritura de archivos DOCX
Listado de archivos con filtro por extensión
Búsqueda dentro de archivos PDF y DOCX
Estado de conversación usando checkpointing de LangGraph
Selección automática de herramientas por el LLM
Stack Tecnológico
Python
LangChain
LangGraph
Ollama
Qwen3 1.7B
FastMCP
Model Context Protocol (MCP)
langchain-mcp-adaptersPyPDF
python-docx
Estructura del Proyecto
MCP/
│
├── tests/
│ └── sample.docx
│
├── fs_mcp.py
├── main.py
├── requirements.txt
└── README.mdInstalación
1. Clonar el repositorio
git clone https://github.com/jibixn/File-System-Tools-MCP
cd MCP2. Instalar dependencias de Python
pip install -r requirements.txt3. Instalar Ollama
Instala Ollama desde el sitio web oficial y asegúrate de que se esté ejecutando localmente.
Luego descarga el modelo:
ollama pull qwen3:1.7bPuedes verificar que el modelo está disponible con:
ollama listEjecución del Proyecto
El proyecto usa dos procesos porque el servidor MCP se comunica con el cliente a través de HTTP.
Terminal 1 — Iniciar el servidor MCP
Ejecuta este comando desde la raíz del proyecto:
python fs_mcp.pyEl servidor debería estar disponible en:
http://127.0.0.1:8000/mcpTerminal 2 — Iniciar el agente
Abre otra terminal en la raíz del proyecto:
python main.pyLuego puedes ingresar solicitudes como:
Read the file in tests folder named sample.docx and provide me the summary.o:
List all PDF files in the tests folder.o:
Write "Hello, World!" to tests/output.docx.Ejemplo de Flujo del Agente
Para una solicitud como:
Read the file in tests folder named sample.docx and provide me the summary.el agente realiza lo siguiente:
User request
│
▼
LLM analyzes request
│
▼
LLM selects read_file
│
▼
LangChain MCP Adapter
│
▼
MCP HTTP request
│
▼
FastMCP read_file()
│
▼
python-docx reads file
│
▼
Tool result returned to agent
│
▼
LLM summarizes content
│
▼
Final responseRequisitos
Se recomienda Python 3.11+.
Ollama debe estar instalado y ejecutándose localmente.
El modelo Qwen debe estar disponible:
ollama pull qwen3:1.7bTambién puedes usar un modelo a través de un proveedor de inferencia.
Dependencias
Las dependencias directas del proyecto son:
fastmcp==3.4.7
langchain==1.3.14
langchain-mcp-adapters==0.3.2
langchain-ollama==1.1.0
langgraph-checkpoint==4.2.0
pypdf==6.14.2
python-docx==1.2.0Mejoras Futuras
Agregar soporte para más formatos de archivo
Agregar herramientas de eliminación de archivos y creación de directorios
Agregar validación de rutas y sandboxing más sólidos
Agregar autenticación para servidores MCP remotos
Agregar respuestas en streaming
Agregar análisis de documentos más enriquecido
Agregar almacenamiento persistente de conversaciones
Agregar servidores MCP adicionales para bases de datos, GitHub o búsqueda web
Mejorar la confiabilidad de la selección de herramientas con modelos locales más grandes
Objetivos de Aprendizaje
Este proyecto demuestra la interacción entre:
LLM
↓
LangChain Agent
↓
Tool Calling
↓
MCP Client
↓
MCP Protocol
↓
FastMCP Server
↓
Python FunctionsEstá pensado como un ejemplo práctico de construcción de una aplicación agéntica con Model Context Protocol (MCP) y LLMs alojados localmente.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityDmaintenanceAutomates file system operations through natural language commands using a combination of LLM (Ollama), MCP tools, and a Python bridge agent.
- Alicense-qualityBmaintenanceA lightweight, stdio-based MCP server enabling AI assistants to perform local file system operations like reading, writing, searching, and executing commands.5,309MIT
- Alicense-qualityCmaintenanceA containerized MCP bridge that lets local or cloud LLMs access your filesystem and perform web searches via Ollama and FastMCP.MIT
- Alicense-qualityCmaintenanceExperimental MCP server for local LLM orchestration with filesystem tools (read, write, list, delete files) and a CLI agent that communicates via Ollama.9ISC
Related MCP Connectors
Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.
OCR, transcription, file extraction, and image generation for AI agents via MCP.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/jibixn/File-System-Tools-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server