MCP Agent Bridge
MCP Agent Bridge
Hermes AgentとOpenClawがツールとメモリを共有し、協調的なマルチエージェントシステムを形成できるようにする軽量な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 → Hermes | OpenClawによるAI画像生成 |
| OC → Hermes | OpenClawによるWeb検索 |
| OC → Hermes | OpenClawによるURLコンテンツ抽出 |
| OC → Hermes | OpenClawによるテキスト読み上げ |
| Hermes → OC | Hermesのプラットフォームを通じたメッセージ送信 |
| Hermes → OC | HermesのAIエージェントへのタスク委任 |
| 双方向 | 共有キーバリューストアからの読み取り |
| 双方向 | 共有キーバリューストアへの書き込み |
| 双方向 | オプションのフィルタ付きでメモリキーを一覧表示 |
| 双方向 | メモリキーの削除 |
| — | ヘルスチェックおよび登録済みモジュールリスト |
クイックスタート
前提条件
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 DEBUGHermesの接続
~/.hermes/config.yaml に以下を追加します:
mcp_servers:
agent-bridge:
transport: sse
url: http://127.0.0.1:18900/sseOpenClawの接続
~/.openclaw/openclaw.json の mcpServers に以下を追加します:
{
"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
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