MCP Gateway
Unified MCP tool gateway for agents to access WebPilot browser tools and other backend capabilities via an Electron tray application.
README
MCP Gateway
统一 MCP 工具网关 — Agent 通过它访问 WebPilot 浏览器工具及其他后端能力 给 Agent 用的 Electron 托盘应用
快速开始
# 1. 安装依赖
cd "C:\Users\13952\Desktop\cursor 工作\mcp-gateway"
npm install
# 2. 启动 Electron 托盘应用
npm run electron
启动后:
- 系统托盘中出现 MCP Gateway 图标
- Agent 可通过
http://127.0.0.1:9223/mcp连接 - 如果 WebPilot 项目已安装依赖,Gateway 会自动拉起它并暴露 79 个浏览器工具
架构
Agent (oh-agent-company 角色)
│ MCP 协议 (tools/list, tools/call)
▼
MCP Gateway (:9223)
├── Registry (工具注册表)
├── WebPilot Bridge → WebPilot daemon (:9224 MCP / :9225 HTTP) → Chrome (:9222 CDP)
└── [可插拔] 其他后端
端口
| 端口 | 服务 | 说明 |
|---|---|---|
| 9223 | Gateway MCP | Agent 连接端点 |
| 9224 | WebPilot MCP | WebPilot 内部 MCP (由 Gateway 管理) |
| 9225 | WebPilot HTTP | WebPilot HTTP API (由 Gateway 代理) |
目录结构
mcp-gateway/
├── package.json
├── electron/
│ └── main.cjs # Electron 主进程 (单实例锁 + 托盘 + 启动 Gateway)
├── src/
│ ├── server.js # MCP Gateway 核心 (StreamableHTTP Server)
│ ├── registry.js # 工具注册表
│ └── webpilot-bridge.js # WebPilot 子进程管理 + 工具代理
└── resources/
健康检查
curl http://127.0.0.1:9223/health
# => { "status": "ok", "backends": [...], "toolCount": 79 }
开发
# 独立运行 (不带 Electron 托盘)
node src/server.js
# 环境变量
GATEWAY_PORT=9223 # Gateway 监听端口
前置要求
- Node.js >= 22
- WebPilot-v4.0.1-handoff 项目 (
npm install在该目录下也需执行) - Chrome (需开启
--remote-debugging-port=9222)
与 oh-agent-company 的集成
已更新的角色 (可使用 WebPilot MCP 工具):
| 角色 | 事业部 | 用途 |
|---|---|---|
| web-tester | 02-科技与工程 | 浏览器自动化测试 |
| qa-engineer | 02-科技与工程 | bug 复现、回归测试 |
| security-auditor | 02-科技与工程 | 客户端安全扫描 |
| market-researcher | 01-经济与产业 | 在线竞品调研 |
| deep-researcher | 13-基础学科与人类科学 | 多源在线检索 |
| academic-researcher | 03-教育与学术 | 学术数据库检索 |
详见 ../oh-agent-company/oh-agent-company/共享/场景模板/09-浏览器自动化测试.md
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.