# Pathgate

> Pathgate is an open-source MCP server for files and documents. Filesystem MCP server that only touches directories you allow-list at startup. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Self-hosted, Windows, macOS, Linux
- **Repository:** https://github.com/geekgod382/pathgate
- **MCP Registry name:** io.github.geekgod382/pathgate
- **Categories:** [files and documents](https://ai-powered.com/categories/files-and-documents), [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-23

## About

Pathgate keeps an assistant inside folders you name when you start it. Each path is resolved with `os.path.realpath()` and compared by prefix, so symlinks are followed before the check rather than used to escape it. A `--read-only` flag disables every operation that changes files.

Besides ten tools for reading, writing, listing, creating, deleting, moving, copying, searching and inspecting files, it exposes `file://` and `directory://` resources and built-in prompts for directory analysis and file discovery. Allowed folders can be passed as arguments or through the `FS_MCP_ALLOWED_PATHS` environment variable.

The author says it was built mainly for Claude Desktop. A `uvx pathgate install` command writes the config entry for you, with `--dry-run`, `--yes`, `--name` and `--config` options, and it works for any client using the same `mcpServers` shape. It requires Python 3.10 or newer.

## Features

- **Allow-listed paths:** Only directories passed at startup are reachable; symlinks are resolved before comparison.
- **Read-only mode:** A flag turns off every tool that modifies the filesystem.
- **Ten file tools:** Read, write, list, create, delete, move, copy, search and inspect files and folders.
- **Resources and prompts:** Files and directories are exposed as resources, with prompts for analysis and discovery.
- **Config installer:** `uvx pathgate install` writes the client config entry, with a dry-run option.

## Good for

- Let Claude Desktop organise a Documents folder without access to the rest of the disk
- Search a projects directory for files matching a pattern
- Review a folder in read-only mode before allowing edits
- Move or rename batches of files through chat

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add pathgate -- uvx pathgate
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "pathgate": {
      "command": "uvx",
      "args": [
        "pathgate"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "pathgate": {
      "command": "uvx",
      "args": [
        "pathgate"
      ]
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "pathgate": {
      "command": "uvx",
      "args": [
        "pathgate"
      ]
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "pathgate": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "pathgate"
      ]
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add pathgate -- uvx pathgate
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.pathgate]
command = "uvx"
args = ["pathgate"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "pathgate": {
      "command": "uvx",
      "args": [
        "pathgate"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user pathgate uvx -- pathgate

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "pathgate": {
      "command": "uvx",
      "args": [
        "pathgate"
      ]
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "pathgate": {
      "command": "uvx",
      "args": [
        "pathgate"
      ]
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "pathgate": {
      "command": "uvx",
      "args": [
        "pathgate"
      ]
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "pathgate": {
      "command": "uvx",
      "args": [
        "pathgate"
      ]
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "pathgate": {
      "command": "uvx",
      "args": [
        "pathgate"
      ]
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "pathgate": {
      "command": "uvx",
      "args": [
        "pathgate"
      ]
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "pathgate": {
      "command": "uvx",
      "args": [
        "pathgate"
      ]
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "pathgate": {
      "command": "uvx",
      "args": [
        "pathgate"
      ]
    }
  }
}
```

## Tools

From the tool list in its README, going by the names, 2 of 10 tools delete data and 3 change data; 1 name doesn't say. From the server's own tool labels and tool names; not verified by us.

- `read_file_tool` (name suggests: reads): Read a file and return its content, size and encoding
- `write_file_tool` (name suggests: changes): Write content to a file
- `list_directory_tool` (name suggests: reads): List directory contents, optionally recursively
- `create_directory_tool` (name suggests: changes): Create a directory tree if needed
- `delete_file_tool` (name suggests: deletes): Delete a single file
- `delete_directory_tool` (name suggests: deletes): Delete a directory, optionally recursively
- `move_file_tool` (name suggests: changes): Move or rename a file or directory
- `copy_file_tool`: Copy a file or directory
- `search_files_tool` (name suggests: reads): Search for files matching a pattern
- `get_file_info_tool` (name suggests: reads): Return metadata for a file or directory

## FAQ

### How do I limit what Pathgate can see?

Pass the folders as arguments, or set FS_MCP_ALLOWED_PATHS; nothing outside them is permitted.

### Can Pathgate be made read-only?

Yes, start it with `--read-only`.

### Which clients does Pathgate support?

The README names Claude Desktop, Cursor, VS Code and inspector tools.

### How do I install Pathgate?

Run it with `uvx pathgate <paths>` or use `uvx pathgate install` to write the config.

### Is Pathgate free?

Yes. Pathgate is open source, so you can use and self-host it for free.

### How do I add Pathgate to Claude Code?

Run this command in your terminal: claude mcp add pathgate -- uvx pathgate

### What are the best alternatives to Pathgate?

The closest alternatives to Pathgate are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Context7](https://ai-powered.com/mcp/context7): Context7 is a freemium MCP server for developer tools.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [awesome-mcp-servers](https://ai-powered.com/mcp/awesome-mcp-servers-2): awesome-mcp-servers is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.

---
Source: https://ai-powered.com/mcp/pathgate
