Telegram MCP Server

Integrate Telegram with FlowHunt and MCP-compatible clients for automated messaging, chat management, and AI-powered workflows.

Telegram MCP Server

What does “Telegram” MCP Server do?

The Telegram MCP Server integrates the powerful capabilities of the Telegram messaging platform with the Model Context Protocol (MCP), enabling AI assistants and clients to interact programmatically with Telegram. By utilizing the Telethon library, this server allows for comprehensive automation and management of chats, messages, groups, and user interactions within Telegram. It acts as a bridge between AI agents and Telegram’s API, making it possible to perform tasks such as sending messages, retrieving chat histories, managing groups, and more. This dramatically enhances development workflows by streamlining communication, facilitating automated responses, and providing tools to query or modify Telegram data directly from AI-powered tools like Claude, Cursor, and other MCP-compatible clients.

List of Prompts

No prompt templates were listed in the available documentation or repository files.

List of Resources

No explicit MCP resource primitives were documented or listed in the available files or README.

List of Tools

  • get_chats(page, page_size): Returns a paginated list of Telegram chats and groups available to the authenticated user. This enables clients and LLMs to enumerate and select from the user’s conversation history for further analysis or messaging.

Documentation states that “Every major Telegram/Telethon feature is available as a tool,” but only get_chats is explicitly mentioned. The full list of tools is not provided in the visible documentation.

Use Cases of this MCP Server

  • Automated Messaging: AI agents can send messages, media, or files to individuals or groups on Telegram, enabling automated notifications, responses, or broadcasts.
  • Chat Analysis: Retrieve and analyze chat histories to summarize discussions, extract action items, or perform sentiment analysis within Telegram groups or private conversations.
  • Group Management: Programmatically manage group membership, roles, and permissions for streamlined community or team administration.
  • Bot Integration: Use the server to operate Telegram bots that perform complex workflows, relay information, or serve as AI-powered virtual assistants.
  • Seamless Data Retrieval: Extract specific messages, files, or chat details for integration with external systems, dashboards, or databases, supporting advanced automation.

How to set it up

Windsurf

  1. Prerequisite: Ensure Node.js is installed and Windsurf is configured.
  2. Locate Configuration: Open your Windsurf settings or configuration file.
  3. Add MCP Server: Insert the Telegram MCP server to the mcpServers section:
    {
      "mcpServers": {
        "telegram-mcp": {
          "command": "telegram-mcp",
          "args": ["serve"]
        }
      }
    }
    
  4. Save and Restart: Save your configuration and restart Windsurf.
  5. Verify Setup: Check the Windsurf dashboard or logs to ensure telegram-mcp is running.

Securing API Keys (example)

{
  "mcpServers": {
    "telegram-mcp": {
      "command": "telegram-mcp",
      "args": ["serve"],
      "env": {
        "TELEGRAM_API_ID": "<your_api_id>",
        "TELEGRAM_API_HASH": "<your_api_hash>",
        "TELEGRAM_SESSION_STRING": "<your_session_string>"
      }
    }
  }
}

Claude

  1. Prerequisite: Ensure Claude Desktop or Claude-compatible client is installed.
  2. Locate Configuration: Edit the claude_desktop_config.json file.
  3. Add MCP Server Entry:
    {
      "mcpServers": {
        "telegram-mcp": {
          "command": "telegram-mcp",
          "args": ["serve"]
        }
      }
    }
    
  4. Save and Restart: Save the JSON file and restart Claude.
  5. Verify: Confirm that Claude detects and connects to telegram-mcp.

Securing API Keys (example)

{
  "mcpServers": {
    "telegram-mcp": {
      "command": "telegram-mcp",
      "args": ["serve"],
      "env": {
        "TELEGRAM_API_ID": "<your_api_id>",
        "TELEGRAM_API_HASH": "<your_api_hash>",
        "TELEGRAM_SESSION_STRING": "<your_session_string>"
      }
    }
  }
}

Cursor

  1. Prerequisite: Install Node.js and Cursor editor.
  2. Open Cursor Settings: Access the MCP integration section.
  3. Add Telegram MCP Server:
    {
      "mcpServers": {
        "telegram-mcp": {
          "command": "telegram-mcp",
          "args": ["serve"]
        }
      }
    }
    
  4. Restart Cursor: Save settings and restart the Cursor app.
  5. Verify: Confirm Cursor recognizes and connects to the Telegram MCP server.

Securing API Keys (example)

{
  "mcpServers": {
    "telegram-mcp": {
      "command": "telegram-mcp",
      "args": ["serve"],
      "env": {
        "TELEGRAM_API_ID": "<your_api_id>",
        "TELEGRAM_API_HASH": "<your_api_hash>",
        "TELEGRAM_SESSION_STRING": "<your_session_string>"
      }
    }
  }
}

Cline

  1. Prerequisite: Ensure Cline is installed and configured.
  2. Open Configuration File: Edit your Cline settings or config file.
  3. Insert MCP Server Entry:
    {
      "mcpServers": {
        "telegram-mcp": {
          "command": "telegram-mcp",
          "args": ["serve"]
        }
      }
    }
    
  4. Save & Restart: Save the file, restart Cline.
  5. Verify: Check Cline interface for the running Telegram MCP server.

Securing API Keys (example)

{
  "mcpServers": {
    "telegram-mcp": {
      "command": "telegram-mcp",
      "args": ["serve"],
      "env": {
        "TELEGRAM_API_ID": "<your_api_id>",
        "TELEGRAM_API_HASH": "<your_api_hash>",
        "TELEGRAM_SESSION_STRING": "<your_session_string>"
      }
    }
  }
}

How to use this MCP inside flows

Using MCP in FlowHunt

To integrate MCP servers into your FlowHunt workflow, start by adding the MCP component to your flow and connecting it to your AI agent:

FlowHunt MCP flow

Click on the MCP component to open the configuration panel. In the system MCP configuration section, insert your MCP server details using this JSON format:

{
  "telegram-mcp": {
    "transport": "streamable_http",
    "url": "https://yourmcpserver.example/pathtothemcp/url"
  }
}

Once configured, the AI agent is now able to use this MCP as a tool with access to all its functions and capabilities. Remember to change “telegram-mcp” to whatever the actual name of your MCP server is and replace the URL with your own MCP server URL.


Overview

SectionAvailabilityDetails/Notes
OverviewDescribes Telegram-MCP as a Telegram-to-MCP bridge for AI automation.
List of PromptsNo prompt templates documented.
List of ResourcesNo explicit MCP resources documented.
List of Toolsget_chats explicitly mentioned; others implied but not listed.
Securing API KeysExample configuration for API keys provided.
Sampling Support (less important in evaluation)No mention of sampling support.

Roots support: No explicit mention
Sampling support: No explicit mention


I would rate the Telegram MCP Server a 6/10. It is functionally robust with clear setup and security instructions, but lacks documentation on prompt templates, explicit resources, and an exhaustive tool list, which are important for advanced MCP integration and transparency.


MCP Score

Has a LICENSE✅ Apache-2.0
Has at least one tool
Number of Forks73
Number of Stars190

Frequently asked questions

What is the Telegram MCP Server?

The Telegram MCP Server acts as a bridge between Telegram and AI-powered tools, allowing programmatic control over chats, messages, groups, and users through the Model Context Protocol (MCP). It enables automation, chat analysis, and group management from clients like Claude, Cursor, and FlowHunt.

Which features are supported through the Telegram MCP Server?

Most major Telegram and Telethon features are supported, including sending messages, retrieving chat histories, managing groups, and more. The only explicitly documented tool is get_chats, but many additional capabilities are implied.

How do I configure the Telegram MCP Server securely?

Store your Telegram API credentials (API ID, API Hash, and Session String) as environment variables in your MCP server configuration to keep them secure and out of source code.

What are common use cases for the Telegram MCP Server?

Automated messaging, chat analysis, group management, operating Telegram bots, and extracting Telegram data for integration with external systems.

How do I integrate Telegram MCP Server into a FlowHunt flow?

Add the MCP component to your flow, then configure the MCP details in JSON format within the system MCP configuration, specifying your Telegram MCP server’s URL and settings. This allows AI agents to access Telegram through the MCP interface.

Connect Telegram to FlowHunt

Automate, analyze, and manage Telegram chats with FlowHunt’s easy-to-configure Telegram MCP Server. Enable seamless AI-powered workflows and integrations.

Learn more