使用说明
MCP Telegram Group Chat Server (Standalone)
License: AGPL-3.0-or-later · Copyright (c) 2026 Neige-Neige If you distribute this software or offer it as a network service (modified or not), you must make the complete corresponding source available under AGPL-3.0-or-later. For closed-source commercial licensing, please open an issue. 本ソフトウェアを配布する、またはネットワークサービスとして提供する場合(改変の有無を問わず)、 対応するソースコード全体を AGPL-3.0-or-later で公開する必要があります。 分发本软件或将其作为网络服务提供时(无论是否修改),必须以 AGPL-3.0-or-later 公开完整的对应源代码。
让 Claude 通过 MCP 协议读取和发送 Telegram 群聊消息的独立服务。
快速开始
- 安装依赖:
pip install -r requirements.txt
- 配置环境变量:
cp .env.example .env
# 编辑 .env,填入你的 bot token 和群组 chat_id
- 启动服务:
python mcp_server.py
- 在 Claude Desktop 的 MCP 配置中添加 SSE 端点:
http://your-server:8766/sse
获取 Chat ID
把 bot 拉进群后,在群里发一条消息,然后访问:
https://api.telegram.org/bot<YOUR_TOKEN>/getUpdates
在返回的 JSON 里找 chat.id(群组的 chat_id 通常是负数)。
工具说明
- read_group_chat — 读取群聊最近的消息记录
- send_group_chat — 发送消息到 Telegram 群聊
Build with 🌀 Claude Code
License
Copyright (c) 2026 Neige-Neige
This project is licensed under the GNU Affero General Public License, version 3
or (at your option) any later version (AGPL-3.0-or-later).
See LICENSE for the full text.
What triggers the copyleft
AGPL is triggered by distribution and by offering the software as a network service — not by "commercial use" as such:
- Running a copy privately, without distributing it and without offering it to others over a network → no obligation, even commercially
- Distributing the software, modified or not → you must provide the complete corresponding source under AGPL-3.0-or-later
- Offering it as a network service, modified or not → you must make the complete corresponding source available to its users, even though you never hand out a copy of the software itself. This is the clause that distinguishes AGPL from plain GPL.
- In all of the above you must retain this copyright notice and license
Commercial licensing
If you want to distribute this project, or run it as a service, without releasing your source code, AGPL-3.0-or-later does not permit that. A separate commercial license is available — please open an issue to discuss.
中文
本项目采用 AGPL-3.0-or-later 授权。
触发 copyleft 的是"分发"和"以网络服务提供",而不是"商业使用"本身:
- 私下运行(不分发、不对外提供网络服务)→ 无义务,即使是商业环境
- 分发本软件(无论是否修改)→ 必须以 AGPL-3.0-or-later 提供完整的对应源代码
- 作为网络服务提供(无论是否修改)→ 必须向使用者公开完整的对应源代码, 即使你从未分发过软件本体。这是 AGPL 区别于普通 GPL 的核心条款
- 以上任何情形都必须保留原始的版权声明与授权条款
如需在不公开源代码的前提下分发或提供服务,请开 issue 联系作者获取商业授权。
日本語
本プロジェクトは AGPL-3.0-or-later ライセンスで公開されています。
copyleft が発動するのは「配布」と「ネットワークサービスとしての提供」であり、 「商用利用」そのものではありません。ソースコードを公開せずに配布・サービス提供を ご希望の場合は、issue にて商用ライセンスをご相談ください。