Filesystem MCP Server
Provides comprehensive filesystem operations (read, write, list, create, delete, move files and directories) through the Model Context Protocol with Streamable HTTP transport and built-in security through configurable root directory restrictions.
README
filesystem-mcp-server
Filesystem MCP server with Streamable HTTP transport support. Provides comprehensive filesystem operations through the Model Context Protocol.
Created as an alternative to the official MCP filesystem server with modern Streamable HTTP transport instead of deprecated SSE.
Features
- Streamable HTTP Transport - Modern MCP protocol
- 8 Filesystem Operations - Read, write, list, create, delete, move, and inspect files/directories
- Security First - Configurable root directory with path traversal protection
- Docker Ready - Multi-arch images (amd64/arm64) published to GHCR
Quick Start
Docker (Recommended)
docker pull ghcr.io/njbrake/filesystem-mcp-server:main
docker run -d \
--name filesystem-mcp \
-p 8123:8123 \
-v /path/to/your/files:/data \
ghcr.io/njbrake/filesystem-mcp-server:main
Available tags: main (latest), v* (releases), main-<sha> (commits)
Python with uv
cd filesystem-mcp-server
uv sync
uv run filesystem-mcp --allowed-root /path/to/files --port 8123
Server endpoint: http://localhost:8123/mcp
Command Line Options
| Option | Default | Description |
|---|---|---|
--port |
8123 | Port to listen on |
--allowed-root |
. |
Root directory for filesystem operations |
Available Tools
The server exposes 8 MCP tools for filesystem operations:
| Tool | Description | Parameters |
|---|---|---|
read_file |
Read file contents as text | path |
list_directory |
List directory contents with metadata | path (optional, default: ".") |
write_file |
Create or overwrite a file | path, content |
create_directory |
Create directory (with parents) | path |
delete_file |
Delete a file | path |
delete_directory |
Delete directory | path, recursive (optional) |
move_path |
Move or rename file/directory | source, destination |
get_file_info |
Get file/directory metadata | path |
All paths are relative to the configured --allowed-root.
Security
The --allowed-root parameter restricts all filesystem operations to the specified directory tree. Path validation prevents directory traversal attacks:
- Paths are resolved relative to allowed root
- Symlinks and
..components are canonicalized - Final path must be within allowed root
- Attempts to escape are rejected (e.g.,
../../../etc/passwd)
Important: Never run with system-critical directories as the allowed root.
Docker Details
Custom Configuration
# Different port
docker run -p 8000:8000 \
-v /my/files:/data \
ghcr.io/njbrake/filesystem-mcp-server:main \
--allowed-root /data --port 8000
# Build locally
docker build -t filesystem-mcp-server .
Container Details
- Default port: 8123
- Default allowed root:
/data - Volume mount point:
/data - Multi-architecture: linux/amd64, linux/arm64
Testing
# List available tools
curl -X POST http://localhost:8123/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"tools/list","id":1}'
# Read a file
curl -X POST http://localhost:8123/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc":"2.0",
"method":"tools/call",
"params":{
"name":"read_file",
"arguments":{"path":"README.md"}
},
"id":2
}'
About MCP
This server implements the Model Context Protocol, an open protocol for seamless integration between LLM applications and external tools.
Uses Streamable HTTP transport (MCP spec 2025-03-26), the modern replacement for deprecated HTTP+SSE.
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
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.
E2B
Using MCP to run code via e2b.