Skip to main content

Agent 通用渠道 I/O 网关:给定主题一键跨渠道获取内容、一键多渠道发布。本地 MCP server。

Project description

ClawsomeChannel

本地 MCP 服务,给 AI Agent 一套统一的渠道能力:Agent根据用户意图从指定渠道获取信息,或把内容发到指定渠道。

用户只需要用自然语言告诉 Agent 想看什么、发到哪里。Agent 通过 ClawsomeChannel 的 fetchpublish 工具完成输入与输出。

安装

pip install -U clawsomechannel

需要 Python 3.10 或更高版本。若安装时看到类似 Ignored the following versions that require a different python versionRequires-Python >=3.10,说明当前 pip 绑定的 Python 版本过低。

先确认当前 pip 使用的 Python:

pip --version

如果它不是 Python 3.10+,请先搭建一个 ClawsomeChannel 专属环境,不要在已有项目的 virtualenv 里安装,也不要改系统 Python 或其它项目依赖。下面的目录只归 ClawsomeChannel 使用:

python3.10 -m venv ~/.local/share/clawsomechannel/venv
~/.local/share/clawsomechannel/venv/bin/python -m pip install -U pip
~/.local/share/clawsomechannel/venv/bin/python -m pip install -U clawsomechannel
mkdir -p ~/.local/bin
cat > ~/.local/bin/clawsomechannel <<'EOF'
#!/usr/bin/env sh
exec "$HOME/.local/share/clawsomechannel/venv/bin/python" -m clawsomechannel.cli "$@"
EOF
cat > ~/.local/bin/clawsomechannel-mcp <<'EOF'
#!/usr/bin/env sh
exec "$HOME/.local/share/clawsomechannel/venv/bin/python" -m clawsomechannel.transport.mcp_stdio "$@"
EOF
chmod +x ~/.local/bin/clawsomechannel ~/.local/bin/clawsomechannel-mcp

完成后使用和升级都回到 clawsomechannel CLI;clawsomechannel upgrade 会在这个专属 环境里自更新并迁移本地数据。若你希望裸 pip install -U clawsomechannel 也在当前 shell 中可用,请让 pip --version 显示 Python 3.10+ 后重新执行默认安装命令;不要把 ClawsomeChannel 专属环境的 pip 覆盖成全局 pip

如果使用源码仓库:

scripts/install.sh

接入 MCP

推荐使用 CLI 自动配置:

clawsomechannel mcp install --client cursor
clawsomechannel mcp install --client claude-code
clawsomechannel mcp install --client claude-desktop
clawsomechannel mcp install --client codex
clawsomechannel mcp install --client openclaw
clawsomechannel mcp install --client hermes

只打印手动配置 JSON:

clawsomechannel mcp install --json

输出中的 command 是 MCP server 可执行文件的绝对路径。CLI 自动写入 Cursor、Claude Desktop、Codex 等配置时也会使用这个绝对路径,避免 GUI 客户端拿不到 shell PATH

什么是 Channel

Channel 是一个具体的输入源或输出目的地,也是用户和 Agent 日常使用的名字。

例子:

  • hn: 一个 Hacker News输入渠道。
  • 电报-工作群: 一个 Telegram 输出渠道。
  • 我的公众号: 一个微信公众号输出渠道。

创建 Channel 后,按 Channel 名录入凭证:

clawsomechannel creds set <Channel名>

常用命令

查看支持哪些平台:

clawsomechannel platforms list

查看某个平台需要准备什么:

clawsomechannel platforms requirements telegram --direction output
clawsomechannel platforms requirements rss --direction input

查看已注册 Channel:

clawsomechannel channels registered

录入某个 Channel 的凭证:

clawsomechannel creds set 电报-工作群

检查某个 Channel 当前是否可用:

clawsomechannel channels check 电报-工作群

基本使用

你可以直接对 Agent 说:

ClawsomeChannel 支持哪些输入和输出平台?

注册输入渠道:

添加一个ClawsomeChannel的输入渠道,平台是GitHub, 该渠道命名为“my-github-channel”。

注册输出渠道:

请在Telegram平台为我添加一个名为“电报-工作群”的ClawsomeChannel输出渠道

录入凭证:

clawsomechannel creds set 电报-工作群

获取信息:

请从 ClawsomeChannel 的"X", "hn", "Reddit"渠道抓取“AI 监管政策”相关信息,优先看最近 24 小时内讨论热度高的内容。

发布内容:

请把 /absolute/path/article.md 同时发布到以下渠道:“电报-工作群”, "X”, "我的微信公众号"。

支持平台

常见输入平台包括 RSS/Atom、Hacker News、GitHub、arXiv、YouTube、Reddit、V2EX、Bilibili、知乎、微博、掘金、豆瓣、Telegram 输入、Email/IMAP 等。

常见输出平台包括 Telegram、Slack、Discord、Email、Webhook、钉钉、飞书/Lark、企业微信机器人、Microsoft Teams、Matrix、Mattermost、Rocket.Chat、Gotify、ntfy、Pushover、Pushbullet、Bark、PushPlus、Server酱、X/Twitter、微信公众号图文、闲鱼、知乎等。

准确列表以命令输出为准:

clawsomechannel platforms list

升级

clawsomechannel upgrade

升级命令会自更新到最新稳定包并迁移本地数据。完成后需要重载或重启 MCP 客户端,让它重新启动最新的 clawsomechannel-mcp 进程:

  • Cursor:在 Settings > Tools & MCP 中切换该 server,执行 Developer: Reload Window,或完整重启 Cursor。
  • Claude Desktop:完整退出并重新打开应用。
  • Claude Code/Codex/其它 stdio 客户端:使用客户端提供的 MCP reconnect/reload 功能;没有热重载时重启当前会话。

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clawsomechannel-0.1.0b2.tar.gz (151.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

clawsomechannel-0.1.0b2-py3-none-any.whl (91.8 kB view details)

Uploaded Python 3

File details

Details for the file clawsomechannel-0.1.0b2.tar.gz.

File metadata

  • Download URL: clawsomechannel-0.1.0b2.tar.gz
  • Upload date:
  • Size: 151.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for clawsomechannel-0.1.0b2.tar.gz
Algorithm Hash digest
SHA256 98571c3a0c1a35bdfc9d2b294031d798c1bb928a454d1848398b8f58d9d1c6ab
MD5 c619c51f058be6c255d61e2782c210e9
BLAKE2b-256 b18843bd9bebd3e4baa47ce19d180861193a9c40ebd20b313216b8498809c2cb

See more details on using hashes here.

File details

Details for the file clawsomechannel-0.1.0b2-py3-none-any.whl.

File metadata

File hashes

Hashes for clawsomechannel-0.1.0b2-py3-none-any.whl
Algorithm Hash digest
SHA256 d04e8a8ef9c22a700df48b9318b9ebb29753e43f729658bc9997355211c96145
MD5 ddfc78498cece3cb67f58a7d112dbf9d
BLAKE2b-256 59b9ef120be9e12bf2fc54e823d0deeb8658fb7ac3b3cbdfe08fe66f42287f28

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page