molecule-mcp-claude-channel/package.json
Hongming Wang bcc7db5c86 feat(v0.3): mirror universal-MCP surface for external workspaces
Brings the channel's tool surface up to parity with the in-container
universal MCP (workspace/platform_tools/registry.py). External agents
driven through this channel now get the same 9 tools that an in-container
agent gets — same names, same input shapes, same semantics — so a hermes
or codex session bridged via this channel can do anything a containerized
claude-code can.

Tools:
- reply_to_workspace — smart-routed (canvas_user → /notify, peer_agent → /a2a).
  Was peer-only; now handles canvas chat replies too. Works for the most
  common case (user types in My Chat, agent replies in My Chat) which the
  v0.2 channel silently dropped.
- delegate_task / delegate_task_async / check_task_status — proactive A2A.
  Previously only inbound peer messages could trigger an outbound a2a;
  the agent could not initiate.
- list_peers — peer discovery. Backed by GET /registry/:id/peers.
- get_workspace_info — self-introspection. Needed for memory scope checks
  (only tier-0 roots can write GLOBAL).
- send_message_to_user — canvas push with attachments. Multipart upload via
  /chat/uploads then /notify, mirrors the universal tool's two-phase shape.
- commit_memory / recall_memory — persistent memory across sessions, with
  LOCAL/TEAM/GLOBAL scopes. Platform enforces RBAC + scope.

Inbound delivery:
- Drop seed-then-skip on first run. The previous policy assumed events
  before session start were "out of context"; in practice operators
  restart Claude Code mid-conversation and EXPECT the queued messages.
  Cold start now delivers everything in POLL_WINDOW_SECS and advances
  the cursor past it.
- emitNotification adds meta.kind ('canvas_user' | 'peer_agent') so
  Claude can pick the right reply form without re-parsing the row.

Channel-specific:
- New tools take an optional _as_workspace param to disambiguate when
  watching multiple workspaces. Underscore-prefixed so it can't collide
  with the universal contract (which is bound to a single workspace).
2026-04-30 14:57:46 -07:00

15 lines
396 B
JSON

{
"name": "molecule-mcp-claude-channel",
"version": "0.3.0",
"description": "Molecule AI channel for Claude Code — bridges A2A traffic into a Claude Code session via MCP",
"license": "Apache-2.0",
"type": "module",
"bin": "./server.ts",
"scripts": {
"start": "bun install --no-summary && bun server.ts"
},
"dependencies": {
"@modelcontextprotocol/sdk": "^1.0.0"
}
}