CT

chaindead/telegram-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

350 stars 58 forks 质量 81 趋势 23MIT

Telegram MCP 用于管理对话框、消息、草稿、已读状态等。

概览

该服务器是Telegram API与AI助手之间的桥梁,基于模型上下文协议(Model Context Protocol)。 使用本服务器前,请确保您已阅读并理解 Telegram API 服务条款。任何 Telegram API 的滥用可能导致您的账户被暂停。 模型上下文协议(MCP)是一个系统,允许像Claude Desktop或Cursor这样的AI应用连接到外部工具和数据源。它为AI助手提供了一种清晰且安全的方式,能够与本地服务和API协作,同时保持用户的控制权。

概述(AI 翻译)

该服务器是Telegram API与AI助手之间的桥梁,基于模型上下文协议(Model Context Protocol)。

[!重要] 确保在使用该服务器之前,您已阅读并理解 Telegram API 的服务条款。 任何滥用Telegram API都可能导致您的账户被暂停。

目录

  • 什么是MCP?
  • 这个服务器是干什么的?
  • 能力
  • 提示示例
  • 消息管理
  • 组织结构
  • 通信
  • 安装
  • 自制内容
  • NPX
  • 来自发行
  • MacOS
  • Linux
  • 窗口
  • 来源
  • 配置
  • 授权
  • 客户端配置
  • JSON 模式版本
  • 星级历史

什么是MCP?

模型上下文协议(MCP)是一个系统,允许像Claude Desktop或Cursor这样的AI应用连接到外部工具和数据源。它为AI助手提供了一种清晰且安全的方式,能够与本地服务和API协作,同时保持用户的控制权。

这个服务器是干什么的?

能力

  • [x] 获取活期账户信息 (tool: tg_me)
  • [x] 带有可选未读过滤器的列表对话框(tool: tg_dialogs)
  • [x] 将对话框标记为已读(tool: tg_read)

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Telegram MCP server

The server is a bridge between the Telegram API and the AI assistants and is based on the Model Context Protocol.

[!IMPORTANT] Ensure that you have read and understood the Telegram API Terms of Service before using this server. Any misuse of the Telegram API may result in the suspension of your account.

Table of Contents

What is MCP?

The Model Context Protocol (MCP) is a system that lets AI apps, like Claude Desktop or Cursor, connect to external tools and data sources. It gives a clear and safe way for AI assistants to work with local services and APIs while keeping the user in control.

What does this server do?

Capabilities

  • [x] Get current account information (tool: tg_me)
  • [x] List dialogs with optional unread filter (tool: tg_dialogs)
  • [x] Mark dialog as read (tool: tg_read)
  • [x] Retrieve messages from specific dialog (tool: tg_dialog)
  • [x] Send draft messages to any dialog (tool: tg_send)

Prompt examples

Here are some example prompts you can use with AI assistants:

Message Management

  • “Check for any unread important messages in my Telegram”
  • “Summarize all my unread Telegram messages”
  • “Read and analyze my unread messages, prepare draft responses where needed”
  • “Check non-critical unread messages and give me a brief overview”

Organization

  • “Analyze my Telegram dialogs and suggest a folder structure”
  • “Help me categorize my Telegram chats by importance”
  • “Find all work-related conversations and suggest how to organize them”
在 GitHub 查看完整 README

安装

npx -y @chaindead/telegram-mcp
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "telegram": { "command": "npx", "args": ["-y", "@chaindead/telegram-mcp"], "env": { "TG_APP_ID": "<your-api-id>", "TG_API_HASH": "<your-api-hash>" } } } }