Skip to main content
Glama

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_image_generate

OC → Hermes

Generación de imágenes por IA mediante OpenClaw

oc_web_search

OC → Hermes

Búsqueda web mediante OpenClaw

oc_web_fetch

OC → Hermes

Extracción de contenido de URL mediante OpenClaw

oc_tts_convert

OC → Hermes

Conversión de texto a voz mediante OpenClaw

hermes_send_message

Hermes → OC

Enviar mensajes a través de las plataformas de Hermes

hermes_chat

Hermes → OC

Delegar tareas al agente de IA de Hermes

shared_memory_read

Bidireccional

Leer del almacén de clave-valor compartido

shared_memory_write

Bidireccional

Escribir en el almacén de clave-valor compartido

shared_memory_list_keys

Bidireccional

Listar claves de memoria con filtros opcionales

shared_memory_delete

Bidireccional

Eliminar una clave de memoria

bridge_health

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 paths

Ajustes 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 DEBUG

Conectar Hermes

Añadir a ~/.hermes/config.yaml:

mcp_servers:
  agent-bridge:
    transport: sse
    url: http://127.0.0.1:18900/sse

Conectar OpenClaw

Añadir a ~/.openclaw/openclaw.jsonmcpServers:

{
  "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 OpenClaw

  • hermes_*.py — Herramientas respaldadas por Hermes

  • shared_*.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-bridge

Estructura 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.toml

Licencia

MIT

A
license - permissive license
Not graded
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • A
    license
    B
    quality
    F
    maintenance
    A 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.
    16
    24
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    An 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

View all related MCP servers

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.

View all MCP Connectors

Latest Blog Posts

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