How to Integrate a New MCP Server for Browser Automation or HTTP Capture in reverse‑skill
Integrating a new MCP server in reverse‑skill requires registering the server in bootstrap‑manifest.json, running ToolDiscovery.ps1 to populate the tool index, and adding a routing entry in routing.md so the AI agent can discover and invoke the server automatically.
The reverse‑skill repository implements a flexible MCP (Model Context Protocol) integration layer that treats external servers as first‑class tools. The architecture separates concerns into discovery, bootstrap, routing, and execution phases, allowing security researchers to plug in custom browser automation or HTTP capture capabilities with minimal configuration.
Understanding the MCP Integration Architecture
The system flow is documented in [docs/ARCHITECTURE.md](https://github.com/zhaoxuya520/reverse-skill/blob/main/docs/ARCHITECTURE.md) and consists of four stages:
- Tool discovery – The engine reads
tool‑index.mdat skill startup to locate available MCP servers. - Bootstrap – Missing servers are installed automatically via
bootstrap‑manifest.jsonrecipes. - Routing –
routing.mdmaps task categories to specific MCP endpoints. - Execution – Skills invoke servers via JSON‑RPC over HTTP (default
http://127.0.0.1:23816).
This design means integrating a new MCP server for browser automation or HTTP capture does not require changes to core engine code—only declarative configuration updates.
Step‑by‑Step MCP Server Integration
Follow these five steps to add any MCP server, whether for Playwright‑based automation or HTTP proxy capture.
1. Register the Server in the Bootstrap Manifest
Add an entry to the platform‑appropriate manifest file:
- Windows:
skills/scripts/bootstrap‑manifest.json - Kali Linux:
kali/scripts/bootstrap‑manifest.json
Example entry for a custom browser‑automation MCP:
{
"name": "my-browser-mcp",
"type": "npm-mcp",
"install": "npx my-browser-mcp --port 3000",
"url": "http://127.0.0.1:3000"
}
Supported installation types include winget, apt, github-release, npm, and direct binary download. The install field specifies how to launch the server; the url field tells the router where to send JSON‑RPC requests.
2. Populate the Tool Index
Run the discovery script to ingest the server's tool‑manifest.json:
# Windows
.\skills\scripts\ToolDiscovery.ps1
# Linux
./kali/scripts/discover-tools.sh
These scripts read ~/.mcp/*/tool-manifest.json and append entries to tool‑index.md, establishing the server's method signatures and endpoint URLs for the routing layer.
3. Extend the Routing Matrix
Edit skills/routing.md (or skills/routing_zh.md for Chinese localization) to link task types to your new MCP:
| Browser automation | my-browser-mcp | Playwright-based automation for dynamic SPAs |
| HTTP capture | my-capture-mcp | MITM proxy with request/response logging |
Place entries under the Web / 浏览器 section to ensure the router selects your MCP when skills request browser or network operations.
4. (Optional) Add Reference Documentation
Create a skill‑specific reference sheet under skills/browser-automation/references/ documenting available methods:
navigate– Load URL with wait conditionsclick– Element interactionintercept– Request/response modificationcapture– Traffic recording to file
Link this from the skill's README.md to assist future contributors.
5. Verify with Smoke Tests
Execute the integration test suite:
# Windows
powershell -NoProfile -ExecutionPolicy Bypass -File skills/scripts/smoke.ps1
# Linux
bash kali/scripts/smoke.sh
Successful completion confirms the router locates the new MCP and that sample method calls return valid JSON‑RPC responses.
JSON‑RPC Method Signatures for Browser and HTTP Operations
Skills communicate with MCP servers using standard JSON‑RPC 2.0 envelopes. The exact methods depend on the server's tool‑manifest.json, but typical patterns include:
Browser navigation:
{
"jsonrpc": "2.0",
"id": "12345",
"method": "browser.navigate",
"params": {
"url": "https://example.com",
"waitUntil": "networkidle"
}
}
HTTP capture initiation:
{
"jsonrpc": "2.0",
"id": "abcde",
"method": "http.capture",
"params": {
"filter": ".*api/v1/.*",
"duration": 30
}
}
The bootstrap process validates that declared methods in tool‑manifest.json are reachable before marking the server as available.
Key Files and Their Roles
| File | Purpose |
|---|---|
docs/ARCHITECTURE.md |
System‑level flow documentation |
skills/scripts/bootstrap‑manifest.json |
Windows MCP installation recipes |
kali/scripts/bootstrap‑manifest.json |
Linux MCP installation recipes |
skills/routing.md |
Task‑to‑MCP mapping matrix |
skills/scripts/ToolDiscovery.ps1 |
Windows tool index generator |
kali/scripts/discover-tools.sh |
Linux tool index generator |
skills/browser-automation/SKILL.md |
Example browser skill implementation |
skills/pentest-tools/src‑hunter/README.en.md |
Reference for multi‑MCP skill design |
Summary
- MCP servers in reverse‑skill are integrated through declarative configuration rather than code changes.
- Bootstrap manifests (
bootstrap‑manifest.json) provide installation and startup recipes for new servers. - Tool discovery (
ToolDiscovery.ps1/discover-tools.sh) reads server manifests and updates the global tool index. - Routing entries in
routing.mdconnect skill requests to specific MCP endpoints. - Smoke tests validate end‑to‑end functionality before deployment.
Frequently Asked Questions
What is an MCP server in the reverse‑skill context?
An MCP (Model Context Protocol) server is an external process that exposes specialized capabilities—such as browser automation or network interception—via JSON‑RPC over HTTP. The reverse‑skill AI agent discovers these servers dynamically and invokes them as tools during skill execution.
Can I use existing MCP servers like Playwright‑MCP or Puppeteer‑MCP?
Yes. Any MCP‑compliant server works if you provide a valid bootstrap manifest entry and its tool‑manifest.json is readable. The discovery scripts automatically ingest standard MCP metadata formats.
How does the router choose between multiple browser automation MCPs?
The router consults routing.md in order, selecting the first matching entry for the requested task category. You can prioritize servers by listing them earlier in the matrix or add specificity through more granular task descriptors.
What happens if an MCP server fails during skill execution?
The execution layer writes failure details to field‑journal. The bootstrap process will attempt restart on the next skill invocation if the server is marked as required in the manifest. Non‑critical failures may trigger fallback to alternative MCPs if configured in routing rules.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →