gramcp

v0.2.0
io.github.ilodezis/gramcp Checked 4 days ago Published 6 days ago

Multi-account Telegram MCP server in Rust with 68 MTProto tools, /settings web UI, and OAuth 2.1

Values you need

VariableWhat it is
TELEGRAM_API_IDrequired Telegram api_id from my.telegram.org
TELEGRAM_API_HASHrequired secret Telegram api_hash from my.telegram.org
GRAMCP_TRANSPORToptional Transport mode inside the container; keep stdio for local MCP clients Default: stdio

Docker discovery passed

Requires Docker

Run in a terminal
claude mcp add gramcp -e 'TELEGRAM_API_HASH=<TELEGRAM_API_HASH>' -e 'TELEGRAM_API_ID=<TELEGRAM_API_ID>' -- docker run -i --rm -e TELEGRAM_API_HASH -e TELEGRAM_API_ID ghcr.io/ilodezis/gramcp:0.2.0 serve --stdio
Add to claude_desktop_config.json
{
  "mcpServers": {
    "gramcp": {
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "TELEGRAM_API_HASH",
        "-e",
        "TELEGRAM_API_ID",
        "ghcr.io/ilodezis/gramcp:0.2.0",
        "serve",
        "--stdio"
      ],
      "command": "docker",
      "env": {
        "TELEGRAM_API_HASH": "<TELEGRAM_API_HASH>",
        "TELEGRAM_API_ID": "<TELEGRAM_API_ID>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "gramcp": {
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "TELEGRAM_API_HASH",
        "-e",
        "TELEGRAM_API_ID",
        "ghcr.io/ilodezis/gramcp:0.2.0",
        "serve",
        "--stdio"
      ],
      "command": "docker",
      "env": {
        "TELEGRAM_API_HASH": "<TELEGRAM_API_HASH>",
        "TELEGRAM_API_ID": "<TELEGRAM_API_ID>"
      }
    }
  }
}
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"
    }
  ],
  "servers": {
    "gramcp": {
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "TELEGRAM_API_HASH",
        "-e",
        "TELEGRAM_API_ID",
        "ghcr.io/ilodezis/gramcp:0.2.0",
        "serve",
        "--stdio"
      ],
      "command": "docker",
      "env": {
        "TELEGRAM_API_HASH": "${input:telegram-api-hash}",
        "TELEGRAM_API_ID": "${input:telegram-api-id}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.gramcp]
command = "docker"
args = ["run", "-i", "--rm", "-e", "TELEGRAM_API_HASH", "-e", "TELEGRAM_API_ID", "ghcr.io/ilodezis/gramcp:0.2.0", "serve", "--stdio"]
env = { "TELEGRAM_API_HASH" = "<TELEGRAM_API_HASH>", "TELEGRAM_API_ID" = "<TELEGRAM_API_ID>" }

For AI agents

  1. Ask the user for: TELEGRAM_API_ID, TELEGRAM_API_HASH. 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: status, list_accounts, get_updates, list_chats, search_chats, get_chat_info, get_chat_members, get_contacts, ….
  5. If it fails, check that the required runtime is installed (Docker) and that the values above are set.

Machine-readable: install.md · manifest.json