Secure file operations with configurable access controls. Read, write, move and search local files, scoped to directories you explicitly allow.
registry version 2026.8.31
npm (official)
npx -y @modelcontextprotocol/server-filesystem /path/to/allowed/dirnpm (official)
npx -y @modelcontextprotocol/server-filesystem@2026.8.31 /path/to/allowed/dir
Pick your client — the config below is generated for this server (local stdio). Copy respects the “Pin version” switch above.
claude_desktop_config.json
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/path/to/allowed/dir"
],
"env": {
"ALLOWED_DIRECTORIES": "<YOUR_ALLOWED_DIRECTORIES>"
}
}
}
}{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem@2026.8.31",
"/path/to/allowed/dir"
],
"env": {
"ALLOWED_DIRECTORIES": "<YOUR_ALLOWED_DIRECTORIES>"
}
}
}
}Format verified against the official Claude Desktop docs ↗.
terminal
claude mcp add --env ALLOWED_DIRECTORIES=<YOUR_ALLOWED_DIRECTORIES> filesystem -- npx -y @modelcontextprotocol/server-filesystem /path/to/allowed/dir
claude mcp add --env ALLOWED_DIRECTORIES=<YOUR_ALLOWED_DIRECTORIES> filesystem -- npx -y @modelcontextprotocol/server-filesystem@2026.8.31 /path/to/allowed/dir
Format verified against the official Claude Code docs ↗.
.cursor/mcp.json
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/path/to/allowed/dir"
],
"env": {
"ALLOWED_DIRECTORIES": "<YOUR_ALLOWED_DIRECTORIES>"
}
}
}
}{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem@2026.8.31",
"/path/to/allowed/dir"
],
"env": {
"ALLOWED_DIRECTORIES": "<YOUR_ALLOWED_DIRECTORIES>"
}
}
}
}Format verified against the official Cursor docs ↗.
.vscode/mcp.json
{
"servers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/path/to/allowed/dir"
],
"env": {
"ALLOWED_DIRECTORIES": "<YOUR_ALLOWED_DIRECTORIES>"
}
}
}
}{
"servers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem@2026.8.31",
"/path/to/allowed/dir"
],
"env": {
"ALLOWED_DIRECTORIES": "<YOUR_ALLOWED_DIRECTORIES>"
}
}
}
}Format verified against the official VS Code docs ↗.
mcp_config.json
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/path/to/allowed/dir"
],
"env": {
"ALLOWED_DIRECTORIES": "<YOUR_ALLOWED_DIRECTORIES>"
}
}
}
}{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem@2026.8.31",
"/path/to/allowed/dir"
],
"env": {
"ALLOWED_DIRECTORIES": "<YOUR_ALLOWED_DIRECTORIES>"
}
}
}
}Format verified against the official Windsurf docs ↗.
Defined in the server's official registry manifest. Required secrets are shown as <YOUR_…> placeholders in the configs above.
ALLOWED_DIRECTORIES required — Not an env var — directories are passed as command-line arguments. Add every directory the assistant may read/write; everything else is denied by design (list_allowed_directories shows the effective list). Get it: Arguments in your client configOfficial reference server — modelcontextprotocol/servers (src/filesystem)
The official filesystem server is distributed from the modelcontextprotocol/servers monorepo and is still actively maintained. This listing previously pointed at a third-party implementation (FieldCure). The official command is below; access is scoped strictly to the directories you pass as arguments.
Only the directories passed as arguments are accessible. Add each needed directory to the server arguments and restart the client. Source: github.com/modelcontextprotocol/servers/tree/main/src/filesy ↗
Grant the narrowest directory set that works (a project folder, not your home directory) — the server runs with your user permissions. Source: github.com/modelcontextprotocol/servers/tree/main/src/filesy ↗
Independent, non-official implementations of the Filesystem MCP server maintained by the community.
Last verified: 2026-10-15 | Sources: Official filesystem server README ↗ · Official servers README ↗
⭐ 91,272 stars · 最近更新于 16 天前
These star and push figures are for the shared repository — 14 listings on this site point at the same repository.
Node.js server implementing Model Context Protocol (MCP) for filesystem operations. Published on npm as @modelcontextprotocol/server-filesystem . The server uses a flexible directory access control system. Directories can be specified via command-line arguments or dynamically via Roots. Sp
Summary from the project README — github.com/modelcontextprotocol/servers
Distributed as npm, listed under Files & Storage. Review our MCP security guide before granting access to real data.
Node.js server implementing Model Context Protocol (MCP) for filesystem operations. Published on npm as @modelcontextprotocol/server-filesystem . The server uses a flexible directory access control system. Directories can be specified via command-line arguments or dynamically via Roots. Sp
Run the install command shown above, then paste the config for your client (Claude Desktop, Claude Code, Cursor, VS Code or Windsurf) into its MCP settings and restart the client.
The MCP server itself is free to install. The source is public on https://github.com/modelcontextprotocol/servers. Any third-party service it calls may require its own API key and account.
Any MCP-compatible client can use it, including Claude Desktop, Claude Code, Cursor, VS Code, Windsurf and custom agents.
Publish this server? Link back with a badge on your README or site — copy either snippet.
Markdown
[](https://mcpnav.net/server/filesystem/)
HTML
<a href="https://mcpnav.net/server/filesystem/"><img src="https://mcpnav.net/badge/filesystem.svg" alt="Listed on MCPNav" height="20"></a>