SM

sparfenyuk/mcp-telegram

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

190 stars 37 forks Качество 68 Тренд 17MIT

sparfenyuk/mcp-telegram — это кандидат на MCP-сервер, импортированный из https://github.com/sparfenyuk/mcp-telegram.

Обзор

sparfenyuk/mcp-telegram — это кандидат на MCP-сервер, импортированный из https://github.com/sparfenyuk/mcp-telegram.

Обзор (машинный перевод)

  • Telegram MCP-сервер
  • О компании
  • Что такое MCP?
  • Что делает этот сервер?
  • Практические сценарии применения
  • Предварительные требования
  • Установка
  • Конфигурация
  • Конфигурация API Telegram
  • Конфигурация рабочего стола Claude
  • Конфигурация Telegram
  • Разработка
  • Начало
  • Отладка сервера в терминале
  • Отладка сервера в Inspector
  • Устранение неисправностей
  • Сообщение «Не удалось подключиться к серверу MCP mcp-telegram»

О

Сервер является мостом между API Telegram и AI-ассистентами и основан на протоколе Model Context Protocol.

[! ВАЖНО] Убедитесь, что вы прочитали и поняли условия использования API Telegram перед использованием этого сервера. Любое неправильное использование API Telegram может привести к блокировке вашего аккаунта.

Что такое MCP?

Протокол контекста модели (MCP) — это система, позволяющая приложениям на базе ИИ, таким как Claude Desktop, подключаться к внешним инструментам и источникам данных. Она предоставляет понятный и безопасный способ для помощников ИИ работать с локальными сервисами и API, сохраняя при этом контроль пользователя.

Что делает этот сервер?

На данный момент сервер предоставляет доступ только для чтения к API Telegram.

  • [x] Получите список диалогов (чаты, каналы, группы)

Эта страница переведена автоматически. Технические детали смотрите в оригинале.

README

Показан фрагмент оригинального README. Открыть оригинал.

Telegram MCP server

About

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.

What is MCP?

The Model Context Protocol (MCP) is a system that lets AI apps, like Claude Desktop, 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?

As of not, the server provides read-only access to the Telegram API.

  • [x] Get the list of dialogs (chats, channels, groups)
  • [x] Get the list of (unread) messages in the given dialog
  • [ ] Mark chanel as read
  • [ ] Retrieve messages by date and time
  • [ ] Download media files
  • [ ] Get the list of contacts
  • [ ] Draft a message
  • …

Practical use cases

  • [x] Create a summary of the unread messages
  • [ ] Find contacts with upcoming birthdays and schedule a greeting
  • [ ] Find discussions on a given topic, summarize them and provide a list of links

Prerequisites

Installation

uv tool install git+https://github.com/sparfenyuk/mcp-telegram

[!NOTE] If you have already installed the server, you can update it using uv tool upgrade --reinstall command.

[!NOTE] If you want to delete the server, use the uv tool uninstall mcp-telegram command.

Configuration

Telegram API Configuration

Before you can use the server, you need to connect to the Telegram API.

  1. Get the API ID and hash from Telegram API

  2. Run the following command:

Открыть полный README на GitHub

Установка

npx @modelcontextprotocol/inspector uv run mcp-telegram
Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "mcp-telegram": { "command": "mcp-server", "env": { "TELEGRAM_API_ID": "<your-api-id>", "TELEGRAM_API_HASH": "<your-api-hash>", }, } } } }