Pathgate
Filesystem MCP server that only touches directories you allow-list at startup
Pathgate is an open-source MCP server for files and documents. It runs locally on your machine and is started by your AI client.
- Pricing
- Open source
- Platforms
- CLI, Self-hosted, Windows
- Runs
- Locally
- What it can do
- Can delete data (2 tools)
- Version
- 0.2.5
Similar MCP servers
Install
Add with the CLI
Run in a terminal
claude mcp add pathgate -- uvx pathgateAdd --scope user to use it in every project, or --scope project to share it in .mcp.json.
Or share it with your project
Add to .mcp.json
{
"mcpServers": {
"pathgate": {
"command": "uvx",
"args": [
"pathgate"
]
}
}
}Add to claude_desktop_config.json
{
"mcpServers": {
"pathgate": {
"command": "uvx",
"args": [
"pathgate"
]
}
}
}Settings → Developer → Edit Config, then quit and reopen Claude Desktop.
Add to ~/.cursor/mcp.json
{
"mcpServers": {
"pathgate": {
"command": "uvx",
"args": [
"pathgate"
]
}
}
}Use .cursor/mcp.json in a project to share it with the project.
Add to ~/.copilot/mcp-config.json
{
"mcpServers": {
"pathgate": {
"type": "stdio",
"command": "uvx",
"args": [
"pathgate"
]
}
}
}Or put the same entry in .mcp.json at your workspace root to share it.
Add with the CLI
Run in a terminal
codex mcp add pathgate -- uvx pathgateOr add to config.toml
Add to ~/.codex/config.toml
[mcp_servers.pathgate]
command = "uvx"
args = ["pathgate"]Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"pathgate": {
"command": "uvx",
"args": [
"pathgate"
]
}
}
}Gemini CLI and Antigravity
Gemini CLI
Add to ~/.gemini/settings.json
{ "mcpServers": { "pathgate": { "command": "uvx", "args": [ "pathgate" ] } } }Or run: gemini mcp add -s user pathgate uvx -- pathgate
Antigravity
Add to ~/.gemini/config/mcp_config.json
{ "mcpServers": { "pathgate": { "command": "uvx", "args": [ "pathgate" ] } } }Use .agents/mcp_config.json to add it to one workspace only.
Devin Desktop (formerly Windsurf)
Add to ~/.config/devin/mcp_config.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
Add to cline_mcp_settings.json
{ "mcpServers": { "pathgate": { "command": "uvx", "args": [ "pathgate" ] } } }Open it from the MCP Servers icon → Configure → Configure MCP Servers.
Zed
Add to Zed settings.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
Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add
{ "mcpServers": { "pathgate": { "command": "uvx", "args": [ "pathgate" ] } } }Junie
Add to ~/.junie/mcp/mcp.json
{ "mcpServers": { "pathgate": { "command": "uvx", "args": [ "pathgate" ] } } }Use .junie/mcp/mcp.json to share it with a project.
Kiro
Add to ~/.kiro/settings/mcp.json
{ "mcpServers": { "pathgate": { "command": "uvx", "args": [ "pathgate" ] } } }Use .kiro/settings/mcp.json to add it to one workspace only.
Using several servers? Build one config file with the MCP config generator.
About Pathgate
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.
Tools this server provides (10)
Taken from the project documentation; the running server may differ.
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_toolName suggests: reads
- Read a file and return its content, size and encoding
- write_file_toolName suggests: changes
- Write content to a file
- list_directory_toolName suggests: reads
- List directory contents, optionally recursively
- create_directory_toolName suggests: changes
- Create a directory tree if needed
- delete_file_toolName suggests: deletes
- Delete a single file
- delete_directory_toolName suggests: deletes
- Delete a directory, optionally recursively
- move_file_toolName suggests: changes
- Move or rename a file or directory
- copy_file_tool
- Copy a file or directory
- search_files_toolName suggests: reads
- Search for files matching a pattern
- get_file_info_toolName suggests: reads
- Return metadata for a file or directory
What it does
- 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
Pricing
Open source
Open source on PyPI; licence file in the repo
Pathgate 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.


