Provides AI clients with controlled filesystem access to read, write, search, and manage files within explicitly allow-listed directories.
Also known as geekgod382/pathgate
- Stars
- 2
- Tools
- 10
- Downloads, 30 days
- 654
- Latest version
- 0.2.5
- Last commit
- Nov 14, 2026
- License
- MIT
What is Pathgate MCP?
Pathgate provides AI clients with controlled filesystem access to read, write, search, and manage files within explicitly allow-listed directories. It exposes 10 tools, such as read_file_tool, write_file_tool, list_directory_tool.
Summary generated from the project's README
About Pathgate MCP server
Pathgate provides a controlled filesystem interface for AI clients like Claude Desktop, Cursor, and VS Code. It allows these tools to interact with your local files through a secure layer that only permits access to directories you explicitly allow-list at startup. By resolving symlinks and using realpath checks, the server ensures that operations remain strictly within your designated boundaries.
Users can manage files using specific tools such as read_file_tool, write_file_tool, list_directory_tool, and search_files_tool. The server also supports directory creation, deletion, moving, and copying. For added safety, you can run the server in a read-only mode to prevent any mutating operations or use a dry-run flag to preview changes before they happen.
Setup is handled via uvx or by setting the FS_MCP_ALLOWED_PATHS environment variable. You can install it directly into your configuration using the install command, which supports multiple paths separated by semicolons on Windows or colons on macOS and Linux.
What you can do with it
- 1Search for specific file typesAsk the AI to find all Python files within a specific project directory.
- 2Perform safe file inspectionsRequest the AI to read the contents and metadata of a specific text file.
- 3Automate file creationInstruct the client to generate a new file with specific text content in a document folder.
- 4Restrict AI to read-only accessRun the server in a mode where the AI can view files but cannot modify or delete them.
Written from the project's README. Every use case is checked against a quote from it.
How to install Pathgate MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall Pathgate MCP in Claude Code
$ claude mcp add pathgate -- uvx pathgateInstall Pathgate MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"pathgate": {
"command": "uvx",
"args": [
"pathgate"
]
}
}
}Install Pathgate MCP in VS Code
.vscode/mcp.json
{
"servers": {
"pathgate": {
"type": "stdio",
"command": "uvx",
"args": [
"pathgate"
]
}
}
}Install Pathgate MCP in VS Code CLI
$ code --add-mcp '{"name":"pathgate","type":"stdio","command":"uvx","args":["pathgate"]}'Install Pathgate MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"pathgate": {
"command": "uvx",
"args": [
"pathgate"
]
}
}
}Install Pathgate MCP in Codex
$ codex mcp add pathgate -- uvx pathgateInstall Pathgate MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.pathgate] command = "uvx" args = ["pathgate"]
Install Pathgate MCP in Gemini CLI
$ gemini mcp add -s user pathgate uvx -- pathgateInstall Pathgate MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"pathgate": {
"command": "uvx",
"args": [
"pathgate"
]
}
}
}Pathgate MCP tools 10
Detected from the READMEread_file_toolwrite_file_toollist_directory_toolcreate_directory_tooldelete_file_tooldelete_directory_toolmove_file_toolcopy_file_toolsearch_files_toolget_file_info_tool
| read_file_tool | — | |
| write_file_tool | — | |
| list_directory_tool | — | |
| create_directory_tool | — | |
| delete_file_tool | — | |
| delete_directory_tool | — | |
| move_file_tool | — | |
| copy_file_tool | — | |
| search_files_tool | — | |
| get_file_info_tool | — |
Automated checks
Ran Nov 14, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work
- Source repository linked and reachablegeekgod382/pathgate is public and reachablegithub.com/geekgod382/pathgate ↗Pass
- Package names this repository as its sourceNot checked
- Build provenance (Sigstore attestation)No build attestation published for this releaseNot checked
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-11-14github.com/geekgod382/pathgate ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNo popular package one edit away from pathgatePass
- No critical advisory in the package or its dependenciesthe package checked; no critical advisoryosv.dev ↗Pass
- No hidden instructions to the model10 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNot checked
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubPathgate
pathgate is a Python Model Context Protocol (MCP) server that exposes a controlled filesystem interface to MCP clients such as Claude Desktop, Cursor, VS Code, and inspector tools. The server only permits access to directories that are explicitly allow-listed at startup.
What it does
The server exposes:
- File resources via
file://... - Directory resources via
directory://... - Tools for reading, writing, listing, creating, deleting, moving, copying, searching, and inspecting files/directories
- Built-in prompts for directory analysis and file discovery
Security model
Access is restricted by allow-listed paths. At startup, the server resolves the supplied paths and only permits operations within those directories.
- Paths are checked with
os.path.realpath()and prefix matching - Symlinks are resolved before comparison
- The server can be run in read-only mode to disable mutating operations
Installation
Pathgate package is published on PyPI. To use it, for example with Claude Desktop, add this in the
{
"mcpServers": {
"pathgate": {
"command": "uvx",
"args": ["pathgate@latest", "C:\\Users\\me\\Documents"]
}
}
}
Or, you can use the install command to directly write the config file
uvx pathgate install <paths>
paths should have nothing between them
uvx pathgate install C:\Users\me\Documents C:\Users\me\Projects
When no paths are given, it prompts you for them.
Options
--read-only:writes the safer variant of the entry.--dry-run: shows what it would write and changes nothing.--yes: skips the confirmation prompt.--name: sets a different entry name (default pathgate).--config PATH: I build this mcp server for Claude primarily. Using this option edits a specific file, which also works for other clients that use the same mcpServers shape.
Updating
You don't need to manually update it. The command does that for you.
Usage
Start with allowed directories
uvx pathgate "C:\Users\<username>\Documents" "C:\Users\<username>\Projects"
Read-only mode
uvx pathgate --read-only "C:\Users\<username>\Documents"
Environment variable alternative
$env:FS_MCP_ALLOWED_PATHS = "C:\Users\<username>\Documents;C:\Users\<username>\Projects"
uvx pathgate
On macOS/Linux, use : instead of ; for the path separator.
Tools
The current implementation exposes these tools:
read_file_tool— read a file and return its content, size, and encodingwrite_file_tool— write content to a filelist_directory_tool— list directory contents, optionally recursivelycreate_directory_tool— create a directory tree if neededdelete_file_tool— delete a single filedelete_directory_tool— delete a directory, optionally recursivelymove_file_tool— move or rename a file/directorycopy_file_tool— copy a file/directorysearch_files_tool— search for files matching a patternget_file_info_tool— return metadata for a file or directory
Example requests
Once connected, clients can ask:
List the files in C:\Users\<username>\Documents
Read C:\Users\<username>\Documents\notes.txt
Search for *.py files under C:\Users\<username>\Projects
Create a file at C:\Users\<username>\Documents\todo.txt with the content "Ship release"
Project layout
pathgate/
├── pathgate/
│ ├── __init__.py
│ ├── __main__.py
│ ├── config.py
│ ├── prompts.py
│ ├── resources.py
│ ├── server.py
│ ├── tool_schemas.py
│ └── tools.py
├── tests/
│ └── test_server.py
├── pyproject.toml
├── README.md
└── LICENSE
Requirements
- Python 3.10+
mcp>=2
References
Pathgate MCP questions
How do I add Pathgate MCP to Claude Code?
Run claude mcp add pathgate -- uvx pathgate in your terminal. Add --scope user to make it available in every project.
How do I add Pathgate MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
What tools does Pathgate MCP provide?
It exposes 10 tools, including read_file_tool, write_file_tool, list_directory_tool, create_directory_tool, delete_file_tool.
How does Pathgate ensure security?
Access is restricted to specific directories that you explicitly allow-list at startup, using realpath resolution and prefix matching to prevent unauthorized access.
Can I use Pathgate in a mode that prevents file changes?
Yes, you can run the server in read-only mode to disable all mutating operations.
What tools are available through Pathgate?
The server provides tools for reading, writing, listing, creating, deleting, moving, copying, searching, and inspecting files and directories.