MCP Telegram A0999a65

MCP办公协作

提供方 tacticlaunch · 包名 mcp-telegram

办公协作 stdio · 本地进程 无需鉴权 社区 / 第三方 ClaudeCursor
查看接入方式

一个连接多种MCP客户端(如Claude Desktop、Codex CLI、Cursor等)到真实Telegram用户账户的MCP服务器,支持通过MTProto进行聊天管理、消息搜索、媒体下载等多种操作。

一句话选型结论

按资料字段整理

MCP Telegram A0999a65 属于办公协作类 MCP 服务器,stdio · 本地进程,无需鉴权,可直接接入 Claude、Cursor,有可直接执行的安装命令。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类办公协作 传输方式stdio · 本地进程 鉴权无需鉴权 部署方式本地部署
GitHub 星标 1 仓库热度,无公开仓库时显示未标注
工具数 2 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

办公协作
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量2暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

支持客户端

适用场景

Telegram集成TypeScript本地部署MTProto协议AI工具TypeScript开发

安装与配置

stdio · 本地进程 无需鉴权
客户端在本机拉起子进程,数据不出本机
npx mcp-telegram sign-in

这条命令只是入口,具体启动参数请按官方文档补齐,不要直接照搬到别的服务器。

  1. 1
    准备运行环境

    stdio 服务在本地起进程,需要先装好 Node.js,再按安装命令拉取依赖。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后客户端会列出约 2 个工具,随便调一个只读工具确认能返回结果。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
日程与消息

查日程、发消息、约会议。

表单与审批

填表单、走审批流。

团队协作

同步任务、汇总进展。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 资料标注 2 个工具,职责相对集中,接入后不容易误操作。
  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 已适配 Claude、Cursor,换客户端不用重新研究配置。
  • 资料标注无需鉴权,装好就能连。

先想清楚的地方

  • stdio 方式要求本地装好运行时(如 Node.js),换机器要重新装一遍。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在办公协作场景里让模型直接调用外部能力的人。
  • 已经在用 Claude、Cursor 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 完全不想在本地装环境的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
MCP Telegram A0999a65当前 2 stdio · 本地进程 本地部署 有 2026-05-17
CowAgent 未标注 stdio · 本地进程 本地部署 有 2026-04-11
Karakeep MCP 未标注 未标注 未标注 无 2026-05-17
agentscope 未标注 stdio · 本地进程 本地部署 有 2026-04-11
note-gen 未标注 stdio · 本地进程 本地部署 有 2026-04-11
Everywhere 未标注 stdio · 本地进程 本地部署 有 2026-04-12

服务器档案

办公协作
字段来自项目仓库与公开索引,中文说明由本站标注
提供方tacticlaunch上游标注的维护方 tacticlaunch
分类办公协作本站按上游分类展示
连接方式stdio · 本地进程客户端在本机拉起子进程,数据不出本机
鉴权方式无需鉴权远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时mcp-telegram · Node.js本地安装时用到的包标识与运行时
部署类型本地部署上游给出的部署形态
最近核验2026-05-17上游最后核验时间

详细介绍

16.5 KB
来自项目仓库与上游目录的原文,未做删改

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

  1. Node.js >=20
  2. Telegram API credentials from my.telegram.org/apps — api_id and api_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.```bash
npm i -g telegram-agent
telegram-agent login
npx skills add beautyfree/telegram-agent -a claude-code -g


Continue below for the MCP install path.

## Install

**Option A — automatic, all clients:**```bash
npx add-mcp mcp-telegram \
  --env TELEGRAM_API_ID=123456 \
  --env TELEGRAM_API_HASH=abc...

add-mcp (from Neon) writes the correct config for Claude Desktop, Claude Code, Cursor, VS Code, Codex, Gemini CLI, Cline, Zed, Goose, OpenCode, and others. Pick the client in the interactive prompt.

> [!IMPORTANT]
> Both env vars are required. Get them from my.telegram.org/apps.

Option B — manual config:

Claude Desktop (claude_desktop_config.json)```json
{
"mcpServers": {
"telegram": {
"command": "npx",
"args": ["-y", "mcp-telegram"],
"env": {
"TELEGRAM_API_ID": "123456",
"TELEGRAM_API_HASH": "abc..."
}
}
}
}


Cursor (~/.cursor/mcp.json)```json
{
  "mcpServers": {
    "telegram": {
      "command": "npx",
      "args": ["-y", "mcp-telegram"],
      "env": {
        "TELEGRAM_API_ID": "123456",
        "TELEGRAM_API_HASH": "abc..."
      }
    }
  }
}

VS Code (.vscode/mcp.json)```json
{
"servers": {
"telegram": {
"type": "stdio",
"command": "npx",
"args": ["-y", "mcp-telegram"],
"env": {
"TELEGRAM_API_ID": "123456",
"TELEGRAM_API_HASH": "abc..."
}
}
}
}


Claude Code```bash
claude mcp add telegram \
  -e TELEGRAM_API_ID=123456 \
  -e TELEGRAM_API_HASH=abc... \
  -- npx -y mcp-telegram

Codex CLI (~/.codex/config.toml) — install```toml
[mcp_servers.telegram]
command = "npx"
args = ["-y", "mcp-telegram"]
env = { TELEGRAM_API_ID = "123456", TELEGRAM_API_HASH = "abc..." }


## First-time sign in

Ask your agent:

> Sign in to my Telegram.

The agent calls the `login` tool. A browser tab opens. Enter your phone number, the SMS code, and 2FA password if you have one. The tab shows a green checkmark — you can close it. The session is now stored locally and the agent can read your Telegram.

To add another account, ask the agent to call `login` again.

## Tools

102 tools covering the full Telegram user-account surface. Common ones below; the rest are grouped under collapsibles. Every tool accepts an optional `accountId` (omit when only one account is signed in). `peer` accepts a numeric chat id, an `@username`, or the literal `"me"` (Saved Messages).

**Top of the menu:**

| Tool | What it does |
| --- | --- |
| `login` | Open the browser-based sign-in flow. Adds an account. |
| `list_accounts` | List signed-in accounts. |
| `list_dialogs` | List dialogs/chats/channels. Filters: `unread`, `archived`, `ignorePinned`, `folder`, `limit`. |
| `list_messages` | List messages in a dialog. Newest first. |
| `search_messages` | Search inside one dialog: `query`, `filter` (photos/videos/url/voice/...), `fromUser`, date range. |
| `search_global` | Search across every chat you have. |
| `search_dialogs` | Find dialogs by name/title/username substring. |
| `send_message` | Send text. Supports `replyTo`, `topMsgId`, `parseMode`, `schedule`, `silent`. |
| `send_file` | Send a file (local path or `https://` URL). Pass an array for an album. |
| `download_media` | Save the media on a message to disk. |
| `transcribe_message` | Transcribe a voice/video note (Premium). |
| `invoke_mtproto` | Call any raw MTProto method by name. Auto-resolves `peer`/`channel`/`user` strings. |

Sessions (local) (4)

These are local-only: they manage which Telegram sessions live in `~/.telegram-agent/` and the settings UI. No Telegram API call beyond the sign-in flow itself.

| Tool | What it does |
| --- | --- |
| `list_accounts` | List signed-in accounts. |
| `login` | Browser-based sign-in. Adds an account. |
| `logout` | Drop a local session and revoke it on Telegram. |
| `open_settings` | Open the local settings page (tool surface + read-only). |

Profile (5)

| Tool | What it does |
| --- | --- |
| `get_me` | Return the profile of the authenticated user. |
| `update_profile` | Change own first/last name and bio. |
| `update_my_username` | Set or clear own `@username`. |
| `set_birthday` | Set the account birthday. |
| `set_profile_photo` | Upload a new avatar (local path or URL). |

Dialog discovery (5)

| Tool | What it does |
| --- | --- |
| `list_dialogs` | List dialogs. Filters: `unread`, `archived`, `ignorePinned`, `folder`, `limit`. |
| `search_dialogs` | Find dialogs by name/title/username substring. |
| `resolve_username` | Resolve `@username` to a user/channel/chat entity. |
| `list_folders` | List custom dialog folders (chat filters). |
| `list_contacts` | List contacts. |

Messages — read & search (6)

| Tool | What it does |
| --- | --- |
| `list_messages` | List messages in a dialog. |
| `search_messages` | Search inside one dialog (text, type filter, sender, date range). |
| `search_global` | Search across every chat. |
| `get_message` | Fetch one or more messages by id. |
| `get_message_reactions` | Get reactions on messages. |
| `mark_as_read` | Mark messages read up to an id. |

Messages — write (8)

| Tool | What it does |
| --- | --- |
| `send_message` | Send text. |
| `edit_message` | Edit a previously sent message. |
| `delete_messages` | Delete by id (optionally revoke for all). |
| `forward_messages` | Forward messages between dialogs. |
| `pin_message` / `unpin_message` | Pin / unpin in a dialog. |
| `send_reaction` | Set reactions on a message. |
| `send_message_to_phone` | Send to a phone number, auto-creates a temporary contact. |

Media (4)

| Tool | What it does |
| --- | --- |
| `send_file` | Send a file (path or URL). Albums via array. |
| `download_media` | Save a message's media to disk. |
| `download_profile_photo` | Save a peer's avatar to disk. |
| `transcribe_message` | Transcribe voice/video (Premium). |

Polls (4)

| Tool | What it does |
| --- | --- |
| `send_poll` | Send a poll. Supports quiz, multiple-choice, anonymous, close period. |
| `vote_poll` | Cast a vote. |
| `close_poll` | Finalize a poll. |
| `get_poll_results` | Fetch tally. |

Reactions (3)

| Tool | What it does |
| --- | --- |
| `send_reaction` | Set emoji reactions on a message. |
| `get_message_reactions` | Read reactions. |
| `set_default_reaction` | Set account-wide default. |

Stories (6)

| Tool | What it does |
| --- | --- |
| `list_stories` | Feed of contacts' stories. |
| `get_peer_stories` | One peer's stories. |
| `send_story` | Post a story (photo or video). |
| `delete_story` | Delete own stories. |
| `view_story` | Mark stories viewed. |
| `get_story_viewers` | List who viewed your story. |

Channel / group moderation (11)

| Tool | What it does |
| --- | --- |
| `ban_user` | Full ban (optional `untilDate`). |
| `unban_user` | Lift restrictions. |
| `restrict_user` | Apply a custom rights mask. |
| `promote_admin` | Grant admin rights (with rank). |
| `demote_admin` | Strip admin rights. |
| `invite_user` | Add users to a channel/supergroup. |
| `kick_participant` | Kick from chat/channel. |
| `get_participant` | Single participant info. |
| `list_participants` | Members with filter (admins/banned/bots/...) and substring search. |
| `delete_user_history` | Remove every message by a user. |
| `get_admin_log` | Recent admin events with event-type filter. |

Channel / group settings (12)

| Tool | What it does |
| --- | --- |
| `edit_title` | Change title (works for channels, supergroups, and basic groups). |
| `edit_about` | Change description. |
| `edit_photo` | Change avatar (path or URL). |
| `update_username` | Set/clear public `@username`. |
| `check_username` | Check availability. |
| `set_slow_mode` | Set slow-mode seconds. |
| `toggle_signatures` | Author signatures on channel posts. |
| `toggle_pre_history_hidden` | Hide history from new members. |
| `toggle_join_request` | Require admin approval to join. |
| `leave_channel` | Leave a channel/supergroup. |
| `get_channel_info` | Extended info (about, counts, linked chat, slow-mode). |
| `get_user_info` | Extended user info (bio, common chats). |

Channel / group lifecycle (4)

| Tool | What it does |
| --- | --- |
| `create_channel` | New broadcast channel or supergroup (optional forum mode). |
| `delete_channel` | Permanently delete. |
| `migrate_chat` | Basic group → supergroup. |
| `transfer_ownership` | Hand over creator rights (requires 2FA password). |

Invite links (4)

| Tool | What it does |
| --- | --- |
| `create_invite_link` | New link with optional expiry, usage cap, join-request gate. |
| `list_invite_links` | List active or revoked links. |
| `revoke_invite_link` | Revoke a specific link. |
| `list_invite_joiners` | List users that joined via a link. |

Forum topics (3)

| Tool | What it does |
| --- | --- |
| `list_topics` | List forum topics. |
| `create_topic` | Create a new topic. |
| `edit_topic` | Rename, re-icon, close, hide. |

Drafts (3)

| Tool | What it does |
| --- | --- |
| `save_draft` | Save a draft for a dialog. |
| `clear_draft` | Drop the draft for a dialog. |
| `list_drafts` | List all dialog drafts. |

Notifications (4)

| Tool | What it does |
| --- | --- |
| `mute_peer` | Mute a chat (optional `untilDate`). |
| `unmute_peer` | Unmute. |
| `get_notify_settings` | Read settings. |
| `set_notify_settings` | Update mute, previews, sound, story-mute. |

Folders (chat filters) (4)

| Tool | What it does |
| --- | --- |
| `create_folder` | New folder with include/exclude rules. |
| `edit_folder` | Replace folder rules. |
| `delete_folder` | Remove a folder. |
| `reorder_folders` | Set display order. |

Contacts (4)

| Tool | What it does |
| --- | --- |
| `list_contacts` | All contacts. |
| `add_contact` | Add a user to contacts. |
| `delete_contact` | Remove users from contacts. |
| `search_contacts` | Search contacts + global directory. |

Privacy & blocking (5)

| Tool | What it does |
| --- | --- |
| `block_user` / `unblock_user` | Block / unblock. |
| `list_blocked` | Block list. |
| `get_privacy` | Read a privacy key. |
| `set_privacy` | Update a privacy key (mode + allow/disallow lists). |

Stickers (3)

| Tool | What it does |
| --- | --- |
| `get_my_stickers` | Installed sticker sets. |
| `install_sticker_set` | Install by short name. |
| `add_recent_sticker` | Pin a sticker to recent. |

Premium boosts (2)

| Tool | What it does |
| --- | --- |
| `get_my_boosts` | List your boost slots. |
| `apply_boost` | Apply slots to a channel. |

Bots & raw MTProto (2)

| Tool | What it does |
| --- | --- |
| `get_inline_bot_results` | Run an inline bot query. |
| `invoke_mtproto` | Call any MTProto method by qualified name (e.g. `messages.SendMessage`, `stories.GetAllStories`). String values for `peer`/`channel`/`user`/`fromPeer`/`toPeer`/`bot`/`chat` are auto-resolved to InputPeer / InputUser. |

### Gating which tools are exposed

Three env vars, applied in order:

| Variable | Effect |
| --- | --- |
| `MCP_TELEGRAM_READONLY=1` | Hide every destructive / mutating tool. |
| `MCP_TELEGRAM_TOOLS=name1,name2,prefix*` | Strict allowlist — only these tools register. |
| `MCP_TELEGRAM_DISABLE=name1,prefix*` | Blocklist applied after the allowlist. |

Examples:```bash
MCP_TELEGRAM_READONLY=1                                    # read-only agent
MCP_TELEGRAM_TOOLS='login,list*,search*,get*'              # discovery-only
MCP_TELEGRAM_DISABLE='delete*,ban*,kick*,create_channel,delete_channel,transfer_ownership,invokeMtproto'  # safer write set

Environment

Variable Required Default Notes
TELEGRAM_API_ID yes — From my.telegram.org/apps. If unset, the auth page prompts for it and saves to state.json.
TELEGRAM_API_HASH yes — Same as above.
TELEGRAM_AGENT_HOME no ~/.telegram-agent State + per-account session storage. Legacy MCP_TELEGRAM_HOME still accepted. If only ~/.mcp-telegram exists from a previous install, it's used automatically.
TELEGRAM_AGENT_DOWNLOADS no $TELEGRAM_AGENT_HOME/downloads Where download_media / download_profile_photo save files. Legacy MCP_TELEGRAM_DOWNLOADS still accepted.
MCP_TELEGRAM_READONLY no — Set to 1/true/yes to hide every destructive tool.
MCP_TELEGRAM_TOOLS no — Strict allowlist. Comma-separated tool names; supports prefix* wildcards. If set, anything not matched is hidden.
MCP_TELEGRAM_DISABLE no — Blocklist applied after the allowlist. Same syntax.
LOG_LEVEL no info debug for verbose stderr.

Choosing which tools the agent sees

The three gating vars stack — MCP_TELEGRAM_READONLY → MCP_TELEGRAM_TOOLS → MCP_TELEGRAM_DISABLE.```bash

Read-only agent — every mutating tool is hidden

MCP_TELEGRAM_READONLY=1

Discovery-only — only login + the list/search/get tools

MCP_TELEGRAM_TOOLS='login,list,search,get*,resolveUsername'

Allow writes but keep destructive ones away from the agent

MCP_TELEGRAM_DISABLE='delete,ban,kick*,create_channel,delete_channel,transfer_ownership,invokeMtproto'

Specific surface: read + send/edit only

MCP_TELEGRAM_TOOLS='login,list_accounts,list_dialogs,list_messages,search_messages,search_global,send_message,editMessage'


In an MCP client config, drop these into the same `env` block as `TELEGRAM_API_ID`/`TELEGRAM_API_HASH`. To verify, re-open your client — the tools the server advertises are exactly the ones registered after the gates run.

## Data layout```
~/.telegram-agent/
├── state.json          known accounts (no secrets in here)
└── sessions/
    └── <account_id>/   per-account MTProto session

If a Telegram session is invalidated server-side (logged out from another device, password rotated, etc.), the next tool call returns an error telling the agent to call login to re-authorize.

Development```bash

git clone https://github.com/beautyfree/mcp-telegram
cd mcp-telegram
npm install
echo "TELEGRAM_API_ID=...\nTELEGRAM_API_HASH=..." > .env
npm run dev


Layout:```
src/
├── index.ts           bin entry — stdio MCP server, tool registrations
├── telegram.ts        MTProto client + login state machine
├── auth-browser.ts    ephemeral HTTP server that drives the browser flow
├── auth-page.ts       inline HTML for the auth page
├── state.ts           persistent state in ~/.telegram-agent/
└── logger.ts

License

MIT — see LICENSE.


Also known as

Telegram MCP · MCP Telegram · Telegram MCP server · Telegram for Claude · Telegram for Cursor · Telegram for Claude Code · Telegram for VS Code · Telegram for Codex · Telegram for Cline · Telegram for Windsurf · Telegram for AI agents · Telegram MTProto MCP · Telegram user-account MCP · Telegram automation MCP · Model Context Protocol Telegram · MCP server Telegram · gramjs MCP

常见问题

8 问
答案由本站依据条目字段整理,不引用上游原文
MCP Telegram A0999a65 怎么安装?

在客户端按下面的安装命令接入:npx mcp-telegram sign-in。对应的包名是 mcp-telegram。装完在客户端配置里引用同一个包或端点。

MCP Telegram A0999a65 怎么在 Claude、Cursor 里配置?

它的传输方式是stdio · 本地进程,在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,配置才会生效。

MCP Telegram A0999a65 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

MCP Telegram A0999a65 需要 API Key 吗?

资料标注为无需认证,装好就能连;如果实际调用时报鉴权错误,按官方文档补上凭据。

MCP Telegram A0999a65 支持哪些客户端?

资料标注支持 Claude、Cursor;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

MCP Telegram A0999a65 能提供哪些能力?

资料显示约 2 个工具;能力标签包括 TypeScript、Claude、TypeScript开发。具体工具清单以官方文档为准。

MCP Telegram A0999a65 需要什么运行环境?

运行时为 Node.js;属于本地进程,需要在本机装好运行环境。

MCP Telegram A0999a65 是本地还是远程?

它是本地进程(stdio),由客户端在本机拉起。传输方式为stdio · 本地进程。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 2026-05-17。