---
title: "Filesystem MCP Server Setup Guide and Schema"
slug: "filesystem"
category: "file-systems"
package: "@modelcontextprotocol/server-filesystem"
transport: "stdio"
canonical: "https://mcp-codex.com/servers/filesystem"
source: "MCP Codex (https://mcp-codex.com)"
dateModified: "2026-09-28"
---

# Filesystem MCP Server

> Read, write, search, and manage files and directories with scoped sandbox access.

## Overview
The essential MCP server for file operations. Read, create, edit, move, and search files within explicitly allowed directories. Provides sandboxed access to prevent unauthorized filesystem traversal: a fundamental building block for any AI development workflow.

## Quick Install
```bash
npx -y @modelcontextprotocol/server-filesystem /path/to/allowed
```

## Client Configurations

### Claude Desktop (`claude_desktop_config.json`)
```json
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "C:/Projects"
      ]
    }
  }
}
```

### Cursor (`mcp.json`)
```json
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "./"
      ]
    }
  }
}
```

### OpenAI Codex CLI (`~/.codex/config.toml`)
```toml
[mcp_servers.filesystem]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-filesystem", "C:/Projects"]
```

## Available Tools (7)

- `read_file`
- `write_file`
- `edit_file`
- `list_directory`
- `search_files`
- `move_file`
- `get_file_info`

## Documentation & Links
- Canonical Web Page: https://mcp-codex.com/servers/filesystem
- Weekly Protocol Changelog: https://mcp-codex.com#newsletter
- GitHub Repository: https://github.com/modelcontextprotocol/servers/tree/main/src/filesystem
- Setup Tutorial Guide: https://mcp-codex.com/articles/filesystem-mcp-server-guide

