Skip to main content
Glama
shaxzodrashid

Telegram MCP Server

Telegram MCP-Server

Ein Model Context Protocol (MCP)-Server für Telegram, erstellt mit Telethon und FastMCP.

Funktionen

  • MTProto-Unterstützung: Leistungsstarke Kommunikation über Telethon.

  • FastMCP: Nahtlose Integration mit KI-Agenten.

  • Async & Performance: Optimiert für Geschwindigkeit und Nebenläufigkeit.

  • Professioneller Kern: Integrierte Protokollierung, Caching und Konfiguration.

Related MCP server: telegram-mcp

Einrichtung

  1. Installieren Sie uv, falls Sie dies noch nicht getan haben.

  2. Klonen Sie das Repository.

  3. Erstellen Sie eine .env-Datei basierend auf .env.example:

    cp .env.example .env
  4. Tragen Sie Ihre API_ID und API_HASH von my.telegram.org ein.

  5. Installieren Sie die Abhängigkeiten:

    uv sync

Verwendung

Starten Sie den MCP-Server:

uv run python -m telegram_mcp.server

Struktur

  • src/telegram_mcp/core/: Wesentliche Dienstprogramme (Logger, Cache, Konfiguration).

  • src/telegram_mcp/service/: Geschäftslogik und externe API-Clients.

  • src/telegram_mcp/models/: Pydantic-Datenmodelle.

  • src/telegram_mcp/server.py: MCP-Serverdefinition und Tool-Registrierung.

Available Tools

1 tool
get_account_infoA

Returns information about the currently logged-in Telegram account.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are provided, and the description does not disclose behavioral traits beyond the fact that it returns information. For a simple read-only tool, this is adequate but not rich.

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 a single, front-loaded sentence with no wasted words. It is appropriately concise for a trivial tool.

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

Completeness3/5

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

Given no output schema, the description could be more specific about what 'information' is returned. However, for a tool with no parameters and no siblings, it is minimally complete.

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?

There are no parameters, and the schema coverage is 100%. Per guidelines, a baseline of 4 is appropriate.

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 action ('Returns information') and the resource ('the currently logged-in Telegram account'). It is specific enough, though the term 'information' is vague. No siblings exist, so no differentiation needed.

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

Usage Guidelines3/5

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

The description does not provide explicit guidance on when to use the tool versus alternatives, but there are no siblings. The context is simple, so the lack of detailed usage instructions is acceptable but not exemplary.

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.

  1. 1 tool updatev0.1.0
    • First observedget_account_info

TDQS

A3.5/5.0

Scored across 1 tool

Disambiguation5/5

Only one tool exists, so there is no possibility of confusion between tools.

Naming Consistency5/5

With a single tool, naming is trivially consistent and follows a clear verb_noun pattern.

Tool Count2/5

A single tool for a Telegram server is far too few; typical Telegram integrations have many more tools for messaging, media, and contact management.

Completeness1/5

The tool set covers only account information, missing essential operations like sending messages, fetching chats, and managing contacts, making it severely incomplete.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Connects AI agents to Telegram via the official TDLib library, enabling tools like getting user info, listing dialogs, and searching messages.
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI agents to interact with a user's Telegram account: list chats, read history, search, and send messages through Telegram's MTProto API.
    1
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables AI agents to interact with, test, click buttons on, and verify Telegram bots end-to-end via MTProto, including messaging, inline queries, media exchange, and automated test suites.
    1
    MIT