Skip to main content
Glama
abramovmarketing88-byte

telegram-bot-mcp

README.md
# Telegram Bot MCP Server

Cursor MCP server for Telegram Bot API (`@The2TestGPTBot`).

## Tools

| Tool | Description |
|------|-------------|
| `tg_send_message` | Send text to chat/topic (`chat_id`, `text`, optional `parse_mode`, `message_thread_id`, `reply_to_message_id`, `disable_notification`, `business_connection_id`) |
| `tg_get_updates` | Recent updates — discover `chat_id` / topic ids |
| `tg_get_chat` | Chat info by id or `@username` |
| `tg_get_me` | Bot identity |

## Setup

```bash
npm install
```

In `~/.cursor/mcp.json`:

```json
{
  "mcpServers": {
    "telegram": {
      "command": "node",
      "args": ["C:\\path\\to\\telegram-bot-mcp\\index.js"],
      "env": {
        "TELEGRAM_BOT_TOKEN": "<your bot token>"
      }
    }
  }
}
```

Keep the token only in `mcp.json` / env — never commit it.

After code changes: Cursor Settings → MCP → Reload `telegram`.

## Notes

- Forum groups: always pass `message_thread_id`, otherwise the message won't land in the topic.
- Business: optional `business_connection_id`.
- If `fetch failed` / timeout — check VPN / access to `api.telegram.org:443`.

## Stack

- `@modelcontextprotocol/sdk`
- `zod`
- Node.js (ESM)

Maintenance

ActivityMaintained
ResponsivenessNo issues