Filesystem MCP Server
Scoped read and write access to local directories for reference and development workflows.
Overview
The reference Filesystem server lets an MCP client list, read, search, and modify files inside explicitly allowed directories. It is a foundational local server for coding and document tasks. Its usefulness depends entirely on the directory allow-list: a broad root path gives an agent broad control over local files.
Capabilities
- Directory listing
- File read
- File write
- Search
- Move files
Connection profile
- Transports
- stdio
- Authentication
- None (local process permissions)
- License
- MIT
- Vendor
- Model Context Protocol project
- Repository
- github.com/modelcontextprotocol/servers
Client format support is reviewed against official client documentation. It is not a claim that this specific server was tested with every client.
Configuration starting point
A documented preset is available for this server. It contains placeholders, not real credentials. Generate a client-correct file or review the raw values below.
npx -y @modelcontextprotocol/server-filesystem /path/to/allowed/directory
Security notes
- Never allow the home directory, source-code root, or credential folders unless the task truly requires them.
- Write and move tools can overwrite or relocate files; use a scratch directory and version control for important work.
- The server runs with the permissions of the user that launches it; sandbox it where possible.
The catalog records source evidence, not a security audit. Review the server's permissions, recent releases, and the data it can access before connecting it to a real account.
Used in these workflows
Use GitHub for PR context, a local Git server for the diff and history, and a scoped filesystem server for surrounding code before writing a review.
WorkflowRun a source-checked SEO content updateCombine search, crawling, and a scoped content directory to research a topic, draft an update, and verify claims against sources.
WorkflowInvestigate a database question with read-only SQLUse a restricted PostgreSQL connection and a local memory notebook to answer a data question without touching production writes.
WorkflowTurn a merged change into reviewed documentationRead the merged PR and local docs, draft an update, and verify links before publishing to the documentation system.
WorkflowBuild and verify an API integration with live documentationUse current library docs plus a real browser to implement an API client, then test the golden path and failure cases.
WorkflowPrepare an access review packet across enterprise systemsGather repository, project, and wiki permissions into a review packet that distinguishes verified facts from gaps.
WorkflowTurn a Figma frame into reviewed frontend codePull design context, implement against the repository's existing components, and verify the result in a real browser.
Related failure modes
Codex reads MCP servers from TOML tables such as [mcp_servers.name]. A parse error usually comes from invalid table syntax, duplicate keys, a value of the wrong type, or a nested table declared in an invalid order.
MCP stdio server fails with command not found (ENOENT)The client tried to launch a local MCP server but could not find the executable named in the command field. This is an environment and PATH problem, not a protocol problem: the server process never starts.
JSON-RPC -32700 Parse errorThe receiver could not parse the JSON-RPC message. At the MCP layer this usually indicates malformed JSON, non-protocol text mixed into a stdio stream, or a proxy that changes the request body.
MCP server cannot read a file or execute a command (EACCES)The server process lacks operating-system permission for a file, directory, socket, or executable. This is an environment boundary problem: adding scopes to an MCP configuration does not change filesystem permissions.
Sources & evidence
- github.com/modelcontextprotocol/servers/tree/main/src/filesystemRepository · checked Oct 23, 2026 · documented
The reference servers repository documents the filesystem server, its allowed-directory model, and its tools.