V3

v-3/discordmcp

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

242 stars 106 forks 품질 58 트렌드 19

v-3/discordmcp는 https://github.com/v-3/discordmcp.에서 가져온 MCP 서버 후보입니다.

개요

v-3/discordmcp는 https://github.com/v-3/discordmcp.에서 가져온 MCP 서버 후보입니다.

개요(AI 번역)

모델 컨텍스트 프로토콜(MCP) 서버로, LLM이 Discord 채널과 상호작용할 수 있게 하여 Discord API를 통해 메시지를 주고받고 읽을 수 있습니다. 이 서버를 통해 Claude와 같은 LLM은 사용자 제어와 보안을 유지하면서 Discord 채널과 직접 상호작용할 수 있습니다.

특징

  • 디스코드 채널로 메시지 전송
  • 채널에서 최근 메시지 읽기
  • 자동 서버 및 채널 탐색
  • 채널 이름과 ID 모두 지원합니다
  • 적절한 오류 처리 및 검증

선수 조건

  • Node.js 16.x 이상
  • 디스코드 봇 토큰
  • 적절한 권한을 받아 봇을 서버에 초대해야 합니다:
  • 메시지 읽기/채널 보기
  • 메시지 전송
  • 메시지 기록 읽기

준비

  1. 이 저장소를 복제:

  2. 의존성 설치:

  3. 루트 디렉터리에 Discord 봇 토큰으로 .env 파일을 생성하세요:

  4. 서버 구축:

데스크톱용 클로드 사용

  1. Claude for Desktop 설정 파일을 열기:
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • 창문: %APPDATA%\Claude\claude_desktop_config.json
  1. Discord MCP 서버 구성 추가:

  2. 데스크톱용 Claude 재시작

사용 가능한 도구

메시지 전송

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

Discord MCP Server

A Model Context Protocol (MCP) server that enables LLMs to interact with Discord channels, allowing them to send and read messages through Discord’s API. Using this server, LLMs like Claude can directly interact with Discord channels while maintaining user control and security.

Features

  • Send messages to Discord channels
  • Read recent messages from channels
  • Automatic server and channel discovery
  • Support for both channel names and IDs
  • Proper error handling and validation

Prerequisites

  • Node.js 16.x or higher
  • A Discord bot token
  • The bot must be invited to your server with proper permissions:
    • Read Messages/View Channels
    • Send Messages
    • Read Message History

Setup

  1. Clone this repository:
git clone https://github.com/yourusername/discordmcp.git
cd discordmcp
  1. Install dependencies:
npm install
  1. Create a .env file in the root directory with your Discord bot token:
DISCORD_TOKEN=your_discord_bot_token_here
  1. Build the server:
npm run build

Usage with Claude for Desktop

  1. Open your Claude for Desktop configuration file:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
  2. Add the Discord MCP server configuration:

{
  "mcpServers": {
    "discord": {
      "command": "node",
      "args": ["path/to/discordmcp/build/index.js"],
      "env": {
        "DISCORD_TOKEN": "your_discord_bot_token_here"
      }
    }
  }
}
  1. Restart Claude for Desktop

Available Tools

send-message

Sends a message to a specified Discord channel.

Parameters:

  • server (optional): Server name or ID (required if bot is in multiple servers)
  • channel: Channel name (e.g., “general”) or ID
  • message: Message content to send

Example:

{
  "channel": "general",
  "message": "Hello from MCP!"
}

read-messages

Reads recent messages from a specified Discord channel.

Parameters:

  • server (optional): Server name or ID (required if bot is in multiple servers)
  • channel: Channel name (e.g., “general”) or ID
  • limit (optional): Number of messages to fetch (default: 50, max: 100)

Example:

{
  "channel": "general",
  "limit": 10
}

Development

  1. Install development dependencies:
npm install --save-dev typescript @types/node
  1. Start the server in development mode:
npm run dev

Testing

You can test the server using the MCP Inspector:

npx @modelcontextprotocol/inspector node build/index.js

Examples

Here are some example interactions you can try with Claude after setting up the Discord MCP server:

  1. “Can you read the last 5 messages from the general channel?”
  2. “Please send a message to the announcements channel saying ‘Meeting starts in 10 minutes’”
  3. “What were the most recent messages in the development channel about the latest release?”
GitHub에서 전체 README 보기

설치

npx @modelcontextprotocol/inspector node build/index.js
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

{ "mcpServers": { "discord": { "command": "node", "args": ["path/to/discordmcp/build/index.js"], "env": { "DISCORD_TOKEN": "your_discord_bot_token_here" } } } }