Skip to main content
Glama

Telegram MCP Server

电报-mcp

要求

Related MCP server: MCP-Communicator-Telegram

用法

  1. 安装依赖项

pip3 install uv uv venv source .venv/bin/activate uv sync
  1. 使用您的电报 api id 和哈希(我的电报)编辑 .env 文件,不要与他人分享。

  2. 启动 http 服务器

uv run http-server/http-server.py

  1. 安装 MCP 服务器

uv run mcp install mcp-server/mcp-server.py

可用函数

MCP 服务器提供以下功能:

  • get_unread_entities :获取包含未读消息的实体

  • get_unread_messages(id) :获取给定实体 id 的所有未读消息

  • get_messages(id, count) :从实体中获取按计数限制的消息

  • get_entities :获取当前会话中的所有实体

  • get_entity_by_id(id) :从当前会话中获取实体

  • send_message(entity_id, content, reply_to_message_id) :向实体发送带有可选标记和回复的消息

常见问题及解决方法

  • Claude 无法运行 MCP 服务器 >> 使用 brew 安装 uv: brew install uv

  • 无法在 Telegram 中创建新应用 >> 断开 VPN 并重试

执照

麻省理工学院

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/prem-research/telegram-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server