MCP Telegram
Back to Quickstart

Send files & voice to Telegram

Documents, photos, voice notes, video notes, albums, even stories and a new profile photo — anything that has bytes attached. The AI sends them on your behalf, either from a file you uploaded once, or directly from a public https:// URL.

1

Pick how the bytes get in

Two paths: (1) upload a file once at mcp-telegram.com/my/upload, copy the returned uploadId, and reference it in your prompts; or (2) give the AI an https:// URL pointing to the file — the cloud will fetch it (with SSRF protection, so local/internal addresses are blocked). Max file size is around 50 MB.

2

Send a single file or voice note

Say: "Send this PDF to @friend" with the uploadId or URL. The AI calls telegram-send-file. For voice messages (OGG/Opus preferred, M4A/MP3 also work) use telegram-send-voice. For round video messages use telegram-send-video-note.

3

Send an album of 1-10 photos or videos

Say: "Send these 5 photos to my family chat as an album, with captions." The AI calls telegram-send-album. Each item gets its own uploadId-or-URL and optional caption. The first item's caption appears as the album caption in Telegram.

4

Set a new profile photo

Say: "Set this as my Telegram profile photo" with an uploadId or URL. The AI calls telegram-set-profile-photo. Images and short MP4s both work. Use fallback:true if you want the photo shown when your account is private.

Try these prompts

"Send the file at https://example.com/contract.pdf to @lawyer"

"Make an album from the 4 photos I uploaded and post it to the family chat with the caption 'Weekend trip'"

"Set my new profile photo from uploadId abc123"

Troubleshooting

URL fetch failed with "address not allowed"

The SSRF guard blocks URLs that resolve to private, link-local, loopback or metadata IP addresses. Use a public https:// URL, or upload the file first via /my/upload and reference the uploadId.

File too large

Cloud uploads are capped around 50 MB. For larger files, host them on a public server and pass the https:// URL — Telegram itself supports up to 2 GB, the cloud limit is on the upload step only.

uploadId expired or not found

Pending uploads are kept for a short window after /my/upload. If you took too long to use one, upload again and use the new uploadId.