molecule-mcp-claude-channel/LICENSE
Hongming Wang d07363cbe5 feat: initial scaffold — Molecule channel plugin for Claude Code
Bridges Molecule A2A traffic into a Claude Code session via MCP. Inbound
A2A messages from watched workspaces surface as conversation turns
(notifications/claude/channel); replies route back through the existing
POST /workspaces/:id/a2a endpoint via the reply_to_workspace MCP tool.

Architecture:
- Polling-based inbound (uses /activity?since_secs= shipped in molecule-core
  PR #2300). Works through every NAT/firewall, no tunnel required —
  optimized for laptop-launched Claude Code sessions vs the existing
  push-based external-agent flow that needs ngrok.
- Per-workspace bearer auth (MOLECULE_WORKSPACE_TOKENS, comma-separated to
  match MOLECULE_WORKSPACE_IDS). Same token covers /activity (read) and
  /a2a (write).
- Singleton lock at ~/.claude/channels/molecule/bot.pid prevents two
  channel servers racing the dedup state.
- Dedup by activity.id; 30s overlap window over a 5s poll interval
  protects against missed ticks (laptop sleep, transient network blips).

v0.1 ships:
- .claude-plugin/plugin.json, .mcp.json, package.json, LICENSE (Apache-2.0)
- server.ts: MCP server with notification emission + reply_to_workspace tool
- README: install + .env config + architecture notes + v0.2 roadmap

v0.1 explicit non-goals (tracked in README):
- No push-mode inbound (requires tunnel; deferred to v0.2)
- No pairing flow (manual .env tokens; canvas pairing in v0.2)
- No file-attachment download (URLs surface in meta; host fetches on-demand)
- No outbound channel-init (only replies; start_workspace_chat in v0.2)

Mirrors the architecture of @claude-plugins-official/telegram v0.0.6
(MCP notification contract: notifications/claude/channel with
{content, meta}) so the host's existing channel-handling logic works
without custom adapters.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 11:30:23 -07:00

18 lines
740 B
Plaintext

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Copyright 2026 Molecule AI
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.