电报-mcp
要求
Related MCP server: MCP-Communicator-Telegram
用法
安装依赖项
pip3 install uv
uv venv
source .venv/bin/activate
uv sync使用您的电报 api id 和哈希(我的电报)编辑 .env 文件,不要与他人分享。
启动 http 服务器
uv run http-server/http-server.py
安装 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 并重试
执照
Resources
Looking for Admin?
Admins can modify the Dockerfile, update the server description, and track usage metrics. If you are the server author, to access the admin panel.