Open Claude Funnel
外部イベントを Claude Agent SDK や Claude Code Channels に組み込むための接続・配信ライブラリです。受信プロトコルと再接続は Flume が担当し、Funnel は配信、再送、外部への返信を扱います。
CLI、エージェントの起動、作業ディレクトリ、設定ファイル、資格情報の保存は持ちません。設定と再送ログは既定でメモリ内に保持します。
Power your agent
คำสั่งของผู้เผยแพร่เอง ไม่ใช่เอนด์พอยต์ของ PlugMCP
Host a copy with our keys and logs.
npx -y @interactive-inc/[email protected]Claude Code ไม่มีลิงก์ติดตั้งสำหรับคำสั่งแบบโลคัล ให้คัดลอกคำสั่งด้านล่างแล้วรันในเทอร์มินัล
claude mcp add interactive-inc-claude-funnel -- npx -y @interactive-inc/claude-funnel@0.71.4รันในเทอร์มินัล
{ "mcpServers": { "interactive-inc-claude-funnel": { "command": "npx", "args": [ "-y", "@interactive-inc/[email protected]" ] } }}claude_desktop_config.json
URL แบบรีโมตหรือคำสั่งบนเครื่องของคุณ? การติดตั้งสองแบบต่างกันอย่างไร
รันบน PlugMCP
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
เปิดจากผู้เผยแพร่
外部イベントを Claude Agent SDK や Claude Code Channels に組み込むための接続・配信ライブラリです。受信プロトコルと再接続は Flume が担当し、Funnel は配信、再送、外部への返信を扱います。
CLI、エージェントの起動、作業ディレクトリ、設定ファイル、資格情報の保存は持ちません。設定と再送ログは既定でメモリ内に保持します。
Hub CLI that routes external events (Slack / GitHub / Discord) to Claude Code agents through subscription channels over MCP.
import { Funnel } from "@interactive-inc/claude-funnel"
import { slackConnector } from "@interactive-inc/claude-funnel/connectors/slack"
const funnel = new Funnel({
connectors: [slackConnector()],
channels: [{
name: "ops",
connectors: [{
type: "slack",
name: "team",
botToken: process.env.SLACK_BOT_TOKEN!,
appToken: process.env.SLACK_APP_TOKEN!,
}],
}],
})
// Bun を利用する場合。ポートと認証はホストが指定する。
const gateway = funnel.gatewayServer({
port: 9742,
token: process.env.AGENT_CONNECTION_TOKEN!,
})
await gateway.start()
// 同一プロセスから配信を観測する。購読の解除関数を返す。
const unsubscribe = gateway.onEvent((event) => console.log(event.content))
// 終了時
unsubscribe()
await gateway.stop()
別プロセスの購読者は /ws?channel=ops&id=worker-1 に接続します。認証には /gateway の channelWsProtocols(token) を WebSocket の subprotocol として渡します。since=<offset> を付けると保持中のイベントを再送します。
ホスト自身が Bun の HTTP/WebSocket サーバーを持つ場合は、gatewayModule({ token }) の app、handleUpgrade、websocket を組み込みます。Node.js では同一プロセスの配信 API と Hono の app を利用できます。gatewayServer() と WebSocket upgrade helper は Bun 専用です。
SDK の query() と MCP の Server は利用側のものをそのまま使います。Funnel はそのインスタンスを受け取らず、入力と通知の値を返します。SDK・MCP を依存として追加することもありません。
Agent SDK の prompt にイベント列を渡す例です。上の funnel を使い、HTTP を待ち受けない構成にします。
import { query } from "@anthropic-ai/claude-agent-sdk"
import { agentSdkInput } from "@interactive-inc/claude-funnel/claude"
const gateway = funnel.gatewayModule({ token: "" })
const events = gateway.events({ channel: "ops", subscriberId: "assistant" })
const input = agentSdkInput(events)
try {
await gateway.start()
for await (const message of query({ prompt: input })) {
// SDK の応答をそのまま扱う。権限・セッション・ツールも SDK の API で設定する。
if (message.type === "result") console.log(message)
}
} finally {
await input.return?.()
await gateway.stop()
}
Claude Code Channels では、ホストの MCP Server に claudeChannelCapabilities を合成し、同じ events から取り出した値を mcp.notification(claudeChannelNotification(event)) に渡します。既存のツール・transport・接続処理をそのまま使えます。
両方式の組み込み例と終了・返信の契約を参照してください。events() はチャネル単位の配送先です。onEvent() は全イベントの監視用で、配送先の選択とは独立しています。
await funnel.channels.call("ops", "team", {
method: "POST",
path: "chat.postMessage",
body: { channel: "C_EXAMPLE", text: "完了しました" },
})
Slack、Discord、GitHub の接続は /connectors/<type> から必要なものだけ import します。GitHub は受信・送信とも渡された token を使用し、gh コマンドや端末のログイン状態に依存しません。
fanout はチャネルの全購読者へ配信します。exclusive は交換可能なワーカーの一つへ配信し、再送先を維持します。connected と、再接続処理が生きている alive を区別します。gatewayModule / gatewayServer にホスト所有の eventLog を渡します。注入したログはホストが閉じます。store を渡して行います。保存・再読込する場合はチャネルとコネクタの ID を維持してください。Funnel はパスやファイル形式を定めません。scheduleConnector({ stateStore })、または /channel の timeChannel({ statePersister }) にホストの保存処理を渡せます。Funnel({ signal }) のキャンセルは接続の監視・復旧も停止します。Bun helper が所有する待受も閉じます。ホスト所有の待受はホストが閉じます。gateway.getRegistry().restart(channel, connector) で対象を更新します。設定から削除した接続は次の監視処理で停止します。直ちに停止したい場合は削除前に stop(channel, connector) を呼びます。events({ channel, subscriberId, since, signal }) は同一プロセスの購読を作ります。WebSocket と同じ fanout / exclusive・宛先指定・再送を使います。購読は呼び出した時点で始まり、return()・ループの break・abort・gateway 停止で解除します。明示停止した接続を監視が再開することはありません。再送が同じワーカーへ届いても、外部副作用の実行が一度だけになる保証とは別です。
import { SqliteFunnelEventLog } from "@interactive-inc/claude-funnel/sqlite"
const eventLog = new SqliteFunnelEventLog({ path: hostChosenDatabasePath })
const gateway = funnel.gatewayModule({ token, eventLog })
SQLite アダプターは Bun 専用です。通常の import では SQLite やファイルシステムを読み込みません。
bun install
make check
make build
bun run check:package
Node.js 22 以降または Bun 1.3 以降。設定、接続、配信の API は TypeScript の公開型を参照してください。0.71 系からの破壊的変更は 移行案内、設計は 設計メモ にあります。
MIT © Interactive Inc.
Hub CLI that routes external events (Slack / GitHub / Discord) to Claude Code agents through subscription channels over MCP.
{ "mcpServers": { "interactive-inc-claude-funnel": { "command": "npx", "args": [ "-y", "@interactive-inc/[email protected]" ] } }}เครื่องมือ
ยังไม่มีรายการเครื่องมือ เซิร์ฟเวอร์แบบรีโมตจะได้รายการหลังการตรวจสอบสถานะครั้งแรก
FAQ
คัดลอกคอนฟิก stdio สำหรับ Cursor, Claude Desktop, Claude Code หรือ VS Code ได้ในหน้านี้ คอนฟิกนี้ใช้การติดตั้งของผู้เผยแพร่ ไม่ใช่พร็อกซีของ PlugMCP
ระเบียนนี้ไม่ได้ระบุตัวแปรสภาพแวดล้อมที่จำเป็น
@interactive Inc/claude Funnel ทำงานแบบโลคัลผ่าน stdio
ตรวจสอบล่าสุดเมื่อ 2026-10-28 Hub CLI that routes external events (Slack / GitHub / Discord) to Claude Code agents through subscription channels over MCP.