mcp-file-manager
An MCP server that gives AI agents file system access: read, write, search, hash, directory trees — 12 tools, zero dependencies, pure Python stdlib.
README
MCP File Manager — File System Operations for AI Agents
An MCP server that gives AI agents file system access: read, write, search, hash, directory trees — 12 tools, zero dependencies, pure Python stdlib.
Features
- 12 MCP Tools:
read_file,read_file_lines,write_file,append_file,delete_file,copy_file,move_file,list_directory,search_files,file_info,file_hash,directory_tree - Zero dependencies — pure Python stdlib (os, shutil, hashlib, fnmatch, pathlib)
- Content search — grep-like search inside files (20+ file extensions)
- File hashing — MD5, SHA-1, SHA-256, SHA-512
- Directory trees — recursive tree generation with depth control
- STDIO JSON-RPC mode — drop-in for Claude Desktop, Hermes, or any MCP client
Quick Start
python -m src.server --stdio # STDIO mode
python -m src.server --manifest # Print manifest
Use as a library
from src.server import MCPFileManagerServer
import json
server = MCPFileManagerServer()
# Write a file
server.handle_tool_call("write_file", {"path": "/tmp/test.txt", "content": "Hello!"})
# Read it back
result = json.loads(server.handle_tool_call("read_file", {"path": "/tmp/test.txt"}))
print(result["content"]) # "Hello!"
# Search for files
result = server.handle_tool_call("search_files", {"path": ".", "pattern": "*.py", "target": "files"})
# Search inside files (grep)
result = server.handle_tool_call("search_files", {"path": ".", "pattern": "TODO", "target": "content"})
# Get file hash
result = server.handle_tool_call("file_hash", {"path": "/tmp/test.txt", "algorithm": "sha256"})
# Directory tree
result = server.handle_tool_call("directory_tree", {"path": ".", "max_depth": 3})
MCP Tool Reference
| Tool | Description | Required Params |
|---|---|---|
read_file |
Read file content | path |
read_file_lines |
Read specific lines | path |
write_file |
Write file (creates dirs) | path, content |
append_file |
Append to file | path, content |
delete_file |
Delete file or dir | path |
copy_file |
Copy file or dir | src, dst |
move_file |
Move/rename | src, dst |
list_directory |
List dir contents | — |
search_files |
Find by name or grep | pattern |
file_info |
File metadata | path |
file_hash |
File hash (md5/sha256) | path |
directory_tree |
Directory tree | — |
Tests
python -m pytest tests/ -v # 36 tests, all passing
License
MIT
Author
aaameobius-crypto — github.com/aaameobius-crypto
Freelance portfolio: https://ameobius-space.github.io/kwork-portfolio/
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
E2B
Using MCP to run code via e2b.