openai: shared MCP layer + openclaw-tools bridge [Adolf P5]
- adolf-llm/server.js now loads SHARED_MCP_SERVERS from the mounted
/shared-mcp.json instead of a hardcoded stub, so adding a shared MCP
server is a one-file change. Verified end-to-end: a real chat-completions
turn writes a session .mcp.json containing both cognee and openclaw-tools
entries (kimi itself still needs `kimi login` in adolf-llm-home, unrelated
to this change).
- Documented the Gate-1 transport reconciliation: decompiled the installed
@moonshot-ai/kimi-code package to confirm its .mcp.json schema keys remote
servers on `transport` ("stdio"/"http"/"sse", inferred as "http" from a
bare `url`, never "sse"), while OpenClaw's own canonical mcp.servers schema
uses different literals ("streamable-http"/"sse") for the same field name
and treats `type` as a CLI-native alias it normalizes itself. `type: "http"`
is the one shape both consumers tolerate, so shared-mcp.json keeps it.
- New openai/openclaw-tools/ service: a stateless MCP-over-Streamable-HTTP
bridge (Node, @modelcontextprotocol/sdk) exposing message_send, cron_create,
cron_list, nodes_invoke, and browser_invoke, each proxying to the OpenClaw
gateway's POST /tools/invoke. Verified initialize + tools/list handshake and
a tools/call against the not-yet-running `adolf` gateway returns a clean
isError content instead of breaking the MCP connection. Documented that
cron/nodes are hard-denied on that HTTP surface by default until P6 adds
them to gateway.tools.allow; message/browser are not similarly restricted.
- Wired openclaw-tools into docker-compose.yml (openai network, :8020) and
added its shared-mcp.json entry alongside cognee.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LeqyaxJF2nbRXJtae2kNB2
This commit is contained in:
@@ -169,8 +169,9 @@ services:
|
||||
|
||||
# adolf-llm — conversational Kimi-CLI wrapper (:8010), the model backend for
|
||||
# the Adolf OpenClaw gateway (P2). Real streaming (SSE), chat_id session-keying
|
||||
# + 1:1 kimi resume, media, per-session .mcp.json (shared-MCP servers stubbed
|
||||
# until P4/P5). Needs `kimi login` in adolf-llm-home.
|
||||
# + 1:1 kimi resume, media, per-session .mcp.json sourced from the shared
|
||||
# shared-mcp.json contract (cognee-mcp P4, openclaw-tools P5). Needs
|
||||
# `kimi login` in adolf-llm-home.
|
||||
adolf-llm:
|
||||
build: ./adolf-llm
|
||||
container_name: adolf-llm
|
||||
@@ -179,6 +180,7 @@ services:
|
||||
volumes:
|
||||
- adolf-llm-workspace:/workspace
|
||||
- adolf-llm-home:/root/.kimi-code
|
||||
- ./shared-mcp.json:/shared-mcp.json:ro
|
||||
restart: unless-stopped
|
||||
|
||||
# cognee — Adolf's memory backend (P4). FastAPI + embedded Kuzu graph +
|
||||
@@ -238,6 +240,25 @@ services:
|
||||
depends_on:
|
||||
- cognee
|
||||
|
||||
# openclaw-tools — MCP bridge (P5) exposing a minimal slice of the Adolf
|
||||
# OpenClaw gateway's agent tools (message/cron/nodes/browser) over MCP
|
||||
# Streamable HTTP, so Kimi CLI sessions (adolf-llm) can call them instead of
|
||||
# bypassing OpenClaw entirely. Proxies each MCP tool call to the gateway's
|
||||
# `POST /tools/invoke` HTTP surface (http://adolf:18789). NOTE: `cron` and
|
||||
# `nodes` are hard-denied on that surface by default until P6 adds them to
|
||||
# `gateway.tools.allow` in the adolf openclaw.json — see openclaw-tools/
|
||||
# server.js for the full gate writeup. Not useful until `adolf` (P6) is
|
||||
# configured and running; safe to build/run standalone before that.
|
||||
openclaw-tools:
|
||||
build: ./openclaw-tools
|
||||
container_name: openclaw-tools
|
||||
environment:
|
||||
- OPENCLAW_GATEWAY_URL=http://adolf:18789
|
||||
- OPENCLAW_GATEWAY_TOKEN=${ADOLF_GATEWAY_TOKEN:-}
|
||||
ports:
|
||||
- "8020:8020"
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
kimi-agent-home:
|
||||
adolf-state:
|
||||
|
||||
Reference in New Issue
Block a user