
Bridge MCP
io.github.BarhamAgha1由 GitHub 账号 BarhamAgha1 发布v2.1.0更新于 Oct 25, 2026
Visual Desktop Bridge - Give any AI full control over Windows to automate apps and inputs.
概览
一个本地 MCP 服务器,让 AI 控制 Windows 电脑:启动应用、鼠标键盘输入、截图、执行命令、读写文件、剪贴板和 Chrome。
- 可以做什么
- 启动、切换、关闭、调整和列出应用程序,并发送鼠标点击、拖拽、滚动、输入文字、按键和快捷键,配合等待与对话框编排操作序列。截取屏幕、读取桌面状态、屏幕尺寸、光标位置,并从 Windows 辅助功能树定位界面元素。执行 PowerShell 和 CMD 命令,读取、写入和列出本机文件。控制 Chrome 与 Playwright 浏览器:打开、导航、点击和输入元素、按键、读取页面文本并截取浏览器画面。复制、粘贴和清空剪贴板,并把截图、窗口列表、日志和会话历史作为资源提供,附带预设提示模板。
- 适用场景
- 当你希望助手直接操作 Windows 桌面时使用,例如自动化没有 API 的图形界面程序、运行本地脚本,或在自己电脑上驱动浏览器。它适合实际桌面自动化,而非远程或无头服务器场景。
- 运行要求
- 在 Windows 上作为本地 Python 进程运行:克隆仓库、安装依赖并启动 local_agent.py,它监听 8006 端口且必须保持运行。需在 AI 客户端中以 bridge_mcp.py 的绝对路径配置该 MCP 服务器。Playwright 浏览器首次使用时下载;远程访问需要 ngrok 之类的隧道。
安装
在 SourceWeft 中
- 打开 控制台中的 Bridge MCP,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
🌉 Bridge MCP
Universal PC Control for Any AI
[FastMCP] [License] [Python] [Windows]
Give any AI complete control over your Windows PC
Features • Quick Start • Configuration • Tools • Troubleshooting • Contributing
🔄 How Persistence Works
Bridge MCP v2.0 stores agent registrations in a persistent JSON file:
- Windows:
%APPDATA%\bridge-mcp\agents.json - Linux/Mac:
~/.config/bridge-mcp/agents.json
This means:
- ✅ Register once, works forever
- ✅ Survives Claude Code session restarts
- ✅ Survives computer reboots
- ✅ Works across all AI clients
First-Time Setup
- Start the local agent:
-
The agent auto-registers itself - no manual registration needed!
-
Verify in any Claude session:
Troubleshooting
If you see "No agents connected":
- Check if local_agent.py is running - it must be running in a terminal
- Check health: Use
check_agent_health()tool - Manual register: Use
register_agent("local", "http://127.0.0.1:8006", "My PC")
Running Local Agent as Background Service
For always-on access, install local_agent as a Windows service:
To remove:
🎯 What is Bridge MCP?
Bridge MCP is a Model Context Protocol (MCP) server that gives any AI full control over a Windows PC. Whether you're using Claude, ChatGPT, Cursor, Gemini, or any other MCP-compatible AI, Bridge MCP lets you:
- 🖥️ Control Applications - Launch, switch, resize, close any app
- 🖱️ Automate Input - Mouse clicks, keyboard typing, hotkeys, scrolling
- 📸 See the Screen - Screenshots, UI element detection, desktop state
- 🌐 Browse the Web - Full Chrome automation and control
- ⚡ Run Commands - PowerShell, CMD, file operations
- 📋 Manage Clipboard - Copy, paste, clear
Think of it as giving your AI eyes and hands to control your computer!
✨ Features
Total: 40+ powerful tools for complete PC automation!
🏗️ Architecture
Bridge MCP uses a Relay Architecture to work across platforms:
- bridge_mcp.py - MCP server (runs locally or on FastMCP Cloud)
- local_agent.py - HTTP server on your PC that executes commands (port 8006)
🔒 Enterprise-Grade Security
Bridge MCP 2.0 includes:
- Auth Tokens: Uses secure Bearer tokens to prevent unauthorized access.
- Auto-Config: Tokens are auto-generated and saved to
agents.json.
🌐 Next-Gen Browser Automation
Powered by Playwright, Bridge MCP can now:
- Click & Type: Interact with any website element.
- Semantic Understanding: Read page content programmatically.
- Headless Mode: Run automations invisible or visible.
🧠 Semantic Computer Vision
Bridge MCP "sees" your apps:
- UI Tree: It can read the accessibility tree of Windows apps.
- Precision: Knows exactly where buttons are (no more guessing pixels).
🛡️ Safety Sentinel (Human-in-the-Loop)
Bridge MCP now puts YOU in control:
- Command Interception: Dangerous commands (writing files, running shell scripts) are BLOCKED by default.
- Approval Overlay: Approval requests appear directly in the AI Activity Overlay with three options:
- ✓ APPROVE - Execute this one command
- ✗ DENY - Block this command
- ✓ ALWAYS APPROVE - Disable Safe Mode and approve all future commands
- Dashboard Control: View all pending requests at
http://localhost:8006 - Safe Mode Toggle: Switch Safe Mode on/off anytime from the web dashboard
- Peace of Mind: You can leave the agent running without fear of it deleting your files.
👁️ Terminator Vision (Live Observability)
See what the AI sees, in real-time:
- Live Stream: The dashboard features a low-latency 1080p MJPEG stream of your desktop.
- Semantic Overlay: Green bounding boxes highlight every button, link, and window the AI detects.
- Debug Instantly: Visual confirmation that the AI has found the correct "Submit" button.
📚 Full MCP Specification Support
Bridge MCP now implements the complete Model Context Protocol specification:
Resources API
Expose desktop data as addressable resources:
desktop://screenshot/latest- Current screenshotdesktop://windows- Open windows listdesktop://logs- Agent command logsfile:///{path}- Read any desktop filedesktop://session/context- Recent session history
Prompts API
Pre-built workflow templates for one-click automation:
automate_desktop_task- Step-by-step task automationdebug_error- Interactive error debuggingweb_automation- Playwright web workflows
Session Memory
Never lose context:
- Stores last 100 commands across restarts
- Provides AI with recent session history
- Enables "continue where I left off" workflows
🚀 Quick Start
Step 1: Clone the Repository
Step 2: Install Dependencies
Note: Playwright browsers (~100MB) auto-install on first use - no manual setup needed!
Step 3: Start the Local Agent
Keep this terminal open! The agent will display:
Step 4: Configure Your AI Client
See Configuration below for Claude Desktop, Cursor, or VS Code setup.
Step 5: Register Your Agent
In your AI conversation, register the local agent:
Step 6: Start Controlling!
Now use any tool like screenshot(), click(100, 200), type_text("Hello"), app_launch("notepad"), etc.
🔧 Configuration
Claude Desktop
-
Open the config file at
%APPDATA%\Claude\claude_desktop_config.json -
Add Bridge MCP:
⚠️ Important: Replace the path with the actual location where you cloned the repository!
Example paths:
C:\\Users\\PC\\Desktop\\Bridge-MCP\\bridge_mcp.pyD:\\Projects\\Bridge-MCP\\bridge_mcp.py
- Restart Claude Desktop completely (close and reopen)
Cursor
Add to your MCP settings in Cursor preferences with the same configuration format.
VS Code + Claude Code
Create .vscode/mcp.json in your project:
Remote Access (Optional)
To control your PC from anywhere, expose the local agent with ngrok:
Then use the ngrok URL (e.g., https://xxxx.ngrok.io) as your callback_url when registering.
🛠️ Available Tools
🚀 App Control Tools
🖱️ Input Tools (Mouse & Keyboard)
📸 Screen Tools
⚡ System Tools
🌐 Browser Tools (Chrome)
🌐 Browser Tools (Playwright - Advanced)
📋 Clipboard Tools
💡 Usage Examples
Example 1: Open Notepad and Write Text
Example 2: Take a Screenshot
Example 3: Search on Google
🔧 Troubleshooting
Claude Desktop shows "Server disconnected"
-
Check the path - Make sure the path in your config points to the actual
bridge_mcp.pyfile. The path must be absolute and use double backslashes (\\) in JSON. -
Test manually - Open Command Prompt and run:
It should stay running (not exit immediately). Press Ctrl+C to stop.
- Install dependencies:
- Restart Claude Desktop - Fully close and reopen after any config changes.
Local agent not receiving commands
- Make sure
local_agent.pyis running in a terminal (keep it open!) - Verify the callback URL is correct when registering the agent
- For local use:
http://127.0.0.1:8006 - For remote access: Use ngrok (
ngrok http 8006) and use the ngrok URL
"No agents connected" error
You need to register your local agent first:
Unicode/Emoji errors on Windows
If local_agent.py crashes with Unicode errors, the terminal may not support emojis. This has been fixed in the latest version.
☁️ FastMCP Cloud Deployment
Bridge MCP can be deployed on FastMCP Cloud for easy access:
- Fork this repository
- Go to fastmcp.cloud
- Sign in with GitHub
- Create project from your forked repo
- Set entrypoint:
bridge_mcp.py - Deploy!
Your MCP will be available at: https://your-project.fastmcp.app/mcp
🤝 Contributing
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Ideas for Contributions
- Add more browser support (Firefox, Edge)
- Add Linux support
- Add macOS support
- Add more automation tools
- Improve UI element detection
- Add OCR capabilities
📜 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
👤 Author
Barham Agha
- GitHub: @BarhamAgha1
⭐ If you find this project useful, please give it a star! ⭐
Made with ❤️ for the AI community
来源:README.md,提交 76e55e9
工具
0版本历史
1- v2.1.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分