filesystem-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@filesystem-mcp List the files in my Documents/work folder and read the most recent one"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
filesystem-mcp
An MCP server (Python) that can only read and write files inside folders you explicitly allow.
Uses the Python MCP SDK (
mcpv2), following the latest MCP specificationCommunicates over stdio
Every tool supports
outputSchema/structuredContent(structured output)
Tools
Tool | Description | Arguments |
| Returns the list of allowed directories | none |
| Lists files and folders inside a directory |
|
| Reads a text file |
|
| Writes or appends to a file |
|
Related MCP server: LocalFS MCP Server
Usage
Pass one or more allowed directories as startup arguments.
uvx filesystem-mcp ~/Documents/work ~/tmpTo run from source, uv sync first, then:
uv run filesystem-mcp ~/Documents/work ~/tmp
uv run python -m filesystem_mcp ~/Documents/workAny access outside the specified directories (and their subdirectories) fails with an
error. Escaping via .. or a symlink is blocked too, since paths are checked against
their resolved (real) location.
Registering with clients
uvx lets you run the server without installing it up front (it's fetched automatically
on first use).
Run it from PyPI:
uvx filesystem-mcp ~/Documents/workYou can also install it with pip:
pip install filesystem-mcp
filesystem-mcp ~/Documents/workRun it from a local checkout during development:
uvx --from /path/to/mcp_server-filesystem filesystem-mcp ~/Documents/workOr run it directly from GitHub:
uvx --from git+https://github.com/kujirahand/mcp_server-filesystem filesystem-mcp ~/Documents/workThe trailing arguments (one or more) are the allowed directories.
Claude Code
claude mcp add filesystem -- uvx filesystem-mcp ~/Documents/workCheck the registration with claude mcp list, remove it with claude mcp remove filesystem.
Codex CLI
codex mcp add filesystem -- uvx filesystem-mcp ~/Documents/workOr configure it directly in ~/.codex/config.toml:
[mcp_servers.filesystem]
command = "uvx"
args = ["filesystem-mcp", "~/Documents/work"]List servers with codex mcp list, remove with codex mcp remove filesystem.
Claude Desktop
Add this to your claude_desktop_config.json:
{
"mcpServers": {
"filesystem": {
"command": "uvx",
"args": ["filesystem-mcp", "~/Documents/work"]
}
}
}Testing with MCP Inspector
MCP Inspector lets you try out the tools without registering the server with a client (requires Node.js).
Using the GUI
npx -y @modelcontextprotocol/inspector uv run filesystem-mcp ~/Documents/workWhen the browser opens, click Connect on the left to connect, then go to the
Tools tab and click List Tools to see the available tools. Select a tool, fill in
its arguments, and click Run Tool to see the result (including structured output).
To test against the published PyPI version instead, swap out the uv run part:
npx -y @modelcontextprotocol/inspector uvx filesystem-mcp ~/Documents/workUsing the CLI
Adding --cli returns the result as JSON without opening a browser, which is handy for
quick checks and automation.
List tools:
npx -y @modelcontextprotocol/inspector --cli uv run filesystem-mcp ~/Documents/work \
--method tools/listCheck the allowed directories:
npx -y @modelcontextprotocol/inspector --cli uv run filesystem-mcp ~/Documents/work \
--method tools/call --tool-name list_allowed_directoriesList a directory:
npx -y @modelcontextprotocol/inspector --cli uv run filesystem-mcp ~/Documents/work \
--method tools/call --tool-name list_directory --tool-arg path=$HOME/Documents/workWrite and read a file (add one --tool-arg per argument):
npx -y @modelcontextprotocol/inspector --cli uv run filesystem-mcp ~/Documents/work \
--method tools/call --tool-name write_file \
--tool-arg path=$HOME/Documents/work/memo.txt --tool-arg content=hello
npx -y @modelcontextprotocol/inspector --cli uv run filesystem-mcp ~/Documents/work \
--method tools/call --tool-name read_file --tool-arg path=$HOME/Documents/work/memo.txtPointing at a path outside the allowed directories returns "isError": true with a
message like Path not allowed.
Tests
uv run pytestLicense
MIT
Available Tools
4 toolslist_allowed_directories許可フォルダの一覧ARead-onlyIdempotent
このサーバーが読み書きを許可されているフォルダの一覧を返します。
Inputs: no named parameters. Returns: 許可フォルダの一覧。
list_directoryフォルダのファイル一覧ARead-onlyIdempotent
許可フォルダ内にあるフォルダの、ファイル・フォルダの一覧を返します。
Inputs: path (required). Returns: フォルダの一覧。
read_fileファイルの読み込みARead-onlyIdempotent
許可フォルダ内にあるテキストファイルの内容を読み込んで返します。
Inputs: path (required), encoding. Returns: 読み込んだファイルの内容。
write_fileファイルの書き込みADestructive
許可フォルダ内のファイルにテキストを書き込みます。既存のファイルは上書きされます(append を True にすると末尾に追記します)。
Inputs: path (required), content (required), append, encoding. Returns: 書き込みの結果。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a distinctly different purpose: listing allowed roots, listing directory contents, reading a file, and writing a file. The only potentially similar pair is list_allowed_directories and list_directory, but the descriptions clearly separate them.
All tool names follow a consistent verb_noun snake_case pattern: list_*, list_*, read_file, write_file. The naming is predictable and easy to extend.
Four tools is a reasonable, focused count for a minimal filesystem access server. Each tool covers a distinct core operation and none feel redundant.
The set covers listing and file read/write, but lacks essential filesystem operations like creating or deleting directories, deleting or renaming files, and checking file metadata. Common workflows will hit dead ends.
Maintenance
Related MCP Connectors
Safe folder access for ChatGPT and Claude: read, write and search files, risky tools opt-in.
Manage files and folders directly from your workspace. Read and write files, list directories, cre…
Your own computer's files from ChatGPT or Claude: folder rules, confirmations and undo.
User-owned files and explicit AI Memories for authorized assistants with scoped access.
Related MCP Servers
- FlicenseAqualityDmaintenanceEnables secure filesystem operations with directory sandboxing and optional read-only mode. Supports file reading/writing, directory management, file searching, and text operations while restricting access to specified directories.12-
- FlicenseNot gradedqualityDmaintenanceProvides sandboxed access to local filesystem operations including directory and file management, content search with glob and regex patterns, and binary file support with configurable safety limits.-
- AlicenseNot gradedqualityCmaintenanceProvides a hardened filesystem interface that lets a local model read and write files only within user-specified directories, with symlink protection and atomic operations.2MIT
- AlicenseBqualityCmaintenanceEnables AI assistants to list directories, read, write, and search files within a locked root directory, using resolve-then-validate path checks, size caps, and binary detection to prevent sandbox escapes.4MIT