Skip to main content
Glama

MCP Agent Bridge

Hermes AgentOpenClawがツールとメモリを共有し、協調的なマルチエージェントシステムを形成できるようにする軽量なMCP(Model Context Protocol)ブリッジサーバーです。

アーキテクチャ

┌─────────────┐         ┌──────────────────┐         ┌─────────────┐
│   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は、メッセージングチャネル(飛書、WeChat、Telegramなど)と、その計画・推論機能を提供します。

OpenClawは、AI画像生成、Web検索、TTS、動画生成機能を提供します。

Bridgeは、標準的なMCPツール呼び出しと、SQLiteベースの共有メモリストアを通じて、各エージェントの強みを相互に利用可能にします。

Related MCP server: ACP-MCP-Server

公開ツール

ツール

方向

説明

oc_image_generate

OC → Hermes

OpenClawによるAI画像生成

oc_web_search

OC → Hermes

OpenClawによるWeb検索

oc_web_fetch

OC → Hermes

OpenClawによるURLコンテンツ抽出

oc_tts_convert

OC → Hermes

OpenClawによるテキスト読み上げ

hermes_send_message

Hermes → OC

Hermesのプラットフォームを通じたメッセージ送信

hermes_chat

Hermes → OC

HermesのAIエージェントへのタスク委任

shared_memory_read

双方向

共有キーバリューストアからの読み取り

shared_memory_write

双方向

共有キーバリューストアへの書き込み

shared_memory_list_keys

双方向

オプションのフィルタ付きでメモリキーを一覧表示

shared_memory_delete

双方向

メモリキーの削除

bridge_health

ヘルスチェックおよび登録済みモジュールリスト

クイックスタート

前提条件

  • Python 3.11+

  • APIサーバーを有効にしたHermes Agent

  • インストールおよび設定済みのOpenClaw CLI

  • pip install "mcp[cli]>=1.0" aiohttp pyyaml

インストール

git clone https://github.com/fkdt01/mcp-agent-bridge.git
cd mcp-agent-bridge
pip install -e .

設定

cp config.example.yaml config.yaml
# Edit config.yaml — fill in your API keys and paths

主要な設定:

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"

実行

# 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

Hermesの接続

~/.hermes/config.yaml に以下を追加します:

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

OpenClawの接続

~/.openclaw/openclaw.jsonmcpServers に以下を追加します:

{
  "mcpServers": {
    "agent-bridge": {
      "transport": "sse",
      "url": "http://127.0.0.1:18900/sse"
    }
  }
}

使用例

HermesがOpenClaw経由で画像を生成する

Hermesが画像を生成する必要がある場合(例:飛書のチャットから)、以下を呼び出します:

oc_image_generate({
  prompt: "A futuristic city at sunset, cyberpunk style",
  aspect_ratio: "16:9",
  model: "openai"
})

→ Bridgeが openclaw capability image generate --prompt "..." --json を実行 → 画像パス/メタデータをHermesに返す → Hermesがユーザーに画像を配信する

OpenClawがHermes経由で飛書のメッセージを送信する

hermes_send_message({
  message: "✅ Image generation complete!",
  target: "feishu"
})

→ BridgeがHermes API /v1/chat/completions にPOSTする → Hermesが飛書のチャネルにメッセージを配信する

エージェント間の共有メモリ

Hermesがプロジェクトのコンテキストを書き込む:

shared_memory_write({
  key: "project.math-game.pet-design",
  value: "算术小喵: 草原主题, 绿色配色",
  source: "hermes"
})

OpenClawが後でそれを読み取る:

shared_memory_read({ key: "project.math-game.pet-design" })
→ { value: "算术小喵: 草原主题, 绿色配色", source: "hermes", updated_at: 1745631000 }

カスタムツールの追加

bridge/tools/ 内に、以下の命名規則に従って新しいファイルを作成します:

  • oc_*.py — OpenClawベースのツール

  • hermes_*.py — Hermesベースのツール

  • shared_*.py — 共有/双方向ツール

各モジュールは 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"}

ツールはサーバー起動時に自動的に検出され、登録されます。

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

プロジェクト構造

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

ライセンス

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