file-bridge
One-line summary: File Bridge exposes six stdio-only, folder-scoped file tools (read, list, search, glob, write, patch) that let an AI assistant work with the files inside a single root directory.
read_file— read a text file in any language/legacy Windows encoding; binary files come back base64-encoded withis_binary=True; per-call encoding andmax_sizeoverrides (can only lower the configured cap).list_dir— list a folder, optionally recursive (max_depthup to 100), with a glob name filter and hidden-file inclusion; returns name, relative path, size, modified time, and dir/file/symlink flags.search_files— content search via ripgrep: regex or plain pattern, file glob filter, case sensitivity, up to 10 context lines, capped atmax_results(withtruncatedflag).glob— find files by pattern (e.g.**/*.md); patterns cannot contain..; up to 10,000 results.write_file— create/overwrite a file atomically (temp file + rename), optionally creating parent directories; refused in read-only mode (the default).patch_file— replace an exact string, preserving encoding and line endings, atomically, returning the replacement count; refused in read-only mode.Safety constraints that bound all of the above — every resolved path must stay inside the single configured root (
FILE_BRIDGE_ROOT_PATH, required; whole drives/home folders refused); symlinks/junctions pointing outside are neither listed, searched, nor read; files over the max size (default 10 MB) are rejected.Write protections — writes are atomic and the previous version is kept in
.file-bridge/versions, which the AI cannot modify (FILE_BRIDGE_BACKUP_ON_WRITE, default on).Operational limits — stdio transport only: no ports opened, no network calls; logs go to stderr; configuration via
FILE_BRIDGE_*env vars.
File Bridge
A small local MCP server that lets an AI assistant (Claude Desktop, Cursor, VS Code) read and search the files in one folder you choose. It is read-only unless you switch writing on, and it makes no network connections of its own.
What it does not do: when your AI assistant reads a file through the bridge, the assistant sends that text to its own provider (Anthropic, OpenAI, …) under that provider's terms. File Bridge controls which files the assistant can reach; it does not hide their contents from the assistant.
Need client details kept away from the AI? Airgap Private Desk is our Windows app built on this bridge: it replaces names, addresses and account numbers with placeholders before the AI sees a document, and fills them back in on your PC when the AI saves a draft.
Build status: UNSIGNED INTERNAL (no Authenticode certificate yet). See proof-pack/SIGNING.md.
Client / COLP install guide (plain English): CLIENT-README.md.
Quick start (Windows - recommended)
One-command installer (setup may use the internet once; the running bridge makes no network connections):
powershell -ExecutionPolicy Bypass -File .\installer\Install-FileBridge.ps1 -RootPath "C:\Path\To\Your\Files"Add -AllowWrites if the AI should be able to create and edit files. Without it the bridge is read-only.
Post-install smoke test:
powershell -ExecutionPolicy Bypass -File .\scripts\self_test.ps1 -RootPath "C:\Path\To\Your\Files"Details: installer/README.md. Zero-egress proof: proof-pack/.
Uninstall (also removes the connector entries it added to Claude Desktop and Cursor):
powershell -ExecutionPolicy Bypass -File .\installer\Uninstall-FileBridge.ps1Related MCP server: Octofs
Advanced / developer install
pip install airgap-file-bridge
FILE_BRIDGE_ROOT_PATH=/path/to/files airgap-file-bridge --check--check confirms the configuration and exits. --version prints the version.
MCP client config (Claude Desktop, Cursor, VS Code)
Prefer the Windows installer when possible (it writes a local launcher for you). Manual example for Windows, using the full path to the executable:
{
"mcpServers": {
"file-bridge": {
"command": "C:\\Path\\To\\venv\\Scripts\\airgap-file-bridge.exe",
"env": {
"FILE_BRIDGE_ROOT_PATH": "C:/Path/To/Files",
"FILE_BRIDGE_READ_ONLY": "true"
}
}
}
}macOS / Linux, if the command is on PATH:
{
"mcpServers": {
"file-bridge": {
"command": "airgap-file-bridge",
"env": { "FILE_BRIDGE_ROOT_PATH": "/path/to/files" }
}
}
}Configuration
Environment prefix: FILE_BRIDGE_*. Legacy FILESYSTEM_MCP_* names still work when the matching FILE_BRIDGE_* value is unset.
Environment variable | Default | Description |
| (required) | The one folder the AI may use. The bridge will not start without it, and refuses a whole drive or your entire user folder. |
|
| Set to |
|
| Keep the previous version of a changed file in |
| 10 MB | Max file size for operations. A tool call can lower it, never raise it. |
|
| Allow paths through symlinks. Links can never lead outside the folder either way. |
|
| Accept absolute paths (they must still be inside the folder). |
|
| Text encoding. Files saved in older Windows encodings are read automatically. |
|
| Allow a drive root or home folder as the root (not advised). |
|
|
|
Tools
Tool | Description |
| Read a text file (any language, including older Windows encodings). Binary files come back base64-encoded. |
| List a folder, optionally recursively, with a name filter and a depth limit. |
| Search file contents with ripgrep: regex or plain text, context lines, file filters. |
| Find files by pattern, e.g. |
| Write a file atomically. Read-only mode refuses it. |
| Replace exact text. Must match exactly once unless you say otherwise. Keeps encoding and line endings. Read-only mode refuses it. |
Safety behaviour
Every path is resolved and must stay inside the folder. Folder links (symlinks and NTFS junctions) that lead elsewhere are not listed, searched or read.
Search terms are always passed to ripgrep as patterns, never as options, and ripgrep cannot read the MCP channel.
Writes are atomic, and the previous version is kept in
.file-bridge/versions, which the AI cannot change.The bridge talks over stdio only. It opens no ports and makes no network calls.
Development
pip install -e ".[dev]"
pytest -v
ruff check src/ tests/
mypy --config-file mypy.ini --strict src/filesystem_mcpSearch tests need ripgrep (rg) on PATH.
License
MIT
Available Tools
6 toolsglobA
Find files matching a glob pattern.
Uses pathlib's glob matching. Supports recursive patterns (**), hidden file filtering, and result limiting.
Inputs: request (required). Returns: Response model for glob tool.
list_dirC
List directory contents with optional filtering.
Supports glob pattern filtering, recursive listing, hidden file inclusion, and configurable recursion depth.
Inputs: request (required). Returns: Response model for list_dir tool.
patch_fileA
Apply a targeted patch to a file.
Finds all occurrences of old_str and replaces them with new_str.
Uses atomic write. Returns the number of replacements made.
Inputs: request (required). Returns: Response model for patch_file tool.
read_fileA
Read a file from the filesystem.
Returns the file content as text. Binary files are returned as base64-encoded strings
with is_binary=True. Supports configurable size limits and encoding.
Inputs: request (required). Returns: Response model for read_file tool.
search_filesA
Search file contents using ripgrep (rg).
Requires ripgrep to be installed on the system. Supports regex patterns, glob filtering, case sensitivity, context lines, and result limiting.
Inputs: request (required). Returns: Response model for search_files tool.
write_fileA
Write content to a file atomically.
Creates parent directories by default. Uses atomic write (temp file + rename) by default to prevent partial writes. Supports configurable encoding.
Inputs: request (required). Returns: Response model for write_file tool.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Most tools have clear boundaries, but list_dir and glob overlap significantly: list_dir supports glob filtering, and glob finds files matching patterns, making it easy for an agent to confuse them. read_file, write_file, patch_file, and search_files are otherwise distinct.
Most tools follow a consistent verb_noun pattern like read_file, write_file, and search_files. The exception is glob, which uses a domain-specific single-word name rather than a verb_noun form, creating a minor deviation.
Six tools is a well-scoped size for a file manipulation server. Each tool targets a core file operation without unnecessary redundancy or bloat.
The set covers read, write, patch, listing, searching, and glob matching, which supports most common file workflows. Missing operations like delete, move, or stat are minor gaps that agents can typically work around with existing tools.
Maintenance
Related MCP Connectors
Remote MCP server for notes, tasks, kanban boards and docs - the Slates agentic workspace
Hosted MCP server for Obsidian Sync vaults: read, search, edit notes. Not affiliated with Obsidian.
Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceLocal-first MCP server for safely searching, reading, summarizing, tagging, deduplicating, and organizing local files with scoped access, read-only defaults, and dry-run plans.19MIT
- AlicenseNot gradedqualityAmaintenanceThe fastest, most capable filesystem MCP server built in Rust, giving AI agents superpowers to read, search, edit, and manage files and directories.23Apache 2.0
- AlicenseNot gradedqualityBmaintenanceA local filesystem MCP server providing constrained file operations (read/write, directory management, search, metadata) within configurable directories, with read-only mode and zero runtime dependencies.4 npmMIT
- AlicenseCqualityBmaintenanceLocal-first MCP runtime for coding agents with bounded workspace access, content-preconditioned writes, AST search, LSP navigation and diagnostics, and Git status/diff. Designed to give coding agents useful repository access without treating unrestricted shell access as the default integration boundary.133MIT
Appeared in Searches
- A server for accessing or managing a filesystem
- What is a filesystem server and how to find one? A filesystem server implements a protocol like 9P, NFS, or SMB to serve files to clients. Search GitHub for 'filesystem server', look at projects such as pyd-fuse servers, Go-based go-fuse servers, Rust 'fuser' servers, or Python 'mux9p'. The query 'filesystem server' commonly refers to the Model Context Protocol (MCP) filesystem server, an open-source reference implementation (e.g., from the modelcontextprotocol/servers repository) that exposes local files to AI assistants.