tg-mcp-guarded
by matskevich
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| TG_API_ID | Yes | Your Telegram API ID (required). Can be loaded via env, keychain, or command provider. | |
| TG_API_HASH | Yes | Your Telegram API hash (required). Can be loaded via env, keychain, or command provider. | |
| TG_SESSIONS_DIR | No | Directory for session files. | |
| TG_SESSION_PATH | No | Path to the main session file. | |
| TG_WRITE_CONTEXT | No | Context label for write operations (read_mcp or actions_mcp). | |
| TG_ACTION_PROCESS | No | Set to 1 for actions server. | 0 |
| TG_ACTIONS_ENABLED | No | Enable actions tools. | 1 |
| TG_GLOBAL_RPS_MODE | No | Rate limiting mode (shared, independent). | shared |
| TG_RECEIVE_UPDATES | No | Enable Telethon updates loop. | 0 |
| TG_SECRET_PROVIDER | No | Provider for secrets (env, keychain, command). | env |
| TG_KEYCHAIN_SERVICE | No | Keychain service name for secret provider (if TG_SECRET_PROVIDER=keychain). | |
| TG_EXPECTED_USERNAME | No | Username to verify session account. | |
| TG_READ_SESSION_PATH | No | Path to the read-only session file. | |
| TG_SECRET_CMD_API_ID | No | Command to retrieve API ID (if TG_SECRET_PROVIDER=command). | |
| TG_SESSION_LOCK_MODE | No | Session lock mode (shared, exclusive). | shared |
| TG_ACTIONS_BATCH_FILE | No | Path to batch state file. | |
| MAX_GROUP_MSGS_PER_DAY | No | Maximum messages per day per group. | 30 |
| TG_ACTIONS_MAX_FILE_MB | No | Maximum file size in MB for actions. | 20 |
| TG_SECRET_CMD_API_HASH | No | Command to retrieve API hash (if TG_SECRET_PROVIDER=command). | |
| TG_ACTIONS_SESSION_PATH | No | Path to the actions session file. | |
| TG_ALLOW_SESSION_SWITCH | No | Allow switching sessions at runtime. | 0 |
| TG_SESSION_RUNTIME_MODE | No | Session runtime mode (copy, original). | copy |
| TG_ACTIONS_APPROVAL_FILE | No | Path to approval state file. | |
| TG_ACTIONS_ALLOWED_GROUPS | No | Comma-separated list of allowed group IDs/usernames. | |
| TG_ENFORCE_ACTION_PROCESS | No | Enforce that write operations only happen from the actions server. | 1 |
| TG_ACTIONS_BATCH_TTL_HOURS | No | Batch TTL in hours. | 168 |
| TG_ACTIONS_MAX_MESSAGE_LEN | No | Maximum message length for actions. | 2000 |
| TG_ACTIONS_UNSAFE_OVERRIDE | No | Override safety checks for actions. | 0 |
| TG_KEYCHAIN_ACCOUNT_API_ID | No | Keychain account name for API ID. | |
| TG_ACTIONS_APPROVAL_TTL_SEC | No | Approval TTL in seconds. | 1800 |
| TG_ACTIONS_REQUIRE_ALLOWLIST | No | Require allowlist for actions. | 1 |
| TG_KEYCHAIN_ACCOUNT_API_HASH | No | Keychain account name for API hash. | |
| TG_FLOOD_CIRCUIT_COOLDOWN_SEC | No | Circuit breaker cooldown duration. | 900 |
| TG_SESSION_PATH_CONFLICT_MODE | No | Action on session path conflict (warn, fail). | warn |
| TG_ACTIONS_BATCH_RUN_LEASE_SEC | No | Batch run lease duration. | 1800 |
| TG_ACTIONS_CONFIRMATION_PHRASE | No | Exact phrase required for message confirmation. | |
| TG_ACTIONS_IDEMPOTENCY_ENABLED | No | Enable idempotency for actions. | 1 |
| TG_ALLOW_DIRECT_TELETHON_WRITE | No | Allow direct Telethon write operations. | 0 |
| TG_BLOCK_DIRECT_TELETHON_WRITE | No | Block direct Telethon write operations. | 1 |
| TG_FLOOD_CIRCUIT_THRESHOLD_SEC | No | Flood wait threshold to trigger circuit breaker. | 300 |
| TG_ACTIONS_APPROVAL_MIN_AGE_SEC | No | Minimum age to use approval code. | 30 |
| TG_ACTIONS_MIN_CONFIRM_TEXT_LEN | No | Minimum length of confirmation text. | 6 |
| TG_ACTIONS_REQUIRE_APPROVAL_CODE | No | Require approval code for actions. | 1 |
| TG_ACTIONS_IDEMPOTENCY_WINDOW_SEC | No | Idempotency window in seconds. | 86400 |
| TG_SESSION_CONFLICT_REGISTRY_FILE | No | Path to session conflict registry file. | |
| TG_ACTIONS_BATCH_APPROVAL_LEASE_SEC | No | Batch approval lease duration. | 86400 |
| TG_ACTIONS_REQUIRE_CONFIRMATION_TEXT | No | Require confirmation text for actions. | 1 |
| TG_DIRECT_TELETHON_WRITE_ALLOWED_CONTEXTS | No | Comma-separated contexts allowed to write via Telethon directly. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Server capabilities have not been inspected yet.
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
No tools | |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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