Skip to main content
Glama

telegram_auth_status

Verify authentication status with Telegram to ensure secure and authorized access to channels and groups via the MCP Server.

Instructions

Check if authenticated with Telegram

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that implements the core logic of the 'telegram_auth_status' tool. It checks the authentication status using the TelegramAuth instance and returns a standardized MCP response with markdown text indicating the status.
    private async handleAuthStatus(): Promise<any> { const isAuthenticated = await this.auth.isAuthenticated(); return { content: [ { type: 'text', text: isAuthenticated ? '✅ Authenticated with Telegram. You can access restricted content.' : '❌ Not authenticated. Use telegram_login to authenticate.' } ] }; }
  • src/server.ts:244-252 (registration)
    The tool registration entry in getTools() method, which defines the tool's name, description, and input schema for the MCP server's listTools handler.
    { name: 'telegram_auth_status', description: 'Check if authenticated with Telegram', inputSchema: { type: 'object', properties: {}, required: [] } },
  • The input schema definition for the tool, specifying no required parameters.
    description: 'Check if authenticated with Telegram', inputSchema: { type: 'object', properties: {}, required: [] }
  • Supporting helper method in TelegramAuth class that determines authentication status by checking for saved cookies via CookieManager.
    async isAuthenticated(): Promise<boolean> { // For Telegram Web K, we just check if auth data exists // The actual verification happens when we try to use it const hasCookies = await this.cookieManager.hasCookies(); if (hasCookies) { logger.debug('Authentication data found'); return true; } return false; }

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/DLHellMe/telegram-mcp-server'

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