filesystem-mcp
Click on "Install 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-mcpList 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: MCP File 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
このサーバーが読み書きを許可されているフォルダの一覧を返します。
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| directories | Yes | 許可フォルダの絶対パスの一覧 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already provide readOnlyHint=true and idempotentHint=true, so the safety profile is covered. The description adds the useful scope that only server-authorized directories are returned, but it does not disclose other behavioral details such as ordering, errors, or permission-related failure modes. There is no contradiction with the annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is one compact Japanese sentence with no filler. It front-loads the resource and action clearly, making it easy for an agent to parse quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a parameterless, read-only, idempotent tool with an output schema, the description is nearly complete. The only minor gap is that it does not explicitly connect the returned directory list to the sibling file-operation tools, but this is not necessary for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so there are no parameter semantics to document. The description appropriately focuses on what the tool returns. Baseline 4 is appropriate for a parameterless tool.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names a specific verb and resource: it returns the list of folders the server is permitted to read and write. This clearly distinguishes it from siblings like list_directory, read_file, and write_file, which operate on directory contents or files rather than on the authorization boundary.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The intended use—discovering which directories are accessible before using file tools—is implied by the description, but it does not explicitly state when to use this tool instead of alternatives or mention any exclusions. No direct routing guidance to sibling tools is provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_directoryフォルダのファイル一覧ARead-onlyIdempotent
許可フォルダ内にあるフォルダの、ファイル・フォルダの一覧を返します。
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | 一覧を取得するフォルダのパス |
Output Schema
| Name | Required | Description |
|---|---|---|
| path | Yes | 実際に読んだフォルダの絶対パス |
| entries | Yes | フォルダの中身 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already provide readOnlyHint and idempotentHint, so the safety profile is covered. The description adds the permission-boundary behavior ('許可フォルダ内') beyond annotations, but does not disclose other behaviors like non-recursive listing or behavior when the path is invalid.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence, front-loads the action and scope, and contains no redundant words. Every part contributes to the meaning.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a one-parameter, read-only tool with an output schema, the description covers the essential behavior and the authorization scope. It is slightly incomplete only in not specifying whether the listing is immediate children or recursive, which would make it fully unambiguous.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the path parameter is already documented. The tool description adds no parameter-specific detail beyond the schema, only the general allowed-folder constraint; baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('返します') and resource (files/folders in a folder), and adds the scope constraint '許可フォルダ内' (within an allowed folder). It clearly describes the tool's function, though it does not explicitly call out how it differs from list_allowed_directories or read_file.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies this tool is for listing the contents of a folder under an allowed root, but it does not state when to prefer this over list_allowed_directories or read_file, nor does it mention prerequisites such as first discovering the allowed folders. Usage context is implied rather than explicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
read_fileファイルの読み込みARead-onlyIdempotent
許可フォルダ内にあるテキストファイルの内容を読み込んで返します。
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | 読み込むファイルのパス | |
| encoding | No | 文字コード | utf-8 |
Output Schema
| Name | Required | Description |
|---|---|---|
| path | Yes | 実際に読んだファイルの絶対パス |
| size | Yes | ファイルのバイト数 |
| content | Yes | ファイルの内容 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true and idempotentHint=true, so the safe, non-mutating behavior is covered. The description adds useful scope constraints beyond the schema: text files only, and only within permitted folders. There is no contradiction with the annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, front-loaded sentence conveys the operation, resource type, and scope restriction with no redundant words. It is appropriately sized for a simple read tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a low-complexity read tool, the description, annotations, full schema coverage, and presence of an output schema collectively leave no critical gap. The important contextual restriction—allowed-folder scope—is explicitly stated.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so both 'path' and 'encoding' are already documented in the input schema. The description does not add parameter-specific meaning, but at full schema coverage the baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names a specific verb (reads and returns) and a precise resource (contents of text files in allowed folders). This clearly distinguishes read_file from siblings like list_directory, list_allowed_directories, and write_file.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives clear context: use this tool when you need the content of a text file within the allowed folder. It does not explicitly mention alternatives or when-not-to-use conditions, but the purpose is unambiguous enough to infer the correct choice from sibling names.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
write_fileファイルの書き込みADestructive
許可フォルダ内のファイルにテキストを書き込みます。既存のファイルは上書きされます(append を True にすると末尾に追記します)。
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | 書き込むファイルのパス | |
| append | No | Trueなら追記、Falseなら上書き | |
| content | Yes | 書き込む内容 | |
| encoding | No | 文字コード | utf-8 |
Output Schema
| Name | Required | Description |
|---|---|---|
| path | Yes | 書き込んだファイルの絶対パス |
| appended | Yes | 追記した場合はTrue |
| bytes_written | Yes | 書き込んだバイト数 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The annotations already signal destructiveness (destructiveHint=true). The description adds valuable behavioral detail by explicitly stating that existing files are overwritten and that append=true appends instead. This goes beyond the annotation without contradicting it.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, focused sentence that front-loads the core action and constraint, with a parenthetical clarifying the append option. No wasted words or redundancy with the schema.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With annotations covering safety, the schema covering parameters, and an output schema present, the description covers the essential behavior (overwrite vs. append) and scope. Nothing critical is missing for a competent agent to invoke it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the parameters are already fully documented. The description adds minimal extra meaning beyond the schema, mainly reinforcing the overwrite/append behavior already visible in the schema defaults and descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('書き込みます' — writes) and the resource ('ファイル' — file), and explicitly notes the allowed-folder scope. This sets it apart from sibling read/list tools without any ambiguity.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The usage context is implied: it handles writes within the allowed folder, while siblings handle reading and listing. However, it does not explicitly mention when to prefer this tool over read_file, or what conditions would make writing inappropriate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
4 tool updates
v1.0.2- First observed
list_allowed_directories - First observed
list_directory - First observed
read_file - First observed
write_file
TDQS
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
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Manage files and folders directly from your workspace. Read and write files, list directories, cre…
The trust harness for AI agents. Set what an agent can do before it acts.
Securely search and manage workspace context files for AI agents and teams.
Manage websites, help documents and customer-support conversations with safe, scoped tools.
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-
- AlicenseNot gradedqualityDmaintenanceProvides secure, sandboxed filesystem operations including reading, writing, listing, searching, and managing files and directories within a configurable working directory with strict security controls.3MIT
- 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 gradedqualityDmaintenanceProvides secure access to local files from specified directories. Enables listing files, reading contents, and configurable file size and extension filtering.1MIT
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/kujirahand/mcp_server-filesystem'
If you have feedback or need assistance with the MCP directory API, please join our Discord server