Skip to main content
Glama
tg-secretary-mcp

tg-secretary-mcp

by developkiko

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MCP_AUTH_TOKENNoBearer token generated by `npm run secrets`, used to authenticate the /api/setup and /api/mcp endpoints. Required for the Vercel deployment.
KV_REST_API_URLNoUpstash Redis REST URL (Vercel deployment). Alternatively use UPSTASH_REDIS_REST_URL.
KV_REST_API_TOKENNoUpstash Redis REST token (Vercel deployment). Alternatively use UPSTASH_REDIS_REST_TOKEN.
TELEGRAM_BOT_TOKENNoTelegram bot token (from @BotFather). Required in both local and Vercel modes; can be placed in .env for local mode or set as a project environment variable on Vercel.
TG_SECRETARY_DATA_DIRNoLocal mode only: an alternative location for the message archive (defaults to ./data).
TG_SECRETARY_READONLYNoSet to 1 to forbid sending messages, marking as read, and deleting messages.
UPSTASH_REDIS_REST_URLNoAlternative Upstash Redis REST URL (Vercel deployment) instead of KV_REST_API_URL.
TELEGRAM_WEBHOOK_SECRETNoWebhook secret generated by `npm run secrets`. Required for the Vercel deployment.
TG_SECRETARY_NO_ARCHIVENoSet to 1 (local mode only) to avoid writing messages to disk; the archive lives only in the session's memory.
UPSTASH_REDIS_REST_TOKENNoAlternative Upstash Redis REST token (Vercel deployment) instead of KV_REST_API_TOKEN.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

The owner connected a Telegram bot to their account (Secretary Mode). The tools see incoming private messages only: no groups, channels, or history older than the connection, and nothing the owner replied manually from the app ("out" messages are those sent through secretary_reply). Nothing is pushed — call secretary_chats and secretary_read to see what is new. secretary_reply writes as the owner: use it only for text the owner has approved.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
secretary_statusA

Health check: does the bot receive updates, is a Telegram account connected, which rights did the owner grant, what is in the archive. Call this first when something does not work.

secretary_chatsA

List the private chats the archive has seen, most recent first. The bot only sees private chats that wrote to the owner after it was connected (Settings → Chat Automation), and only while the server was running. Groups, channels and older history are never available.

secretary_readA

Read the archived conversation with one person, oldest first. The bot only sees private chats that wrote to the owner after it was connected (Settings → Chat Automation), and only while the server was running. Groups, channels and older history are never available.

secretary_searchA

Search message text across the archive, or within one chat. Full phrase matches come first, then messages with all the words. The bot only sees private chats that wrote to the owner after it was connected (Settings → Chat Automation), and only while the server was running. Groups, channels and older history are never available.

secretary_replyA

Send a text message to a private chat AS THE OWNER: the recipient sees it written by the owner, not by a bot. Use only for text the owner has approved for this chat. Replies only work in private chats that wrote to the owner during the last 24 hours.

secretary_waitA

Wait for new incoming messages from one chat and return them. Resolves as soon as a message arrives (a short burst is collected together), or when the time is out. Use after secretary_reply to get the answer.

secretary_mark_readA

Mark an incoming message as read on the owner's behalf; everything before it in that chat is read too. Pass the latest message_id to clear the whole chat.

secretary_delete_sentA

Delete a message that was sent through secretary_reply, on the owner's behalf. Only this bot's own messages can be deleted this way.

secretary_forgetA

Drop the archived conversation with one person for good. Nothing changes on Telegram. Use when the owner asks to remove stored messages.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.3/5.0

Scored across 9 tools

Disambiguation5/5

Each tool targets a distinct operation: status, chat listing, reading, searching, replying, waiting, marking read, deleting sent messages, and forgetting an archive. The descriptions clearly separate potentially adjacent tools such as delete_sent versus forget and read versus search.

Naming Consistency5/5

All tools use the same secretary_ prefix with snake_case operation names. The set is predictable and readable, even though some suffixes are nouns (status, chats) and others are verbs.

Tool Count5/5

Nine tools is well-scoped for a Telegram secretary server. Each tool earns its place and there is no obvious redundancy.

Completeness4/5

The core private-chat lifecycle is covered: health, listing, reading, searching, replying, waiting, marking read, deleting sent messages, and forgetting archives. Minor gaps remain around editing sent messages and sending non-text media, but the stated text-focused scope is largely complete.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues