MCP Agent Bridge
Puente de Agentes MCP
Un servidor puente MCP (Model Context Protocol) ligero que permite a Hermes Agent y OpenClaw compartir herramientas y memoria, formando un sistema multi-agente cooperativo.
Arquitectura
┌─────────────┐ ┌──────────────────┐ ┌─────────────┐
│ Hermes │ MCP │ Agent Bridge │ CLI/ │ OpenClaw │
│ Agent │◄───────►│ (FastMCP SSE) │◄───────►│ CLI │
│ │ client │ Port :18900 │ HTTP │ │
│ Feishu/WX │ │ │ │ Image/Web │
│ Memory/Plan │ │ Shared Memory │ │ TTS/Video │
└─────────────┘ └──────────────────┘ └─────────────┘Hermes aporta canales de mensajería (Feishu, WeChat, Telegram…) y sus capacidades de planificación/razonamiento.
OpenClaw aporta generación de imágenes por IA, búsqueda web, TTS y generación de vídeo.
El Puente hace que las fortalezas de cada agente estén disponibles para el otro a través de llamadas a herramientas MCP estándar, además de un almacén de memoria compartido respaldado por SQLite.
Related MCP server: ACP-MCP-Server
Herramientas expuestas
Herramienta | Dirección | Descripción |
| OC → Hermes | Generación de imágenes por IA mediante OpenClaw |
| OC → Hermes | Búsqueda web mediante OpenClaw |
| OC → Hermes | Extracción de contenido de URL mediante OpenClaw |
| OC → Hermes | Conversión de texto a voz mediante OpenClaw |
| Hermes → OC | Enviar mensajes a través de las plataformas de Hermes |
| Hermes → OC | Delegar tareas al agente de IA de Hermes |
| Bidireccional | Leer del almacén de clave-valor compartido |
| Bidireccional | Escribir en el almacén de clave-valor compartido |
| Bidireccional | Listar claves de memoria con filtros opcionales |
| Bidireccional | Eliminar una clave de memoria |
| — | Comprobación de estado y lista de módulos registrados |
Inicio rápido
Requisitos previos
Python 3.11+
Hermes Agent con el servidor API habilitado
OpenClaw CLI instalado y configurado
pip install "mcp[cli]>=1.0" aiohttp pyyaml
Instalación
git clone https://github.com/fkdt01/mcp-agent-bridge.git
cd mcp-agent-bridge
pip install -e .Configuración
cp config.example.yaml config.yaml
# Edit config.yaml — fill in your API keys and pathsAjustes clave:
openclaw:
cli_path: "openclaw" # or full path like /usr/local/bin/openclaw
image_provider: "openai" # default image gen provider
web_search_provider: "duckduckgo"
hermes:
api_url: "http://127.0.0.1:8888"
api_key: "" # or set HERMES_API_KEY env var
default_channel: "feishu"
memory:
backend: "sqlite"
db_path: "data/bridge_memory.db"Ejecución
# Start the bridge server
python -m bridge.server
# With custom options
python -m bridge.server --config /path/to/config.yaml --port 18900 --log-level DEBUGConectar Hermes
Añadir a ~/.hermes/config.yaml:
mcp_servers:
agent-bridge:
transport: sse
url: http://127.0.0.1:18900/sseConectar OpenClaw
Añadir a ~/.openclaw/openclaw.json → mcpServers:
{
"mcpServers": {
"agent-bridge": {
"transport": "sse",
"url": "http://127.0.0.1:18900/sse"
}
}
}Ejemplos de uso
Hermes genera una imagen mediante OpenClaw
Cuando Hermes necesita generar una imagen (p. ej., desde un chat de Feishu), llama a:
oc_image_generate({
prompt: "A futuristic city at sunset, cyberpunk style",
aspect_ratio: "16:9",
model: "openai"
})→ El puente ejecuta openclaw capability image generate --prompt "..." --json
→ Devuelve la ruta/metadatos de la imagen a Hermes
→ Hermes entrega la imagen al usuario
OpenClaw envía un mensaje de Feishu mediante Hermes
hermes_send_message({
message: "✅ Image generation complete!",
target: "feishu"
})→ El puente hace POST a la API de Hermes /v1/chat/completions
→ Hermes entrega el mensaje al canal de Feishu
Memoria compartida entre agentes
Hermes escribe el contexto del proyecto:
shared_memory_write({
key: "project.math-game.pet-design",
value: "算术小喵: 草原主题, 绿色配色",
source: "hermes"
})OpenClaw lo lee más tarde:
shared_memory_read({ key: "project.math-game.pet-design" })
→ { value: "算术小喵: 草原主题, 绿色配色", source: "hermes", updated_at: 1745631000 }Añadir herramientas personalizadas
Cree un nuevo archivo en bridge/tools/ siguiendo la convención de nombres:
oc_*.py— Herramientas respaldadas por OpenClawhermes_*.py— Herramientas respaldadas por Hermesshared_*.py— Herramientas compartidas/bidireccionales
Cada módulo debe exponer una función register(mcp, config):
"""My custom tool."""
from mcp.server.fastmcp import FastMCP
from typing import Any
def register(mcp: FastMCP, config: dict[str, Any]) -> None:
@mcp.tool()
async def my_custom_tool(param: str) -> dict[str, Any]:
"""Tool description — this becomes the MCP tool description."""
# Your implementation here
return {"result": "ok"}La herramienta se descubre y registra automáticamente al iniciar el servidor.
Ejecución como servicio de systemd
cat > ~/.config/systemd/user/mcp-agent-bridge.service << 'EOF'
[Unit]
Description=MCP Agent Bridge Server
After=network.target
[Service]
Type=simple
WorkingDirectory=/path/to/mcp-agent-bridge
ExecStart=/usr/bin/python -m bridge.server
Restart=on-failure
RestartSec=5
Environment=HERMES_API_KEY=your_key_here
[Install]
WantedBy=default.target
EOF
systemctl --user daemon-reload
systemctl --user enable --now mcp-agent-bridgeEstructura del proyecto
mcp-agent-bridge/
├── bridge/
│ ├── __init__.py
│ ├── __main__.py
│ ├── server.py # FastMCP server entry point
│ ├── config.py # YAML + env-var config loader
│ ├── openclaw_runner.py # Shared async CLI subprocess runner
│ ├── memory.py # SQLite-backed shared memory store
│ └── tools/
│ ├── __init__.py # Auto-discovery & registration
│ ├── oc_image.py # Image generation
│ ├── oc_web.py # Web search & fetch
│ ├── oc_tts.py # Text-to-speech
│ ├── hermes_messaging.py # Message sending
│ ├── hermes_chat.py # Task delegation
│ └── shared_memory.py # Shared memory tools
├── config.example.yaml
├── .gitignore
├── LICENSE
├── README.md
└── pyproject.tomlLicencia
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityFmaintenanceA bridge server that enables MCP-compatible AI assistants like Claude to seamlessly discover, communicate with, and manage A2A protocol agents.7148Apache 2.0
- AlicenseBqualityFmaintenanceA bridge server that connects Agent Communication Protocol (ACP) agents with Model Context Protocol (MCP) clients, enabling seamless integration between ACP-based AI agents and MCP-compatible tools like Claude Desktop.1624MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server and local HTTP bridge designed to integrate remote upstream MCP tools into OpenClaw skills or local environments. It enables users to generate skill wrappers and proxy tool calls via a local HTTP bridge for use in Claude Desktop, Cursor, or OpenClaw.Apache 2.0
- AlicenseNot gradedqualityCmaintenanceBridges OpenClaw and Hermes Agent, enabling multi-turn conversations, messaging via Hermes channels, and health checks through MCP tools.22MIT
Related MCP Connectors
An MCP memory server. One memory your agents share — across models, devices and apps.
Shared long-term memory vault for AI agents with 20 MCP tools.
Agent-native collaboration network: orchestrate a team of long-running agents from any MCP client.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/fkdt01/mcp-agent-bridge'
If you have feedback or need assistance with the MCP directory API, please join our Discord server