Telegram Notifier MCP Server

An MCP (Model Context Protocol) server that lets an LLM send push notifications to your phone via a Telegram bot. Deployed as a serverless HTTP val on Val Town.

Endpoint

  • MCP endpoint: https://miguel-telegram-mcp.val.run/mcp (POST, Streamable HTTP)
  • Health check: https://miguel-telegram-mcp.val.run/healthz

Tool

send_telegram_notification — sends a push text alert to your phone.

ArgumentTypeRequiredDefault
messagestring (1–4096)noTask complete!

Environment variables

KeyDescription
TELEGRAM_TOKENBot token from @BotFather
CHAT_IDYour Telegram chat id to receive messages

Local development

Run with the Val Town HTTP handler — no app.listen, no port. The file server.js exports the request handler directly.

The MCP SDK version gotcha

So this deploys without fighting npm: pin the SDK to a version whose zod dependency resolves on Deno. The latest SDK (≥1.23) declares zod: ^3.25, and zod 3.25.0 published with a broken build (missing dist/esm/index.js), which crashes every import. This val pins:

  • npm:@modelcontextprotocol/sdk@1.30.0
  • npm:zod@3.25.1 (the fixed build — Deno resolves the SDK's transitive zod to the highest 3.x, now 3.25.1)

Connecting an MCP client

For clients that accept a Streamable HTTP (stateless) URL, point them at the /mcp endpoint. In stateless mode each request is self-contained, so it works over plain HTTP without WebSockets/SSE (note: Val Town does not accept incoming WebSocket connections).

Example for a generic MCP client config:

{ "mcpServers": { "telegram": { "url": "https://miguel-telegram-mcp.val.run/mcp", "transport": "streamable-http" } } }