geekgod382

Pathgate

Community geekgod382
Updated

Pathgate is a MCP server which gives AI tools access to your filesystem

Pathgate

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", "C:\\Users\\me\\Documents"]
    }
  }
}

This is just an example script

Usage

Start with allowed directories

pathgate "C:\Users\<username>\Documents" "C:\Users\<username>\Projects"

Read-only mode

pathgate --read-only "C:\Users\<username>\Documents"

Environment variable alternative

$env:FS_MCP_ALLOWED_PATHS = "C:\Users\<username>\Documents;C:\Users\<username>\Projects"
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 encoding
  • write_file_tool — write content to a file
  • list_directory_tool — list directory contents, optionally recursively
  • create_directory_tool — create a directory tree if needed
  • delete_file_tool — delete a single file
  • delete_directory_tool — delete a directory, optionally recursively
  • move_file_tool — move or rename a file/directory
  • copy_file_tool — copy a file/directory
  • search_files_tool — search for files matching a pattern
  • get_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

MCP Server · Populars

MCP Server · New

    roman-rr

    Trading Signals

    17 triggers × 44 algorithms × 3 AI experts — live crypto trading signals with reasoning for Claude Code, Codex, Cursor & 30+ agents. Free key; Pro adds entry, SL and TP.

    Community roman-rr
    OyadotAI

    Oya Browser

    The browser control plane for AI agents. One API over Oya Cloud, Browserbase, Steel, Anchor, Browser Use and your own Chrome, with persistent personas, CAPTCHA and MFA handling, and live human takeover.

    Community OyadotAI
    unibaseio

    Membase

    Memory layer for AI agents — SDKs, CLI and MCP server for Membase

    Community unibaseio
    EternalNight996

    🧠 memory-eternal — a second brain for your AI

    Your AI forgets every session. Give it a memory you can audit: local-first, review-gated agent memory — one SQLite vault for DSH, Claude Code, Codex, Cursor, OpenClaw, Hermes and MengBot (any MCP client), with an immutable audit log and a token ledger. Agents propose, humans approve. MIT, self-hosted, no cloud.

    Community EternalNight996
    quarkiverse

    Model Context Protocol Servers in Quarkus/Java

    Model Context Protocol Servers in Quarkus

    Community quarkiverse