mcp-agent-bridge
Enables Notion to act as a coding frontend by providing MCP tools for filesystem operations and terminal command execution on the local machine, with active project switching and authentication.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
MCP Agent Bridge
Two MCP servers that give an AI agent real hands on this Windows machine - one for files, one for commands, background jobs and skills - with token auth, live project switching, an undo history and an optional Cloudflare Tunnel for remote clients. Pure Python, with a PySide6 control panel.
See ARCHITECTURE.md for the design and the reasoning behind it.
Works with
Any MCP client that can reach a remote (streamable HTTP) server and send a
Bearer token - for example Notion AI custom connections, Claude Code,
Cursor or VS Code. A client on the same machine can use
http://127.0.0.1:9500/mcp and http://127.0.0.1:9501/mcp directly; the
tunnel is only needed for clients that run elsewhere.
Related MCP server: PC Controller MCP Server
Quick start (Windows)
Python 3.10+ from python.org (tick "Add python.exe to PATH"), then in the project folder:
pip install -r requirements.txtcloudflared (only for remote clients):
winget install Cloudflare.cloudflaredCreate the shortcuts once - nothing is built or installed:
python tools\make_shortcuts.py :: add --desktop for desktop copiesMCP Agent Bridge opens the panel without a console window (log in
logs\bridge.log); MCP Agent Bridge (debug) keeps a console open with the live log and any traceback. Shortcuts hold absolute paths, so run the script again after moving or renaming the folder.start_gui.batandpython -m gui.appstill work too.On the Tunnel page set the base domain and your user prefix, point it at your cloudflared
config.yml, then press Start everything at the top of the sidebar.Open Setup guide: it has the endpoint URLs, the token, a config snippet and a ready-made "connect an MCP server" request to copy.
Headless:
python run_core.py :: servers + tunnel
python run_core.py --no-tunnel :: local only
python run_core.py --print-config :: token, ports, projects, endpointsSettings-only commands (safer than editing the JSON by hand):
python run_core.py --set-tunnel-config "C:\Users\<you>\.cloudflared\config.yml"
python run_core.py --domain example.com --user-slug alex
python run_core.py --enable-tunnel
python run_core.py --disable-tunnel
python run_core.py --enable-backups
python run_core.py --regenerate-tokenOnly one instance can hold the ports: do not run run_core.py and the
control panel at the same time. A second panel refuses to start.
When sharing the folder, leave out config/settings.json (it holds your
token and is recreated on first launch), logs/, .mcp-runs/,
.mcp-backups/ and __pycache__/.
Tools
Files System (port 9500)
Tool | What it does |
| Paged text read ( |
| Several files in one call, each paged |
| Create or replace; keeps the existing line endings and BOM |
| Exact snippet replace ( |
| Listing (capped) and metadata |
| Glob and regex search, skipping |
| The usual, with undo |
| Undo history (when backups are enabled) |
| Base64 zip transfer to and from an agent's own sandbox - for images, PDFs, office files, whole folders |
Terminal (port 9501) - commands go through cmd.exe
Tool | What it does |
| Runs a command and waits up to 45 s; if it is still running it stays alive in the background and the reply gives its job id |
| Starts a dev server, watcher or long build in the background |
| Waits for a job and returns early when it ends or a line matches |
| Job output (paged or |
| The default folder, whether outside access is allowed, other projects |
| Global skills - the bridge's own ( |
| Telegram "task finished" message, if configured |
Every result is sent once, as plain text. (FastMCP's default also sends a structured copy, which doubles what the agent pays for each reply.)
Projects and paths
The active project is the default for relative paths and for commands
without cwd. It is read on every call, so switching takes effect at
once - for every connected agent, because they all share this machine.
Agents should therefore use absolute paths. File tools refuse paths
outside the active project unless security.allow_outside_project is on.
Security
The token is full control of this PC.
run_commandruns anything the user can run, so the path checks of the file tools are a convenience, not a sandbox. Keep the token secret; regenerate it if it leaks.Every request needs
Authorization: Bearer <token>(X-API-KeyandX-Auth-Tokenalso work). 20 wrong tokens from one address within five minutes block that address for 15 minutes (HTTP 429); behind the tunnel the real address comes fromCF-Connecting-IP./healthneeds no token and reveals only{"status", "server"}.An accident guard (
security.block_dangerous_commands, on by default) refuses a short list of commands that wreck a machine (format,diskpart,shutdown, deleting a drive root, ...) or kill this app or its tunnel (taskkill /im python.exe,cloudflared tunnel delete, ...).Agents cannot overwrite
config/settings.jsonthrough the file tools (security.allow_settings_edit).
Settings
config/settings.json is created on first run. Prefer the panel or the
CLI flags: an invalid file is moved aside as settings.broken.json and
replaced with defaults. Useful keys:
Key | Default | Meaning |
| 45 | How long |
| 100000 | Cap on one command output or file page |
| 900 | Default page size of |
| 5000000 | Largest image |
| 25 | Largest |
| 900 | Drop MCP sessions idle this long |
| false | Let file tools leave the active project |
| true | Accident guard |
| false | Keep the undo history in |
Logs
The panel's Activity page shows one line per tool call (tool, key
arguments, duration, error) plus server and tunnel events; long lines wrap
under their message. Calls shows only tool calls, Problems only warnings
and errors. Everything also goes to logs/bridge.log (rotated at about
1 MB), including cloudflared's start-up details, which the panel leaves
out. cloudflared lines that only mean a client hung up ("context
canceled", "stream ... canceled by remote with error code 0") are dropped.
Cloudflare Tunnel
One-time setup, with your own tunnel name and hostnames:
cloudflared tunnel login
cloudflared tunnel create mcp-agent-bridge
cloudflared tunnel route dns mcp-agent-bridge alex-files.example.com
cloudflared tunnel route dns mcp-agent-bridge alex-term.example.comIngress in the cloudflared config, keeping http_status:404 last:
tunnel: mcp-agent-bridge
credentials-file: C:\Users\<you>\.cloudflared\<tunnel-id>.json
ingress:
- hostname: alex-files.example.com
service: http://localhost:9500
- hostname: alex-term.example.com
service: http://localhost:9501
- service: http_status:404cloudflared runs as a child process of the panel: it starts with it and
stops when the panel exits. A wildcard CNAME (* -> your tunnel) lets
every teammate pick a prefix without touching DNS.
Tests
Plain scripts, each safe to run while the real panel is live (throwaway settings, ports 9400/9401 at most):
python tests\tools_test.py :: tool behaviour through FastMCP
python tests\smoke_test.py :: both servers over HTTP: auth, tool lists, /health
python tests\jobs_test.py
python tests\backups_test.py
python tests\test_notifier.pyTool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Connect ChatGPT, Claude, Cursor or VS Code to your Windows PC: files, terminal, browser, apps.
Connect ChatGPT and Claude to your Mac, Windows or Linux with secure MCP remote access.
- DNS-DATA RemoteDeprecatedcom.dns-data
Connect AI assistants to authorized Windows and macOS devices for files, commands, and management.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI clients to execute Windows commands, manage files, query system information, and perform code checks via MCP protocol.241Business Source 1.1
- AlicenseAqualityCmaintenanceEnables AI assistants to control Windows PCs by executing shell commands, managing files, capturing screenshots, and monitoring system information through a comprehensive set of MCP tools.181MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI clients to securely control and interact with a local Windows machine through 218 configurable tools for files, Git, processes, Windows UI, browser automation, WSL, Office, recovery, skills, and child MCP servers.8 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables ChatGPT on Windows to securely access codebases, Git, terminals, language servers, debuggers, SQLite, local HTTP services, adaptive project memory, engineering skills, checkpoints, audit logs, and sandboxed command execution through MCP tools.MIT