filesystem-mcp
Enables AI assistants to read, write, and manage files on the local system with security features like path restrictions and optional read-only mode.
README
📂 filesystem-mcp
<p align="center"> <a href="https://pypi.org/project/filesystem-mcp/"> <img src="https://img.shields.io/pypi/v/filesystem-mcp" alt="PyPI"> </a> <a href="https://python.org/downloads/"> <img src="https://img.shields.io/pypi/pyversions/filesystem-mcp" alt="Python"> </a> <a href="https://opensource.org/licenses/MIT"> <img src="https://img.shields.io/pypi/l/filesystem-mcp" alt="License"> </a> </p>
Model Context Protocol (MCP) server for file system operations. Enable AI assistants like Claude, Cursor, and others to read, write, and manage files on your local system.
🚀 Features
- 📖 Read files - Read file contents with size limits
- 📂 List directories - View files with metadata (size, type)
- ✏️ Write files - Create and update files
- 🗑️ Delete files - Remove files and directories
- 🔍 Search files - Glob pattern matching
- 📊 File info - Get detailed metadata
- 📁 Directory operations - Create, copy, move directories
📦 Installation
pip install filesystem-mcp
🔧 Usage
CLI Mode
# Start the MCP server (read-write mode)
filesystem-mcp --directory /path/to/your/project
# Start in read-only mode
filesystem-mcp --directory /path/to/your/project --readonly
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"filesystem": {
"command": "filesystem-mcp",
"args": ["--directory", "/path/to/your/project"]
}
}
}
Cursor
Add to Cursor settings (MCP configuration):
{
"mcpServers": {
"filesystem": {
"command": "filesystem-mcp",
"args": ["--directory", "/path/to/your/project"]
}
}
}
🛠️ Available Tools
| Tool | Description | Write |
|---|---|---|
read_file |
Read contents of a file | ❌ |
list_directory |
List files in a directory | ❌ |
write_file |
Create or write to a file | ✅ |
delete_file |
Delete a file or directory | ✅ |
create_directory |
Create a new directory | ✅ |
search_files |
Search files by glob pattern | ❌ |
get_file_info |
Get file metadata | ❌ |
copy_file |
Copy a file or directory | ✅ |
move_file |
Move or rename a file | ✅ |
📝 Example
from filesystem_mcp import FileSystemServer
# Create server instance
server = FileSystemServer(root_directory="/path/to/project")
# Run the server
server.run()
🔐 Security
- Path restrictions: All operations are restricted to the specified root directory
- File size limits: Maximum 1MB for file reads
- Optional read-only mode: Use
--readonlyflag to disable all write operations
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
📄 License
MIT License - see LICENSE for details.
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
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.