gramcp
v0.2.0Multi-account Telegram MCP server in Rust with 68 MTProto tools, /settings web UI, and OAuth 2.1
Values you need
| Variable | What it is | |
|---|---|---|
TELEGRAM_API_ID | required | Telegram api_id from my.telegram.org |
TELEGRAM_API_HASH | required secret | Telegram api_hash from my.telegram.org |
GRAMCP_TRANSPORT | optional | 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 --stdioAdd 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
- 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.
- 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).
- Restart or reload the client so it starts the server.
- Verify: the server should expose these tools: status, list_accounts, get_updates, list_chats, search_chats, get_chat_info, get_chat_members, get_contacts, ….
- If it fails, check that the required runtime is installed (Docker) and that the values above are set.
Machine-readable: install.md · manifest.json