MCP-Communicator-Telegram

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

Integrations

  • Allows communication with users through Telegram. Provides tools to ask questions, send notifications, share files, and create project archives via a Telegram bot.

MCP 커뮤니케이터(텔레그램)

텔레그램을 통해 사용자와 소통할 수 있는 MCP 서버입니다. 이 서버는 텔레그램 봇을 통해 사용자와 소통할 수 있는 도구를 제공하며, 여기에는 질문하기, 알림 보내기, 파일 공유, 프로젝트 아카이브 생성 등이 포함됩니다.

설치

npm(글로벌)을 통해

지엑스피1

npx를 통해(주문형)

npx mcptelegram

Telegram 채팅 ID를 얻으려면:

npx mcptelegram-chatid

특징

  • Telegram을 통해 사용자에게 질문하세요
  • 사용자에게 알림 보내기(응답 필요 없음)
  • Telegram을 통해 사용자에게 파일 보내기
  • 프로젝트 zip 파일을 생성하고 전송합니다(.gitignore 준수)
  • 비동기적으로 응답을 받습니다(응답을 무기한으로 기다립니다)
  • 응답 기반 메시지 추적 지원
  • 보안 채팅 ID 검증
  • 오류 처리 및 로깅

필수 조건

  • Node.js(v14 이상)
  • @BotFather 로부터 얻은 Telegram 봇 토큰
  • 귀하의 Telegram 채팅 ID(포함된 유틸리티를 사용하여 얻을 수 있음)

설치

  1. 저장소를 복제합니다.
git clone https://github.com/qpd-v/mcp-communicator-telegram.git cd mcp-communicator-telegram
  1. 종속성 설치:
npm install
  1. Telegram 봇 만들기:
    • Telegram을 열고 @BotFather 를 검색하세요.
    • /newbot 보내고 지시를 따르세요
    • 받은 봇 토큰을 저장하세요
  2. 채팅 ID 받기:
    • .env.example``.env 로 복사합니다.
    • .env 파일에 봇 토큰을 추가합니다.
      TELEGRAM_TOKEN=your_bot_token_here
    • 채팅 ID 유틸리티를 실행하세요.
      npm run build node build/get-chat-id.js
    • 봇에게 메시지를 보내세요
    • 콘솔에 나타나는 채팅 ID를 복사하세요
    • .env 파일에 채팅 ID를 추가합니다.
      TELEGRAM_TOKEN=your_bot_token_here CHAT_ID=your_chat_id_here

구성

서버를 MCP 설정 파일(Windows의 경우 일반적으로 %APPDATA%\Code\User\globalStorage\rooveterinaryinc.roo-cline\settings\cline_mcp_settings.json 에 위치)에 추가합니다.

{ "mcpServers": { "mcp-communicator-telegram": { "command": "node", "args": ["path/to/mcp-communicator-telegram/build/index.js"], "env": { "TELEGRAM_TOKEN": "your_bot_token_here", "CHAT_ID": "your_chat_id_here" } } } }

사용 가능한 도구

ask_user

Telegram을 통해 사용자에게 질문을 하고 답변을 기다립니다.

입력 스키마:

{ "type": "object", "properties": { "question": { "type": "string", "description": "The question to ask the user" } }, "required": ["question"] }

사용 예:

const response = await use_mcp_tool({ server_name: "mcp-communicator-telegram", tool_name: "ask_user", arguments: { question: "What is your favorite color?" } });

사용자에게 알림

Telegram을 통해 사용자에게 알림 메시지를 보냅니다(응답 필요 없음).

입력 스키마:

{ "type": "object", "properties": { "message": { "type": "string", "description": "The message to send to the user" } }, "required": ["message"] }

사용 예:

await use_mcp_tool({ server_name: "mcp-communicator-telegram", tool_name: "notify_user", arguments: { message: "Task completed successfully!" } });

보내기_파일

Telegram을 통해 사용자에게 파일을 전송합니다.

입력 스키마:

{ "type": "object", "properties": { "filePath": { "type": "string", "description": "The path to the file to send" } }, "required": ["filePath"] }

사용 예:

await use_mcp_tool({ server_name: "mcp-communicator-telegram", tool_name: "send_file", arguments: { filePath: "path/to/file.txt" } });

zip_프로젝트

프로젝트 디렉토리의 zip 파일을 생성하고(.gitignore 패턴을 준수) Telegram을 통해 사용자에게 전송합니다.

입력 스키마:

{ "type": "object", "properties": { "directory": { "type": "string", "description": "Directory to zip (defaults to current working directory)" } }, "required": [] }

기본 디렉토리(현재 작업 디렉토리)에서의 사용 예:

await use_mcp_tool({ server_name: "mcp-communicator-telegram", tool_name: "zip_project", arguments: {} });

특정 디렉토리에 대한 사용 예:

await use_mcp_tool({ server_name: "mcp-communicator-telegram", tool_name: "zip_project", arguments: { directory: "/path/to/your/project" } });

특징:

  • 디렉토리 이름을 기반으로 [project-name]-project.zip 이라는 이름의 zip 파일을 생성합니다.
  • 지정된 디렉토리나 현재 작업 디렉토리를 압축할 수 있습니다.
  • .gitignore 패턴을 존중합니다.
  • 아카이브에서 올바른 파일 경로를 유지합니다.
  • zip 파일을 보낸 후 자동으로 정리합니다.
  • 최대 2GB 크기의 파일을 처리합니다.

개발

프로젝트를 빌드하세요:

npm run build

개발 모드에서 실행:

npm run dev

변화를 살펴보세요:

npm run watch

빌드 디렉토리 정리:

npm run clean

보안

  • 서버는 구성된 채팅 ID의 메시지에만 응답합니다.
  • 환경 변수는 민감한 구성에 사용됩니다.
  • 메시지 ID는 질문/답변 쌍을 추적하는 데 사용됩니다.
  • 봇은 적절한 맥락이 없는 메시지를 무시합니다.

특허

아이에스씨

작가

qpd-v

버전

0.2.1 # 새로운 기능에 대한 주요 버전 범프: notify_user, send_file 및 zip_project 도구

-
security - not tested
F
license - not found
-
quality - not tested

텔레그램을 통해 사용자와 소통할 수 있는 MCP 서버입니다. 이 서버는 사용자에게 질문을 하고 텔레그램 봇을 통해 답변을 받을 수 있는 도구를 제공합니다.

  1. Installation
    1. Via npm (global)
    2. Via npx (on-demand)
  2. Features
    1. Prerequisites
      1. Installation
        1. Configuration
          1. Available Tools
            1. ask_user
            2. notify_user
            3. send_file
            4. zip_project
          2. Development
            1. Security
              1. License
                1. Author
                  1. Version
                    ID: cvt5yz29og