MCP Directory

How to add Telegram MCP server to Cursor

Bridge AI assistants to your Telegram account: read dialogs, summarize unread messages, mark as read, and send drafts. Paste the config into ~/.cursor/mcp.json and restart Cursor.

Last updated June 14, 2026 · 334 · stdio · apikey

Cursor config for Telegram MCP server

npx -y @chaindead/telegram-mcp
{
  "mcpServers": {
    "telegram-mcp-server": {
      "command": "telegram-mcp",
      "args": [],
      "env": {
        "TG_APP_ID": "<your-app-id>",
        "TG_API_HASH": "<your-api-hash>",
        "PATH": "<path_to_telegram-mcp_binary_dir>",
        "HOME": "<path_to_your_home_directory"
      }
    }
  }
}

Setup steps

  1. 1Open Cursor → Settings → MCP → Add new MCP server (or edit ~/.cursor/mcp.json directly).
  2. 2Paste the Telegram MCP server config below into the "mcpServers" object.
  3. 3Fill in placeholder secrets, then save.
  4. 4Cursor reloads MCP servers automatically — check Settings → MCP for a green status dot.
  5. 5Ask Cursor to use one of Telegram MCP server's tools to confirm it's connected.

Before you start

  • A Telegram account
  • Telegram API ID and API hash from https://my.telegram.org/auth
  • One-time CLI authorization: telegram-mcp auth --app-id <id> --api-hash <hash> --phone <phone> (add --password for 2FA)
  • Install via Homebrew, release binary, or go install (Go 1.24+); alternatively run via npx (macOS, Linux, Windows)

What Telegram MCP server can do in Cursor

tg_me

Get current account information.

tg_dialogs

List dialogs with an optional unread filter.

tg_read

Mark a dialog as read.

tg_dialog

Retrieve messages from a specific dialog.

tg_send

Send draft messages to any dialog.

Security

Connects to your personal Telegram account via MTProto. Requires a Telegram API ID and hash from https://my.telegram.org/auth and a one-time CLI authorization (telegram-mcp auth --app-id <id> --api-hash <hash> --phone <phone>); add --password for 2FA. Review the Telegram API Terms of Service first, as misuse may result in account suspension. Credentials (TG_APP_ID, TG_API_HASH) are passed as environment variables.

Telegram MCP server + Cursor FAQ

Where is the Cursor config file?

Cursor reads MCP servers from ~/.cursor/mcp.json. Paste the Telegram MCP server config there under the "mcpServers" key and restart the client.

Is Telegram MCP server safe to use with Cursor?

Connects to your personal Telegram account via MTProto. Requires a Telegram API ID and hash from https://my.telegram.org/auth and a one-time CLI authorization (telegram-mcp auth --app-id <id> --api-hash <hash> --phone <phone>); add --password for 2FA. Review the Telegram API Terms of Service first, as misuse may result in account suspension. Credentials (TG_APP_ID, TG_API_HASH) are passed as environment variables.

How do I authorize the server?

Get an API ID and hash from https://my.telegram.org/auth, then run: telegram-mcp auth --app-id <your-api-id> --api-hash <your-api-hash> --phone <your-phone-number>, and enter the code Telegram sends you. If you have 2FA enabled, add --password <2fa_password>; to override an existing session, add --new.

Can I run it without installing a binary?

Yes. You can run the latest version directly with npx on macOS, Linux, and Windows: npx -y @chaindead/telegram-mcp. Auth and client config use the npx command form (e.g. command "npx" with args ["-y", "@chaindead/telegram-mcp"]).

My MCP client rejects the server's tools (e.g. VS Code). What can I do?

Some clients do not support JSON Schema Draft 2020-12 (the default). Override the schema version with the --schema-version flag or the TG_SCHEMA_VERSION environment variable; Draft-07 (https://json-schema.org/draft-07/schema#) is recommended for VS Code.

View repo Full Telegram MCP server page