Skip to main content
Glama
archetyx
by archetyx

Telegram MCP Server

Remote control AI coding assistants (Claude Code / Codex) via Telegram

PyPI Python License

English | 简体中文

Why This Project?

Have you ever encountered these scenarios:

  • 💤 Late at night in bed, you suddenly think of a bug that needs fixing, but don't want to get up and open your laptop?

  • 🚇 On your commute, you want AI to refactor code for you, but your laptop isn't with you?

  • 🏢 Multiple Claude Code or Codex sessions running on remote servers, and you want to check their progress anytime?

  • Long-running tasks (testing, building, refactoring) that take hours, but you don't want to sit in front of the computer?

Telegram MCP Server was created to solve these problems!

Through the MCP (Model Context Protocol), this project allows you to:

  • 📱 Anytime, anywhere view and control AI coding assistants via Telegram

  • 🔄 Multi-session management: Use screen on remote servers to manage multiple projects simultaneously

  • 🌙 True unattended mode: Wait up to 7 days with smart polling, minimal system resources

  • 💬 Simple interaction: Send messages via Telegram to give AI assistants next instructions

Perfect for:

  • 24/7 remote servers

  • Long-running tasks

  • Multi-project parallel development

  • Remote work from anywhere

Related MCP server: tsgram-mcp

Features

  • 🌙 True Unattended Mode - Wait up to 7 days with smart progressive polling

  • 📱 Remote Control - Control AI assistants from anywhere via Telegram

  • 🔄 Two-way Communication - Send notifications, receive replies, continuous dialogue

  • 📁 File Operations - View and download project files

  • 🎯 Multi-session Management - Manage multiple projects simultaneously

  • 🤖 Universal Support - Works with both Claude Code and Codex

⚡ Quick Start (New Users)

Installation & Setup (One Command)

# Use uvx (recommended, no installation needed, always latest version)
uvx --refresh telegram-mcp-server@latest --setup

This will:

  1. ✅ Download the latest version from PyPI

  2. ✅ Guide you through Telegram Bot setup

  3. ✅ Auto-configure Claude Code / Codex / Gemini CLI

  4. ✅ Test the connection

That's it! 🎉

Verify Installation

# Check version (should be 0.2.1 or higher)
uvx telegram-mcp-server@latest --version

Expected output:

telegram-mcp-server version 0.2.1
https://github.com/batianVolyc/telegram-mcp-server

📖 Detailed Installation

# Always use latest version
uvx telegram-mcp-server@latest --setup

# Or using pip
pip install telegram-mcp-server

2. Setup

telegram-mcp-server --setup

Interactive wizard will help you:

  • Create Telegram Bot

  • Get credentials

  • Auto-configure AI assistant

Option B: Manual Setup with mcp add

If you already have your Telegram Bot Token and Chat ID, you can quickly add using the mcp add command:

Claude Code:

claude mcp add \
  --transport stdio \
  telegram \
  --env TELEGRAM_BOT_TOKEN=YOUR_TOKEN_HERE \
  --env TELEGRAM_CHAT_ID=YOUR_CHAT_ID_HERE \
  -- \
  uvx telegram-mcp-server

Codex:

codex mcp add telegram \
  --env TELEGRAM_BOT_TOKEN=YOUR_TOKEN_HERE \
  --env TELEGRAM_CHAT_ID=YOUR_CHAT_ID_HERE \
  -- \
  npx -y telegram-mcp-server

Gemini CLI:

gemini mcp add telegram uvx telegram-mcp-server \
  -e TELEGRAM_BOT_TOKEN=YOUR_TOKEN_HERE \
  -e TELEGRAM_CHAT_ID=YOUR_CHAT_ID_HERE

💡 Tip: Replace YOUR_TOKEN_HERE and YOUR_CHAT_ID_HERE with your actual values

3. Usage

# Recommended: Start with bypass permissions mode
# Avoid interruptions due to permission confirmations during AI-Telegram interaction
# Note: Cannot run as root due to security mechanisms

# Claude Code
claude --permission-mode bypassPermissions

# Codex
codex --dangerously-bypass-approvals-and-sandbox

# Gemini CLI (YOLO mode - auto-approve all MCP calls)
gemini --yolo

# In the AI assistant
> Enter unattended mode. Task: analyze project structure

Check results in Telegram and continue the conversation!

How It Works

AI Assistant (Claude Code/Codex)
  ↓ MCP Protocol
MCP Server (telegram-mcp-server)
  ├─ 8 tools (notify, wait, file operations, etc.)
  └─ Telegram Bot (background process)
      ↓ Telegram API
Your Telegram Client

Core Features

MCP Tools (8 tools)

  • telegram_notify - Send structured notifications (recommended)

  • telegram_wait_reply - Wait for user reply (blocking poll)

  • telegram_unattended_mode - Unattended mode (smart loop)

  • telegram_send_code - Send code (with syntax highlighting)

  • telegram_send_image - Send images

  • telegram_send_file - Send files

  • telegram_send - Send free-form messages

  • telegram_get_context_info - Get session context info

Telegram Commands (6 commands)

  • /sessions - List all sessions

  • /status <id> - Check session status

  • /to <id> <msg> - Send message to session

  • /file <id> <path> - View file

  • /delete <id> - Delete session

  • /help - Show help

Smart Polling

Progressive polling strategy, wait up to 7 days:

Wait Time

Check Frequency

Response Delay

0-30 min

Every 30s

Max 30s

30-60 min

Every 60s

Max 60s

1+ hour

Every 120s

Max 120s

Use Cases

Scenario 1: Overnight Tasks

# 10 PM
> Enter unattended mode. Task: run full test suite and fix all errors

# 8 AM - check results in Telegram

Scenario 2: Remote Work

# At office
> Enter unattended mode. Task: refactor database access layer

# On the road - monitor and control via Telegram

Scenario 3: Multi-project Management (Remote Server + screen)

# SSH to remote server
ssh user@server

# Create multiple screen sessions
screen -S project-a
cd /path/to/project-a
TELEGRAM_SESSION="proj-a" claude --permission-mode bypassPermissions
# Ctrl+A D to detach

screen -S project-b
cd /path/to/project-b
TELEGRAM_SESSION="proj-b" codex --dangerously-bypass-approvals-and-sandbox
# Ctrl+A D to detach

# Manage both projects in Telegram
# Sessions keep running even after closing SSH

Scenario 4: Late Night in Bed

# During the day, start session on server
screen -S night-task
TELEGRAM_SESSION="night-fix" claude --permission-mode bypassPermissions

# At night in bed, send commands via Telegram
/to night-fix Fix null pointer exception in auth.py

# Next morning, check results
/status night-fix

Configuration

Claude Code

Supports three configuration scopes:

MCP Server Configuration:

  • User scope: ~/.claude.json - Global config

  • Project scope: .mcp.json - Team shared

  • Local scope: .claude.json - Project specific

Environment Variables (auto-configured):

  • ~/.claude/settings.json - Contains MCP_TOOL_TIMEOUT=604800000 (7-day timeout)

Codex

Global config: ~/.codex/config.toml

Auto-includes tool_timeout_sec = 604800 (7 days timeout)

Environment Variables

# Custom session name
TELEGRAM_SESSION="my-task" claude

# Custom max wait time
TELEGRAM_MAX_WAIT=86400 claude  # 24 hours

# Custom poll intervals
TELEGRAM_POLL_INTERVAL="10,30,60" claude

Troubleshooting

Issue: Telegram Bot Not Responding

# Check logs
tail -f /tmp/telegram-mcp-server.log

# Quick fix
cd telegram-mcp-server
./quick_fix.sh

Issue: Codex 60s Timeout

# Auto fix
./fix_codex_timeout.sh

Issue: Session Not Registered

# Reconfigure
telegram-mcp-server --setup

Documentation

Requirements

  • Python 3.10+

  • Claude Code or Codex

  • Telegram account

Contributing

Contributions welcome! See CONTRIBUTING.md

License

MIT License - see LICENSE

Support


Let AI coding assistants work for you, not you waiting for them 🚀

Available Tools

8 tools
telegram_get_context_infoA
        获取并发送当前会话的上下文信息到 Telegram

        ⚠️ 重要:调用此工具时,你应该:
        1. 检查系统提供的 token 使用量信息(<budget:token_budget> 标签)
        2. 将 token 使用情况包含在发送的信息中
        3. 发送完整的上下文信息(会话信息 + token 使用情况)

        返回信息应包括:
        - 会话 ID 和项目路径
        - Token 使用量(已使用 / 总量 / 剩余 / 使用率)
        - 会话运行时间
        - 系统信息
        - Telegram 配置

        示例输出格式:
        📊 会话上下文信息
        🆔 会话: testtg
        📁 项目: /path/to/project

        💾 Token 使用:
        - 已使用: 41,853 tokens
        - 总容量: 1,000,000 tokens
        - 剩余: 958,147 tokens
        - 使用率: 4.2%

        ⏱️ 运行时间: 15 分钟
        🖥️ 系统: Darwin 24.6.0
        🐍 Python: 3.14.0
        
ParametersJSON Schema
NameRequiredDescriptionDefault
token_totalNo总 token 容量(从系统预算信息中获取)
token_usedNo已使用的 token 数量(从系统预算信息中获取)

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It effectively discloses key behavioral traits: it's a read-only operation (获取并发送 implies retrieval and transmission, not mutation), requires specific data inputs (token usage from system budget), and specifies the output format and content. However, it doesn't mention potential side effects like rate limits or authentication needs, though these might be less critical for this tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized but not optimally structured. It front-loads the purpose clearly, but the detailed instructions and example output format (while helpful) make it somewhat verbose. Every sentence earns its place by providing necessary guidance, but it could be more streamlined for quick scanning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (2 parameters, no output schema, no annotations), the description is quite complete. It covers purpose, usage steps, output content, and example format. The main gap is the lack of an output schema, but the description compensates by detailing the return information and providing an example. For a context-reporting tool, this is sufficient though not exhaustive.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description adds significant value beyond the schema: it explains that token_total and token_used should be derived from system budget information (<budget:token_budget>), provides context for why these parameters are needed (to include token usage in the output), and shows how they're used in the example output format. This compensates well for the schema-only documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: '获取并发送当前会话的上下文信息到 Telegram' (get and send current session context information to Telegram). It specifies the exact action (get and send), resource (context information), and destination (Telegram), distinguishing it from sibling tools like telegram_send or telegram_notify which appear to send generic messages or notifications.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit usage guidelines: it instructs when to use this tool (to send context information including token usage), specifies prerequisites (checking system token usage via <budget:token_budget>), and outlines required steps (include token usage, send complete context). It implicitly distinguishes from siblings by focusing on context info rather than general messaging or file sending.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

telegram_notifyA
        发送结构化通知到 Telegram

        参数:
        - event: 事件类型(completed/error/question/progress)
        - summary: 简短总结,必填,限制200字以内
        - details: 详细信息,可选

        最佳实践:
        1. summary 必须简洁明了(1-2句话),说明做了什么、结果如何
        2. 不要包含思考过程、不要包含代码片段
        3. 需要用户决策时,清晰说明选项

        示例:
        telegram_notify(
            event="completed",
            summary="修复了 auth.py:45 的空指针异常,所有测试通过",
            details="修改文件: auth.py, test_auth.py\n测试: 12/12 passed"
        )

        telegram_notify(
            event="question",
            summary="发现3种修复方案:1)添加空值检查 2)使用Optional类型 3)重构整个模块。推荐方案1,是否继续?"
        )
        
ParametersJSON Schema
NameRequiredDescriptionDefault
detailsNo详细信息(可选)
eventYes事件类型
summaryYes简短总结(必填,200字以内)

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses behavioral traits such as the tool's function (sending notifications), parameter constraints (e.g., summary length limit), and best practices for content. However, it lacks details on potential side effects (e.g., rate limits, authentication needs), which would be helpful for a notification tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (purpose, parameters, best practices, examples), front-loaded with the core purpose. Every sentence adds value, such as clarifying parameter roles and providing actionable guidance, with no wasted text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (3 parameters, no output schema, no annotations), the description is mostly complete. It covers purpose, parameters, usage guidelines, and examples. However, it lacks details on behavioral aspects like error handling or response format, which would enhance completeness for a notification tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description adds value by explaining parameter semantics in Chinese, providing best practices for 'summary' and 'details', and including examples that illustrate usage. This compensates for the schema's basic descriptions, though it doesn't add deep technical details beyond what's implied.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: '发送结构化通知到 Telegram' (send structured notifications to Telegram). It specifies the verb '发送' (send) and the resource 'Telegram', and distinguishes it from sibling tools like telegram_send, telegram_send_code, etc., by emphasizing structured notifications with specific event types rather than general messaging.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit usage guidelines in the '最佳实践' (Best Practices) section, including when to use (e.g., for concise summaries without code snippets) and when not to use (e.g., avoid including thought processes). It also implicitly distinguishes from siblings by focusing on structured notifications, though it doesn't name alternatives directly.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

telegram_sendA
        发送自由格式消息到 Telegram(不推荐,请优先使用 telegram_notify)

        自动处理:
        - 超过300字自动截断
        - 会提示使用 telegram_notify 发送结构化消息
        
ParametersJSON Schema
NameRequiredDescriptionDefault
messageYes消息内容

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses key behavioral traits: automatic truncation for messages over 300 characters and a prompt to use 'telegram_notify' for structured messages. However, it doesn't cover other potential behaviors like error handling, rate limits, or authentication needs, leaving some gaps for a tool with no annotation support.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and well-structured into three brief points: purpose, automatic handling, and recommendation. Each sentence adds value without redundancy. However, the formatting includes extra whitespace and quotes, slightly detracting from cleanliness, but the content itself is efficiently presented.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (1 parameter, no output schema, no annotations), the description is fairly complete. It covers purpose, usage guidelines, and key behaviors like truncation. However, it lacks details on return values or error cases, which could be useful despite no output schema. For a simple tool, this is adequate but not exhaustive.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the 'message' parameter documented as '消息内容' (message content). The description doesn't add any parameter-specific semantics beyond what the schema provides, such as format constraints or examples. With high schema coverage, the baseline score of 3 is appropriate, as the description doesn't compensate but doesn't need to heavily.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: '发送自由格式消息到 Telegram' (send free-form messages to Telegram). It specifies the verb ('发送' - send) and resource ('Telegram'), and distinguishes it from the sibling 'telegram_notify' by mentioning it's for free-form messages. However, it doesn't fully differentiate from other siblings like 'telegram_send_code', 'telegram_send_file', or 'telegram_send_image', which also send content to Telegram.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit usage guidelines: it states '不推荐,请优先使用 telegram_notify' (not recommended, please prioritize using telegram_notify) and explains that 'telegram_notify' is for structured messages, while this tool is for free-form messages. This clearly defines when to use this tool versus alternatives, including exclusions and recommendations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

telegram_send_codeA
        发送代码段到 Telegram(带语法高亮)

        ⚠️ 使用场景(仅在必要时使用):
        - 遇到关键错误需要展示问题代码
        - 修复了重要 bug,需要展示修复方案
        - 用户明确要求查看某段代码
        - 需要用户 review 关键代码片段

        ❌ 不要使用的场景:
        - 一般性任务完成(使用 telegram_notify)
        - 创建了新文件(使用 telegram_send_file)
        - 例行操作(使用 telegram_notify 总结即可)

        参数:
        - code: 代码内容(建议不超过50行)
        - language: 编程语言(python/javascript/go/rust/bash/json/yaml等)
        - caption: 可选说明文字(建议填写,解释发送这段代码的原因)

        示例:
        telegram_send_code(
            code="def hello():\n    print('Hello')",
            language="python",
            caption="修复了空指针异常的关键函数"
        )
        
ParametersJSON Schema
NameRequiredDescriptionDefault
captionNo可选说明文字
codeYes代码内容
languageNo编程语言(python/javascript/go/rust/bash/json/yaml等)

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It adds valuable behavioral context: the tool sends code with syntax highlighting, includes a recommendation to keep code under 50 lines, and suggests adding a caption. However, it doesn't mention potential limitations like rate limits, authentication needs, or error handling, which would be helpful for a mutation tool (sending implies a write operation).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (purpose, usage scenarios, parameters, example), uses bullet points for readability, and every sentence adds value. It's appropriately sized—not overly verbose—and front-loaded with the core purpose, making it efficient for an agent to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description does a good job covering the tool's purpose, usage, and parameters. It includes an example invocation, which aids understanding. However, as a mutation tool (sending code), it could benefit from more details on behavioral aspects like error responses or confirmation of success, though the example partially compensates.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description adds meaningful semantics: it explains that 'code' should be kept under 50 lines, 'language' includes examples like python/javascript, and 'caption' is optional but recommended to explain why the code is sent. This provides practical guidance beyond the schema's basic descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: '发送代码段到 Telegram(带语法高亮)' which translates to 'Send code snippets to Telegram (with syntax highlighting)'. It specifies the verb (send), resource (code snippets), and key feature (syntax highlighting), distinguishing it from siblings like telegram_send_file or telegram_notify.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit usage guidelines with '⚠️ 使用场景(仅在必要时使用)' (scenarios to use) and '❌ 不要使用的场景' (scenarios not to use), including clear alternatives like telegram_notify and telegram_send_file. It specifies when to use (e.g., for key errors, bug fixes) and when not to use (e.g., for general task completion), helping the agent choose correctly among siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

telegram_send_fileA
        发送文件到 Telegram

        ⚠️ 使用场景(仅在必要时使用):
        - 用户明确要求查看某个文件:"查看 config.json"、"发送 main.py 给我"
        - 创建了重要的输出文件需要用户确认(如配置文件、报告等)
        - 生成了图表、图片等需要展示的文件
        - 需要用户下载某个文件进行后续操作

        ❌ 不要使用的场景:
        - 创建普通代码文件(用 telegram_notify 总结即可)
        - 修改了文件但不需要用户查看内容
        - 例行的文件操作

        优先级:
        1. 优先使用 telegram_notify 总结文件变更
        2. 如果用户明确要求,或确实需要查看,才发送文件
        3. 对于代码文件,如果只需要展示关键片段,优先使用 telegram_send_code

        参数:
        - file_path: 文件路径(相对于项目目录或绝对路径)
        - caption: 可选说明文字

        支持:
        - 文本文件、代码文件
        - 图片、PDF、文档等任意文件类型
        - 自动处理大文件

        示例:
        telegram_send_file(
            file_path="src/main.py",
            caption="修复后的主文件(用户要求查看)"
        )
        
ParametersJSON Schema
NameRequiredDescriptionDefault
captionNo可选说明文字
file_pathYes文件路径

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key traits: it's a file-sending operation (implies mutation/action), supports various file types (text, code, images, PDFs, documents), handles large files automatically, and includes a caption parameter. However, it doesn't mention potential limitations like file size caps, authentication needs, or error conditions, leaving some gaps for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (purpose, usage scenarios, exclusions, priority, parameters, support, example), making it easy to scan. It's appropriately sized for the complexity, though some redundancy exists (e.g., repeating parameter info). Every sentence contributes to understanding, but it could be slightly more streamlined.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (2 parameters, no output schema, no annotations), the description is highly complete. It covers purpose, detailed usage guidelines, behavioral aspects (file types, large file handling), parameter basics, and includes an example. This provides sufficient context for an agent to use the tool effectively, compensating for the lack of annotations and output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, with both parameters (file_path, caption) documented in the schema. The description adds minimal value beyond the schema: it reiterates that file_path is relative or absolute and caption is optional, but doesn't provide additional context like format examples or constraints. This meets the baseline of 3 for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description explicitly states the tool's purpose as '发送文件到 Telegram' (send file to Telegram), which is a specific verb+resource combination. It clearly distinguishes this tool from siblings like telegram_notify (for summaries), telegram_send_code (for code snippets), and telegram_send_image (for images only), making its role unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides extensive usage guidance, including explicit '使用场景' (usage scenarios) with four bullet points of when to use it, '不要使用的场景' (scenarios not to use) with three bullet points, and a '优先级' (priority) section that names alternatives (telegram_notify, telegram_send_code) and specifies when to choose this tool over them. This covers when, when-not, and alternatives comprehensively.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

telegram_send_imageA
        发送图片到 Telegram

        ⚠️ 使用场景:
        - 生成了图表、可视化结果
        - 创建了截图、示意图
        - 需要用户查看图片内容
        - 图片格式:PNG, JPG, GIF, WebP 等

        参数:
        - image_path: 图片文件路径(相对于项目目录或绝对路径)
        - caption: 可选说明文字

        示例:
        telegram_send_image(
            image_path="output/chart.png",
            caption="性能测试结果图表"
        )
        
ParametersJSON Schema
NameRequiredDescriptionDefault
captionNo可选说明文字
image_pathYes图片文件路径

TDQS

A4.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It mentions the tool sends images to Telegram but doesn't disclose behavioral traits like authentication requirements, rate limits, error handling, or what happens if the image path is invalid. The warning symbol (⚠️) introduces usage scenarios rather than behavioral risks. Some context is provided about file path handling ('相对于项目目录或绝对路径'), but key behavioral aspects remain undocumented.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (purpose, usage scenarios, parameters, example) and uses bullet points effectively. It's appropriately sized for a 2-parameter tool. Minor improvements could include tighter phrasing (e.g., the usage scenarios could be more concise), but overall it's efficient with zero wasted sentences.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (2 parameters, no output schema, no annotations), the description is reasonably complete. It covers purpose, usage guidelines, parameters, and provides an example. The main gap is the lack of behavioral transparency (no info on authentication, errors, etc.), but for a sending tool with good parameter coverage and clear usage context, it's mostly adequate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with both parameters clearly documented in the schema. The description adds minimal value beyond the schema: it restates that 'image_path' is a file path and 'caption' is optional text, and provides an example showing usage. However, it doesn't add significant semantic context like path format details or caption length limits beyond what the schema already provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose as '发送图片到 Telegram' (send image to Telegram), which is a specific verb+resource combination. It distinguishes itself from siblings like telegram_send (general sending), telegram_send_file (file sending), and telegram_send_code (code sending) by focusing specifically on images. The Chinese title reinforces this specificity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit usage scenarios in a dedicated '使用场景' section, listing four specific cases when to use this tool (e.g., '生成了图表、可视化结果', '创建了截图、示意图'). It also specifies supported image formats (PNG, JPG, GIF, WebP), giving clear context for when this tool is appropriate versus alternatives like telegram_send_file for non-image files.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

telegram_unattended_modeA
        进入无人值守模式 - 智能远程任务循环

        工作流程:
        1. 执行当前任务
        2. 根据情况智能选择通知方式:
           - 默认:使用 telegram_notify 发送总结
           - 遇到关键问题/错误:使用 telegram_send_code 展示问题代码
           - 用户明确要求:使用 telegram_send_file 发送文件
        3. 调用 telegram_unattended_mode 等待下一步指令(静默等待,不发送额外提示)
        4. 收到指令后执行,重复循环

        ⚠️ 重要:
        - 完成任务后必须调用 telegram_notify 发送结果
        - telegram_unattended_mode 本身不发送消息,只等待
        - 这样用户每次只收到任务结果,不会有重复的等待提示

        📋 通知内容最佳实践:
        ✅ 优先发送总结:
        - "修复了 auth.py 的空指针异常,测试通过"
        - "创建了 3 个文件:main.py, utils.py, test.py"
        - "代码重构完成,性能提升 30%"

        ⚠️ 仅在必要时发送代码:
        - 遇到无法自动修复的错误,需要展示错误代码
        - 修复了关键 bug,展示修复前后对比
        - 用户明确要求:"查看 main.py"、"发送代码给我"

        🎯 智能判断示例:
        - 创建新文件 → telegram_notify("创建了 config.json")
        - 修复 bug → telegram_notify("修复了登录异常") + 如果复杂就 telegram_send_code
        - 用户问"文件内容是什么" → telegram_send_file

        退出方式:
        - Telegram 发送 "退出" 或 "exit"
        - Claude Code 按 Ctrl+C 或 ESC

        轮询策略:
        - 前10分钟:每30秒检查一次
        - 10分钟-1小时:每60秒检查一次
        - 1小时以上:每120秒检查一次

        参数:
        - current_status: 当前任务状态的简短总结(1-2句话)
        - max_wait: 每次等待的最长时间(秒),默认604800(7天)
        - silent: 静默模式(不发送等待提示,默认 false)
          - 首次进入时使用 false(发送提示)
          - 后续循环使用 true(减少噪音)

        返回:
        - next_instruction: 用户的下一步指令
        - should_exit: 是否应该退出无人值守模式
        - interrupted: 是否被用户中断(Ctrl+C/ESC)
        
ParametersJSON Schema
NameRequiredDescriptionDefault
current_statusNo当前任务状态描述
max_waitNo最长等待时间(秒),默认604800(7天)

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden and excels at disclosing behavioral traits: it explains the multi-step workflow, polling strategy (timing intervals), exit conditions (via '退出' or Ctrl+C), silent mode behavior, and that the tool itself doesn't send messages (only waits). This provides comprehensive operational context beyond basic functionality.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with sections (工作流程, ⚠️ 重要, 📋 通知内容最佳实践, etc.) but is overly verbose at approximately 500+ characters. While informative, it includes extensive examples and implementation details that could be condensed, reducing front-loaded clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (automated loop with multiple behaviors), no annotations, and no output schema, the description is remarkably complete. It covers purpose, workflow, behavioral details, parameter usage, return values (next_instruction, should_exit, interrupted), exit strategies, and integration with sibling tools, leaving minimal gaps for agent understanding.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description adds significant value by explaining parameter semantics beyond the schema: it clarifies that current_status should be '1-2句话' (1-2 sentences), provides context for max_wait default (7 days), and introduces a silent parameter not in the schema with detailed usage guidance (首次进入时使用 false, 后续循环使用 true). This compensates for schema limitations.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose as '进入无人值守模式 - 智能远程任务循环' (enter unattended mode - intelligent remote task loop), which is specific about enabling an automated task execution cycle. However, it doesn't explicitly differentiate from sibling tools like telegram_wait_reply, which also involves waiting for user input.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides excellent usage guidance with explicit when-to-use scenarios (e.g., '进入无人值守模式' for automated task loops), when-not-to-use alternatives (e.g., using telegram_notify for summaries instead of this tool for messaging), and references to sibling tools (telegram_notify, telegram_send_code, telegram_send_file) for specific notification types.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

telegram_wait_replyA
        等待用户回复(阻塞式轮询)

        参数:
        - max_wait: 最长等待时间(秒),默认604800(7天/1周)

        行为:
        - 前10分钟:每30秒检查一次
        - 10分钟-1小时:每60秒检查一次
        - 1小时以上:每120秒检查一次
        - 用户可以按 Ctrl+C 中断等待
        - 超时返回 timeout: true

        返回:
        - reply: 用户回复内容
        - timeout: 是否超时
        - interrupted: 是否被用户中断
        
ParametersJSON Schema
NameRequiredDescriptionDefault
max_waitNo最长等待时间(秒),默认604800(7天)

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden and excels by detailing behavioral traits: polling intervals (30s/60s/120s based on time), user interruptibility (Ctrl+C), timeout behavior (returns timeout: true), and return structure (reply, timeout, interrupted). This provides comprehensive operational context beyond basic functionality.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (参数, 行为, 返回) and front-loaded purpose. It's appropriately sized, but minor redundancy exists (e.g., parameter details partially overlap with schema). Every sentence adds value, though it could be slightly more concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (blocking polling with intervals and interrupts), no annotations, and no output schema, the description is complete. It covers purpose, parameters, detailed behavior, and return values, providing all necessary context for an agent to use the tool effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with the parameter 'max_wait' fully documented in the schema. The description repeats the parameter name and default value but adds minimal extra context (e.g., '最长等待时间(秒)' is already in schema). Baseline 3 is appropriate as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose as '等待用户回复(阻塞式轮询)' (wait for user reply with blocking polling), which is a specific verb+resource combination. It distinguishes itself from sibling tools like telegram_send (which sends messages) by focusing on receiving replies through a polling mechanism.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context through its behavioral details (blocking polling with timeout), suggesting it should be used when waiting for user responses. However, it doesn't explicitly state when to use this tool versus alternatives like telegram_notify or how it relates to other tools in the workflow, missing explicit alternative guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 8 tool updatesv1.0.0
    • First observedtelegram_get_context_info
    • First observedtelegram_notify
    • First observedtelegram_send
    • First observedtelegram_send_code
    • First observedtelegram_send_file
    • First observedtelegram_send_image
    • First observedtelegram_unattended_mode
    • First observedtelegram_wait_reply

TDQS

A4.4/5.0
Disambiguation4/5

Most tools have distinct purposes: get_context_info for session info, notify for structured notifications, send for free messages, send_code for code snippets, send_file for files, send_image for images, unattended_mode for task loops, and wait_reply for blocking replies. However, send and notify could be confused as both send messages, though descriptions clarify notify is preferred for structured content.

Naming Consistency5/5

All tools follow a consistent 'telegram_' prefix with snake_case naming (e.g., telegram_get_context_info, telegram_notify). The verb-noun pattern is clear and uniform across all eight tools, making them easily identifiable and predictable.

Tool Count5/5

With 8 tools, the set is well-scoped for a Telegram integration server. It covers core functionalities like sending messages, files, images, and code, plus advanced features like context retrieval and unattended modes, without being overwhelming or lacking essential operations.

Completeness4/5

The toolset provides comprehensive coverage for Telegram communication, including sending various content types, receiving replies, and managing sessions. A minor gap is the lack of tools for managing Telegram-specific entities like chats or users, but the focus on agent notification workflows is well-covered.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

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/archetyx/telegram-mcp-server'

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