
Telegram MCP 服务器(MTProto)。将 Claude、光标、Claude 代码、VS Code、Codex、Cline、Windsurf 连接到真实的 Telegram 账户——读取/搜索/发送消息,管理频道,管理......
概览
mcp-telegram Telegram MCP 服务器,支持 Claude、Codex、Cursor、Claude Code、VS Code、Cline、Windsurf 及其他 MCP 客户端。通过 MTProto 实现真实 Telegram 用户账户,基于浏览器的本地登录,100+ 工具。需要懒加载 + 更低上下文成本?参见 telegram-agent,基于技能的配套工具。 一个模型上下文协议(MCP)服务器,通过 MTProto 连接 Claude Desktop、Codex CLI、Cursor、Claude Code、VS Code、Cline、Windsurf、Goose 及任何其他兼容 MCP 的客户端,连接到真实的 Telegram 用户账户——这样你的代理可以通过聊天或自动工具调用读取、搜索、发送、管理和管理 Telegram 聊天,而无需点击 Telegram 界面。 全局阅读对话和搜索消息 ·发送/编辑/转发/反应/投票 ·下载媒体并转录语音笔记 ·管理频道(封禁/限制/推广、邀请链接、慢速模式、管理员日志、论坛话题)·管理故事、联系人、草稿、通知、文件夹、隐私 ·或者直接切换到原始MTProto桥接处理其他任何事情。
概述(AI 翻译)
MCP-电报
Telegram MCP 服务器,支持 Claude、Codex、Cursor、Claude Code、VS Code、Cline、Windsurf 及其他 MCP 客户端。通过 MTProto 实现真实 Telegram 用户账户,基于浏览器的本地登录,100+ 工具。需要懒加载 + 更低上下文成本?参见 telegram-agent,基于技能的配套工具。
一个模型上下文协议(MCP)服务器,通过 MTProto 连接 Claude Desktop、Codex CLI、Cursor、Claude Code、VS Code、Cline、Windsurf、Goose 及任何其他兼容 MCP 的客户端,连接到真实的 Telegram 用户账户——这样你的代理可以通过聊天或自动工具调用读取、搜索、发送、管理和管理 Telegram 聊天,而无需点击 Telegram 界面。
** 用它:** 阅读对话框和全球搜索消息 ·发送/编辑/转发/反应/投票 ·下载媒体并转录语音笔记 ·管理频道(封禁/限制/推广,邀请链接,慢速模式,管理员日志,论坛话题)·管理故事、联系人、草稿、通知、文件夹、隐私 ·或者通过原始的MTProto桥接处理其他事务。所有操作均通过单一登录用户账户完成——无需机器人。
[!警告] 该服务器登录为真实Telegram用户(非机器人)。会话存在于’~/.。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
mcp-telegram
Telegram MCP server for Claude, Codex, Cursor, Claude Code, VS Code, Cline, Windsurf, and other MCP clients. Real Telegram user account via MTProto, browser-based local sign-in, 100+ tools. Need lazy-loading + lower context cost? See telegram-agent, the skill-based companion.
A Model Context Protocol (MCP) server that connects Claude Desktop, Codex CLI, Cursor, Claude Code, VS Code, Cline, Windsurf, Goose, and any other MCP-compatible client to a real Telegram user account via MTProto—so your agent can read, search, send, moderate, and manage Telegram chats from chat or automated tool calls instead of clicking through the Telegram UI.
Use it to: read dialogs and search messages globally · send/edit/forward/react/poll · download media and transcribe voice notes · moderate channels (ban/restrict/promote, invite links, slow-mode, admin log, forum topics) · manage stories, contacts, drafts, notifications, folders, privacy · or fall through to the raw MTProto bridge for anything else. All against a single signed-in user account—no bot required.
[!WARNING] This server signs in as a real Telegram user (not a bot). Sessions live in
~/.telegram-agent/. Treat that directory like a password.
Prerequisites
- Node.js
>=20 - Telegram API credentials from my.telegram.org/apps —
api_idandapi_hash
Want a lighter transport?
This package is the MCP server — every tool schema (~12,700 tokens) sits in your agent’s context on every turn. Good for any MCP client and for hosted runtimes that can’t shell out.
If your agent is Claude Code / Codex CLI / Cursor / Gemini CLI / Cline / Windsurf, there’s a companion package — telegram-agent — that ships the same Telegram surface as a universal agent skill. The agent only loads the skill instructions when your prompt mentions Telegram — ~50× lower context cost in idle. Standalone (no MCP server in the loop), but uses the same ~/.telegram-agent/ session store as this package — sign in once, use either or both.
npm i -g telegram-agent
telegram-agent login
npx skills add beautyfree/telegram-agent -a claude-code -g
安装
npx -y mcp-telegram配置
{
"mcpServers": {
"telegram": {
"command": "npx",
"args": ["-y", "mcp-telegram"],
"env": {
"TELEGRAM_API_ID": "123456",
"TELEGRAM_API_HASH": "abc..."
}
}
}
}