Skip to main content
Glama
matskevich

tg-mcp-guarded

by matskevich

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
TG_API_IDYesYour Telegram API ID (required). Can be loaded via env, keychain, or command provider.
TG_API_HASHYesYour Telegram API hash (required). Can be loaded via env, keychain, or command provider.
TG_SESSIONS_DIRNoDirectory for session files.
TG_SESSION_PATHNoPath to the main session file.
TG_WRITE_CONTEXTNoContext label for write operations (read_mcp or actions_mcp).
TG_ACTION_PROCESSNoSet to 1 for actions server.0
TG_ACTIONS_ENABLEDNoEnable actions tools.1
TG_GLOBAL_RPS_MODENoRate limiting mode (shared, independent).shared
TG_RECEIVE_UPDATESNoEnable Telethon updates loop.0
TG_SECRET_PROVIDERNoProvider for secrets (env, keychain, command).env
TG_KEYCHAIN_SERVICENoKeychain service name for secret provider (if TG_SECRET_PROVIDER=keychain).
TG_EXPECTED_USERNAMENoUsername to verify session account.
TG_READ_SESSION_PATHNoPath to the read-only session file.
TG_SECRET_CMD_API_IDNoCommand to retrieve API ID (if TG_SECRET_PROVIDER=command).
TG_SESSION_LOCK_MODENoSession lock mode (shared, exclusive).shared
TG_ACTIONS_BATCH_FILENoPath to batch state file.
MAX_GROUP_MSGS_PER_DAYNoMaximum messages per day per group.30
TG_ACTIONS_MAX_FILE_MBNoMaximum file size in MB for actions.20
TG_SECRET_CMD_API_HASHNoCommand to retrieve API hash (if TG_SECRET_PROVIDER=command).
TG_ACTIONS_SESSION_PATHNoPath to the actions session file.
TG_ALLOW_SESSION_SWITCHNoAllow switching sessions at runtime.0
TG_SESSION_RUNTIME_MODENoSession runtime mode (copy, original).copy
TG_ACTIONS_APPROVAL_FILENoPath to approval state file.
TG_ACTIONS_ALLOWED_GROUPSNoComma-separated list of allowed group IDs/usernames.
TG_ENFORCE_ACTION_PROCESSNoEnforce that write operations only happen from the actions server.1
TG_ACTIONS_BATCH_TTL_HOURSNoBatch TTL in hours.168
TG_ACTIONS_MAX_MESSAGE_LENNoMaximum message length for actions.2000
TG_ACTIONS_UNSAFE_OVERRIDENoOverride safety checks for actions.0
TG_KEYCHAIN_ACCOUNT_API_IDNoKeychain account name for API ID.
TG_ACTIONS_APPROVAL_TTL_SECNoApproval TTL in seconds.1800
TG_ACTIONS_REQUIRE_ALLOWLISTNoRequire allowlist for actions.1
TG_KEYCHAIN_ACCOUNT_API_HASHNoKeychain account name for API hash.
TG_FLOOD_CIRCUIT_COOLDOWN_SECNoCircuit breaker cooldown duration.900
TG_SESSION_PATH_CONFLICT_MODENoAction on session path conflict (warn, fail).warn
TG_ACTIONS_BATCH_RUN_LEASE_SECNoBatch run lease duration.1800
TG_ACTIONS_CONFIRMATION_PHRASENoExact phrase required for message confirmation.
TG_ACTIONS_IDEMPOTENCY_ENABLEDNoEnable idempotency for actions.1
TG_ALLOW_DIRECT_TELETHON_WRITENoAllow direct Telethon write operations.0
TG_BLOCK_DIRECT_TELETHON_WRITENoBlock direct Telethon write operations.1
TG_FLOOD_CIRCUIT_THRESHOLD_SECNoFlood wait threshold to trigger circuit breaker.300
TG_ACTIONS_APPROVAL_MIN_AGE_SECNoMinimum age to use approval code.30
TG_ACTIONS_MIN_CONFIRM_TEXT_LENNoMinimum length of confirmation text.6
TG_ACTIONS_REQUIRE_APPROVAL_CODENoRequire approval code for actions.1
TG_ACTIONS_IDEMPOTENCY_WINDOW_SECNoIdempotency window in seconds.86400
TG_SESSION_CONFLICT_REGISTRY_FILENoPath to session conflict registry file.
TG_ACTIONS_BATCH_APPROVAL_LEASE_SECNoBatch approval lease duration.86400
TG_ACTIONS_REQUIRE_CONFIRMATION_TEXTNoRequire confirmation text for actions.1
TG_DIRECT_TELETHON_WRITE_ALLOWED_CONTEXTSNoComma-separated contexts allowed to write via Telethon directly.

Capabilities

Server capabilities have not been inspected yet.

Tools

Functions exposed to the LLM to take actions

NameDescription

No tools

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/matskevich/tg-mcp-guarded'

If you have feedback or need assistance with the MCP directory API, please join our Discord server