Skip to content
Gemini CLI

Filesystem MCP for Gemini CLI

io.github.j0hanz/filesystem-mcp

Secure filesystem MCP server for reading, writing, searching, diffing, and patching files.

client:Gemini CLI transport:stdio runtime:npm

Install Filesystem MCP in Gemini CLI

~/.gemini/settings.json · windows: %USERPROFILE%\.gemini\settings.json

Held in this page only — never stored, logged, or sent anywhere but back to your screen.

{
  "mcpServers": {
    "filesystem-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@j0hanz/filesystem-mcp"
      ],
      "env": {
        "FS_ALLOWED_DIRS": "<FS_ALLOWED_DIRS>"
      }
    }
  }
}

Gemini expands $VAR and ${VAR} inside env values, so a secret can live in your shell rather than this file. Gemini CLI docs

Filesystem MCP in other clients