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.

40 lines 1.11 kB
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 interface FolderInfo { id: number; title: string; emoticon?: string; } 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>; getFolders(): Promise<FolderInfo[]>; getChannelsFromFolder(folderId: number, limit?: number): Promise<ChatInfo[]>; disconnect(): Promise<void>; } //# sourceMappingURL=telegram-client.d.ts.map