prem-research
可用工具 (6 个)
该服务在 MCP 协议中暴露的工具,AI 可按需调用
get_unread_entities
get entitites which have unread messages in it
该工具无需必填参数,直接调用即可
get_unread_messages 1 个参数
get all unread messages from a given entity id
该工具无需必填参数,直接调用即可
get_messages 2 个参数 需填 1 项
Get messages limited by a count from an entity
必填参数:id
get_entities
Get all entities in the current session
该工具无需必填参数,直接调用即可
get_entity_by_id 1 个参数
Get an entity from the current session
该工具无需必填参数,直接调用即可
send_message 3 个参数 需填 1 项
Send a message to an entity with optional markup and reply
必填参数:entity_id
服务介绍
telegram-mcp
要求
使用方法
- 安装依赖项
pip3 install uv
uv venv
source .venv/bin/activate
uv sync
-
编辑
.env文件,填入你的 Telegram API ID 和哈希值(My Telegram),不要与他人分享。 -
启动 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): 从当前会话中获取指定 ID 的实体send_message(entity_id, content, reply_to_message_id): 向实体发送消息,可选带标记和回复
常见问题及解决方法
- Claude 无法运行 MCP 服务器 >> 使用 brew 安装 UV:
brew install uv - 无法在 Telegram 中创建新应用 >> 断开 VPN 并重试