mcp_channel 0.2.1 copy "mcp_channel: ^0.2.1" to clipboard
mcp_channel: ^0.2.1 copied to clipboard

Unified channel abstraction layer for messaging platforms (Slack, Telegram, Discord, etc.). Provides platform-agnostic messaging with idempotency, session management, and policy enforcement.

MCP Channel #

A unified channel abstraction layer for messaging platforms with MCP integration. Provides a single bidirectional event/response API across Slack, Discord, Telegram, Kakao, Email, Microsoft Teams, and more.

Features #

  • Platform-agnostic messaging via ChannelPort adapters.
  • Connectors — Slack (Socket Mode + Events API), Discord, Email, Kakao. Telegram and Teams scaffolded.
  • Rich contentContentBlock system, attachments, action elements, threading, reactions, typing indicators.
  • Session managementSession, Principal, SessionManager, SessionStore with conversation history and context.
  • Idempotency — duplicate-event suppression with configurable TTL.
  • Policy enforcement — rate limiting, retry-with-backoff, circuit breaker.
  • MCP integrationChannelRuntime orchestrates inbound events into MCP/LLM processing.
  • Crypto — signature verification helpers and AES message handling (e.g. WeCom encryption).

Quick Start #

import 'package:mcp_channel/mcp_channel.dart';

final runtime = ChannelRuntime.inbound(
  mcpClients: {'default': mcpClient},
  defaultMode: InboundProcessingMode.llm,
);

runtime.registerChannel('slack', SlackConnector(
  SlackConfig(botToken: 'xoxb-...', appToken: 'xapp-...', useSocketMode: true),
));

await runtime.start();
await for (final event in runtime.events) {
  final response = await runtime.processEvent(event);
  if (response != null) {
    await runtime.sendResponse(response);
  }
}

Core Components #

  • ChannelEvent / ChannelResponse — typed inbound events and outbound responses with rich content blocks.
  • ChannelPort — abstract platform adapter interface (start, stop, send, edit, delete, react, sendTyping).
  • ChannelCapabilities — feature-flag descriptor per connector.
  • Session / SessionManager / Principal — conversation identity and history.
  • IdempotencyGuard — duplicate-event guard.
  • ChannelPolicy + PolicyExecutor — rate-limit / retry / circuit-breaker pipeline.

Support #

License #

MIT — see LICENSE.

0
likes
130
points
138
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Unified channel abstraction layer for messaging platforms (Slack, Telegram, Discord, etc.). Provides platform-agnostic messaging with idempotency, session management, and policy enforcement.

Homepage
Repository (GitHub)
View/report issues

Topics

#messaging #slack #telegram #discord #chatbot

License

MIT (license)

Dependencies

collection, crypto, encrypt, http, logging, mcp_bundle, meta, uuid, web_socket_channel

More

Packages that depend on mcp_channel