MCP File System Agent
{"type": "text"}# MCP File System Agent
Ein lokaler agentischer Dateisystem-Assistent, erstellt mit LangChain, Ollama, FastMCP und MCP.
Das Projekt zeigt, wie ein LLM autonom Werkzeuge auswählen und nutzen kann, die von einem MCP-Server bereitgestellt werden, um dateibezogene Vorgänge wie Lesen, Auflisten, Schreiben und Durchsuchen von Dateien auszuführen.
Architektur
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
Funktionen
MCP-basierte Werkzeugarchitektur
Lokaler FastMCP-Server mit HTTP-Transport
LangChain-Agent mit Werkzeugaufrufen
Lokale LLM-Inferenz über Ollama
Lesen von PDF-Dateien
Lesen und Schreiben von DOCX-Dateien
Dateiauflistung mit Erweiterungsfilterung
Durchsuchen von PDF- und DOCX-Dateien
Gesprächszustand mithilfe von LangGraph-Checkpointing
Automatische Werkzeugauswahl durch das LLM
Technologie-Stack
Python
LangChain
LangGraph
Ollama
Qwen3 1.7B
FastMCP
Model Context Protocol (MCP)
langchain-mcp-adaptersPyPDF
python-docx
Projektstruktur
MCP/
│
├── tests/
│ └── sample.docx
│
├── fs_mcp.py
├── main.py
├── requirements.txt
└── README.mdInstallation
1. Repository klonen
git clone https://github.com/jibixn/File-System-Tools-MCP
cd MCP2. Python-Abhängigkeiten installieren
pip install -r requirements.txt3. Ollama installieren
Installieren Sie Ollama von der offiziellen Website und stellen Sie sicher, dass es lokal ausgeführt wird.
Ziehen Sie dann das Modell:
ollama pull qwen3:1.7bSie können überprüfen, ob das Modell verfügbar ist mit:
ollama listProjekt ausführen
Das Projekt verwendet zwei Prozesse, da der MCP-Server über HTTP mit dem Client kommuniziert.
Terminal 1 – MCP-Server starten
Führen Sie diesen Befehl im Projektstammverzeichnis aus:
python fs_mcp.pyDer Server sollte verfügbar sein unter:
http://127.0.0.1:8000/mcpTerminal 2 – Agenten starten
Öffnen Sie ein weiteres Terminal im Projektstammverzeichnis:
python main.pySie können dann Anfragen wie die folgenden eingeben:
Read the file in tests folder named sample.docx and provide me the summary.oder:
List all PDF files in the tests folder.oder:
Write "Hello, World!" to tests/output.docx.Beispielhafter Agentenablauf
Für eine Anfrage wie:
Read the file in tests folder named sample.docx and provide me the summary.führt der Agent Folgendes aus:
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 responseAnforderungen
Python 3.11+ wird empfohlen.
Ollama muss installiert sein und lokal ausgeführt werden.
Das Qwen-Modell muss verfügbar sein:
ollama pull qwen3:1.7bSie können auch ein Modell über einen Inferenzanbieter verwenden.
Abhängigkeiten
Die direkten Abhängigkeiten des Projekts sind:
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.0Zukünftige Verbesserungen
Unterstützung für weitere Dateiformate hinzufügen
Werkzeuge zum Löschen von Dateien und Erstellen von Verzeichnissen hinzufügen
Stärkere Pfadvalidierung und Sandboxing hinzufügen
Authentifizierung für entfernte MCP-Server hinzufügen
Streaming-Antworten hinzufügen
Umfangreicheres Dokument-Parsing hinzufügen
Dauerhafte Speicherung von Gesprächen hinzufügen
Zusätzliche MCP-Server für Datenbanken, GitHub oder Websuche hinzufügen
Zuverlässigkeit der Werkzeugauswahl mit größeren lokalen Modellen verbessern
Lernziele
Dieses Projekt demonstriert die Interaktion zwischen:
LLM
↓
LangChain Agent
↓
Tool Calling
↓
MCP Client
↓
MCP Protocol
↓
FastMCP Server
↓
Python FunctionsEs ist als praktisches Beispiel für die Entwicklung einer agentischen Anwendung mit Model Context Protocol (MCP) und lokal gehosteten LLMs gedacht.
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