UNPKG

telegram-mcp-local-server

Version:

Secure Model Context Protocol (MCP) server for Telegram integration. Runs locally, allows AI agents to read chats and message history, with built-in readonly mode for safety.

33 lines 902 B
export interface TelegramConfig { apiId: number; apiHash: string; sessionString?: string; } export interface ChatInfo { id: string; title: string; type: string; username?: string; participantsCount?: number; } export interface MessageInfo { id: number; text: string; date: Date; fromId?: string; fromUsername?: string; fromFirstName?: string; fromLastName?: string; replyToMsgId?: number; } export declare class TelegramClient { private client; private config; constructor(config: TelegramConfig); connect(): Promise<void>; getChats(limit?: number): Promise<ChatInfo[]>; getChatHistory(chatId: string, limit?: number, offsetId?: number): Promise<MessageInfo[]>; sendMessage(chatId: string, message: string): Promise<MessageInfo>; disconnect(): Promise<void>; } //# sourceMappingURL=telegram-client.d.ts.map