Telegram

by kdoronin

8 stars
551 downloads
Not rated
GitHub

Description

# Telegram MCP Server English version | [Русская версия](README_RU.md) Server for working with Telegram API through Model Context Protocol (MCP). Allows AI agents and other MCP clients to interact with Telegram. ## Requirements - Node.js 14+ (or higher) - npm - API ID and API…

About

# Telegram MCP Server English version | [Русская версия](README_RU.md) Server for working with Telegram API through Model Context Protocol (MCP). Allows AI agents and other MCP clients to interact with Telegram. ## Requirements - Node.js 14+ (or higher) - npm - API ID and API Hash from Telegram ## Installation 1…

Details

Author
kdoronin
GitHub stars
8
Downloads
551
Categories
Communication

- Reads dialogs and messages from your Telegram account.
- Sends messages to any chat or user.
- Executes arbitrary Telegram API methods via executeMethod.
- Saves authenticated sessions locally for reuse.
- Supports two-factor authentication (2FA).
- Integrates easily with MCP clients like Cursor and Claude Desktop.

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Telegram
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

To use Telegram, clone the repository, install dependencies with npm install, create a .env file with your API_ID and API_HASH from my.telegram.org, and run the server with npm run mcp or node mcp-server.js. The server can then be configured in MCP clients such as Cursor or Claude Desktop by pointing to the server’s command (e.g., node /full/path/to/project/mcp-server.js). On first use, the server prompts for a phone number and a confirmation code (and a 2FA password if enabled).

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "telegram": {
            "Telegram": {
                "command": "node",
                "args": [
                    "/Users/dka/Documents/Solo/git/telegram_mcp/mcp-server.js"
                ]
            }
        }
    }
}

McpServers

{
    "Telegram": {
        "command": "node",
        "args": [
            "/Users/dka/Documents/Solo/git/telegram_mcp/mcp-server.js"
        ]
    }
}

Telegram MCP Server

English version | Русская версия

Server for working with Telegram API through Model Context Protocol (MCP). Allows AI agents and other MCP clients to interact with Telegram.

Requirements

- Node.js 14+ (or higher)
- npm
- API ID and API Hash from Telegram

Installation

1. Clone the repository:

   git clone https://github.com/kdoronin/telegram_mcp
cd telegram-mcp

2. Install dependencies:

   npm install

(This will install the necessary packages: gramjs, @modelcontextprotocol/sdk, zod, etc.)

3. Create and configure the .env file:

   # Copy the example .env file
cp .env.example .env

Edit the .env file and specify your API_ID and API_HASH.

4. Get API ID and API Hash:
- Go to my.telegram.org
- Log in to your account
- Navigate to "API development tools"
- Create a new application
- Copy api_id and api_hash to your .env file

Running

Important note about running

The main server file mcp-server.js is located in the project root, which allows running it without path issues.

Option 1: Via npm (recommended)

npm run mcp    # Run from the project root directory

Option 2: Direct node execution

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.