claude-ops-telegram-server

v0.2.1
io.github.auroracapital/claude-ops-telegram-server Checked 5 hours ago Published 7 months ago

Telegram personal-account MCP (MTProto user-auth).

Values you need

VariableWhat it is
TELEGRAM_API_IDrequired secret Numeric API ID from https://my.telegram.org/apps (create a personal app, not a bot).
TELEGRAM_API_HASHrequired secret API hash from the same my.telegram.org/apps page.
TELEGRAM_PHONErequired secret Your Telegram phone number in E.164 format (e.g. +14155551234).
TELEGRAM_SESSIONrequired secret gram.js StringSession token. Generate once via: node index.js --auth (prompts for SMS code + optional 2FA). Store in your secret manager — never commit.

npm (npx) verified

Requires Node.js 18+

Run in a terminal
claude mcp add claude-ops-telegram-server -e 'TELEGRAM_API_HASH=<TELEGRAM_API_HASH>' -e 'TELEGRAM_API_ID=<TELEGRAM_API_ID>' -e 'TELEGRAM_PHONE=<TELEGRAM_PHONE>' -e 'TELEGRAM_SESSION=<TELEGRAM_SESSION>' -- npx -y --package=claude-ops-telegram-server@0.2.1 claude-ops-telegram
Add to claude_desktop_config.json
{
  "mcpServers": {
    "claude-ops-telegram-server": {
      "args": [
        "-y",
        "--package=claude-ops-telegram-server@0.2.1",
        "claude-ops-telegram"
      ],
      "command": "npx",
      "env": {
        "TELEGRAM_API_HASH": "<TELEGRAM_API_HASH>",
        "TELEGRAM_API_ID": "<TELEGRAM_API_ID>",
        "TELEGRAM_PHONE": "<TELEGRAM_PHONE>",
        "TELEGRAM_SESSION": "<TELEGRAM_SESSION>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "claude-ops-telegram-server": {
      "args": [
        "-y",
        "--package=claude-ops-telegram-server@0.2.1",
        "claude-ops-telegram"
      ],
      "command": "npx",
      "env": {
        "TELEGRAM_API_HASH": "<TELEGRAM_API_HASH>",
        "TELEGRAM_API_ID": "<TELEGRAM_API_ID>",
        "TELEGRAM_PHONE": "<TELEGRAM_PHONE>",
        "TELEGRAM_SESSION": "<TELEGRAM_SESSION>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "TELEGRAM_API_HASH",
      "id": "telegram-api-hash",
      "password": true,
      "type": "promptString"
    },
    {
      "description": "TELEGRAM_API_ID",
      "id": "telegram-api-id",
      "password": true,
      "type": "promptString"
    },
    {
      "description": "TELEGRAM_PHONE",
      "id": "telegram-phone",
      "password": true,
      "type": "promptString"
    },
    {
      "description": "TELEGRAM_SESSION",
      "id": "telegram-session",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "claude-ops-telegram-server": {
      "args": [
        "-y",
        "--package=claude-ops-telegram-server@0.2.1",
        "claude-ops-telegram"
      ],
      "command": "npx",
      "env": {
        "TELEGRAM_API_HASH": "${input:telegram-api-hash}",
        "TELEGRAM_API_ID": "${input:telegram-api-id}",
        "TELEGRAM_PHONE": "${input:telegram-phone}",
        "TELEGRAM_SESSION": "${input:telegram-session}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.claude-ops-telegram-server]
command = "npx"
args = ["-y", "--package=claude-ops-telegram-server@0.2.1", "claude-ops-telegram"]
env = { "TELEGRAM_API_HASH" = "<TELEGRAM_API_HASH>", "TELEGRAM_API_ID" = "<TELEGRAM_API_ID>", "TELEGRAM_PHONE" = "<TELEGRAM_PHONE>", "TELEGRAM_SESSION" = "<TELEGRAM_SESSION>" }

For AI agents

  1. Ask the user for: TELEGRAM_API_ID, TELEGRAM_API_HASH, TELEGRAM_PHONE, TELEGRAM_SESSION. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: list_dialogs, get_messages, send_message, search_messages.
  5. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json