S4

sergekostenchuk/45telega

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

23 stars 5 forks 质量 77 趋势 14MIT

Telegram MCP 服务器,支持 45+ 方法,QR 认证,WSL/Kiro 设置,并部署支持 Docker

概览

一个强大的Telegram模型上下文协议(MCP)服务器,支持45+方法、生产准备部署和企业级功能。 - :消息、聊天、用户、媒体的完整API覆盖 - :Docker 支持、健康检查、监控、日志 - :非根容器、基于环境的配置、会话加密 - :异步架构、Redis 缓存、连接池 - :单线安装、自动更新、多种部署选项 为Windows用户提供全面的逐步指南,支持WSL和Kiro IDE集成。 - Python 3.9+ 或 Docker - my.telegram.org 的 Telegram API 凭证 - 最低 512MB 内存 - Linux/macOS/Windows(含 WSL) 1. 前往 my.telegram.org 2.用你的手机号登录 3.创建新应用 4.复制api_id并 api_hash 编辑 ~/Library/Application Support/Claude/claude_desktop_config.json: 详见Windows安装指南,了解Kiro IDE的详细集成说明。

概述(AI 翻译)

一个强大的Telegram模型上下文协议(MCP)服务器,支持45+方法、生产准备部署和企业级功能。

✨ 特色

  • 45+ Telegram 方法:消息、聊天、用户、媒体的完整 API 覆盖
  • 生产准备:Docker 支持、健康检查、监控、日志记录
  • 安全:非根容器,基于环境的配置,会话加密
  • 可扩展:异步架构、Redis缓存、连接池
  • 简单安装:一行安装,自动更新,多部署选项

🚀 快速启动

平台特定设置

🪟 Windows + WSL + Kiro IDE

** 📖 完整Windows安装指南 →**

为Windows用户提供全面的逐步指南,支持WSL和Kiro IDE集成。

🐧 Linux/macOS

单线安装

PyPI 安装

Docker 安装

📋 先修条件

  • Python 3.9+ 或 Docker
  • 来自 my.telegram.org 的Telegram API凭证
  • 最低 512MB 内存
  • Linux/macOS/Windows(含WSL)

🔧 配置

1.获取Telegram API凭证

  1. 去 my.telegram.org
  2. 用你的电话号码登录
  3. 创建新应用
  4. 复制api_id和api_hash

2.配置环境

收到 '.env.

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

🚀 45telega - Production-Ready Telegram MCP Server

A powerful Model Context Protocol (MCP) server for Telegram with 45+ methods, production-ready deployment, and enterprise features.

✨ Features

  • 45+ Telegram Methods: Complete API coverage for messages, chats, users, media
  • Production Ready: Docker support, health checks, monitoring, logging
  • Secure: Non-root container, environment-based config, session encryption
  • Scalable: Async architecture, Redis caching, connection pooling
  • Easy Install: One-line installation, auto-updates, multiple deployment options

🚀 Quick Start

Platform-Specific Setup

🪟 Windows + WSL + Kiro IDE

📖 Complete Windows Setup Guide →

Comprehensive step-by-step guide for Windows users with WSL and Kiro IDE integration.

🐧 Linux/macOS

One-Line Install

curl -sSL https://raw.githubusercontent.com/sergekostenchuk/45telega/main/install.sh | bash

PyPI Install

pip install 45telega

Docker Install

docker run -d \
  --name 45telega \
  -p 8765:8765 \
  -e TELEGRAM_API_ID=your_api_id \
  -e TELEGRAM_API_HASH=your_api_hash \
  -v $(pwd)/data:/data \
  ghcr.io/sergekostenchuk/45telega:latest

📋 Prerequisites

  • Python 3.9+ or Docker
  • Telegram API credentials from my.telegram.org
  • 512MB RAM minimum
  • Linux/macOS/Windows (with WSL)

🔧 Configuration

1. Get Telegram API Credentials

  1. Go to my.telegram.org
  2. Login with your phone number
  3. Create new application
  4. Copy api_id and api_hash

2. Configure Environment

Copy .env.example to .env:

cp ~/.config/45telega/.env.example ~/.config/45telega/.env

Edit with your credentials:

TELEGRAM_API_ID=your_api_id_here
TELEGRAM_API_HASH=your_api_hash_here
TELEGRAM_PHONE=+1234567890  # Optional

3. First Authentication

45telega sign-in --phone +1234567890

Enter the code you receive on Telegram.

🎯 Usage

Start MCP Server

# Native
45telega run

# Docker
docker-compose up -d

# With custom port
45telega run --port 9000

Add to Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "45telega": {
      "type": "stdio",
      "command": "/Users/you/.local/bin/45telega",
      "args": ["run"],
      "env": {
        "TELEGRAM_API_ID": "your_api_id",
        "TELEGRAM_API_HASH": "your_api_hash"
      }
    }
  }
}

Add to Kiro IDE (Windows + WSL)

在 GitHub 查看完整 README

安装

docker run -d \
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "45telega": { "type": "stdio", "command": "/Users/you/.local/bin/45telega", "args": ["run"], "env": { "TELEGRAM_API_ID": "your_api_id", "TELEGRAM_API_HASH": "your_api_hash" } } } }