OpenClaw MCP Bridge
Bi-directional MCP bridge: expose OpenClaw capabilities as MCP server endpoints AND consume external MCP servers from within OpenClaw.
Quick Start
# Check MCP bridge status and config
python3 scripts/mcp-bridge.py status
# Start MCP server (expose OpenClaw tools)
python3 scripts/mcp-bridge.py serve --port 3100
# List available tools from an external MCP server
python3 scripts/mcp-bridge.py discover --url http://localhost:3000
# Call a tool on an external MCP server
python3 scripts/mcp-bridge.py call --url http://localhost:3000 --tool web_search --params '{"query": "test"}'
# Configure which tools to expose
python3 scripts/mcp-bridge.py config --expose "web_search,read,write" --auth-token mytoken123
# Generate n8n-compatible webhook config
python3 scripts/mcp-bridge.py n8n-template
Commands
| Command | Purpose |
|---------|---------|
| status | Show current MCP bridge configuration and health |
| serve | Start MCP server exposing selected OpenClaw tools |
| discover | List tools available on an external MCP server |
| call | Invoke a tool on an external MCP server |
| config | Configure exposed tools, auth, rate limits |
| n8n-template | Generate n8n workflow templates for MCP integration |
| tools | List all exposable OpenClaw tools with descriptions |
Configuration
Config stored in memory/mcp-bridge-config.json:
exposed_tools: List of tool names to expose (default: none — explicit opt-in)auth_token: Bearer token for incoming MCP requestsrate_limit: Max requests per minute per client (default: 60)port: Server port (default: 3100)allowed_origins: CORS origins for browser-based MCP clients
Security
- Explicit opt-in: No tools exposed by default — must configure each tool
- Auth required: Bearer token mandatory for all incoming requests
- Rate limiting: Per-client rate limits prevent abuse
- No sensitive tools by default: Tools like
exec,gatewaynever auto-exposed - Audit log: All incoming MCP requests logged to
memory/mcp-audit.log
Architecture
External MCP Client → [Auth] → [Rate Limit] → OpenClaw MCP Server → Selected Tools
OpenClaw Agent → MCP Bridge Client → External MCP Server → Tool Response
n8n Integration
Run n8n-template to generate ready-to-import workflow JSON for common patterns:
- Webhook trigger → OpenClaw tool call → response
- Scheduled workflow → MCP discovery → tool invocation
- Multi-step: n8n node → OpenClaw skill → n8n node