discord-mcp

discord-mcp

Enables MCP clients to interact with Discord servers, allowing operations such as sending messages and reading message history through the Discord API.

Category
Visit Server

README

Discord MCP Server

English README

Discord API MCP (Model Context Protocol) Server - Discord機能をMCP対応クライアントと統合するためのTypeScript実装です。

機能

  • Zodバリデーションを使用したTypeScript実装
  • 簡単なデプロイのためのDockerサポート
  • MCPプロトコル準拠
  • Discord API統合

利用可能なツール

利用可能なツールの詳細については、ツール一覧を参照してください。

要件

  • Docker
  • Docker Compose(オプション)

インストール

# リポジトリをクローン
git clone https://github.com/yourusername/discord-mcp.git
cd discord-mcp

# Dockerイメージをビルド
docker build -t discord-mcp .

MCP設定

Claude Desktop

  1. Claude Desktopの設定ファイルを編集します:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

  1. 以下の設定を追加します:

Dockerを使用する場合(推奨)

{
  "mcpServers": {
    "discord-mcp": {
      "command": "docker",
      "args": [
        "run", 
        "--rm", 
        "-e", "DISCORD_TOKEN=your_discord_bot_token",
        "discord-mcp"
      ]
    }
  }
}

ローカルビルドを使用する場合

{
  "mcpServers": {
    "discord-mcp": {
      "command": "node",
      "args": ["/path/to/discord-mcp/dist/index.js"],
      "env": {
        "DISCORD_TOKEN": "your_discord_bot_token"
      }
    }
  }
}

開発環境での設定

{
  "mcpServers": {
    "discord-mcp-dev": {
      "command": "npx",
      "args": ["ts-node", "/path/to/discord-mcp/src/index.ts"],
      "cwd": "/path/to/discord-mcp",
      "env": {
        "DISCORD_TOKEN": "your_discord_bot_token",
        "LOG_LEVEL": "debug"
      }
    }
  }
}

その他のMCPクライアント

stdio方式で接続できる任意のMCPクライアントから利用できます:

# Dockerで直接実行
docker run --rm -e DISCORD_TOKEN=your_discord_bot_token discord-mcp

使用方法

Docker(推奨)

# 基本実行
docker run --rm -e DISCORD_TOKEN=your_discord_bot_token discord-mcp

# Docker Composeを使用
docker-compose up --build

開発環境(ローカル開発用)

# 依存関係をインストール
npm install

# 開発モードで開始
npm run dev

スクリプト

  • npm run build - TypeScriptをJavaScriptにコンパイル
  • npm run start - 本番サーバーを開始
  • npm run dev - ts-nodeを使用して開発モードで開始
  • npm run lint - ESLintを実行
  • npm run typecheck - TypeScriptの型チェックを実行
  • npm run docker:build - Dockerイメージをビルド

プロジェクト構造

discord-mcp/
├── src/
│   └── index.ts          # メインサーバー実装
├── dist/                 # コンパイル済みJavaScript出力
├── Dockerfile            # Docker設定
├── docker-compose.yml    # Docker Compose設定
├── package.json          # プロジェクト依存関係とスクリプト
├── tsconfig.json         # TypeScript設定
└── README.md             # このファイル

設定ガイド

Discord Bot の設定

  1. Discord Developer Portalにアクセス
  2. 新しいApplicationを作成
  3. Bot タブでBot トークンを取得
  4. OAuth2 → URL Generatorで以下の権限を設定:
    • bot スコープ
    • Send Messages 権限
    • Read Message History 権限
  5. 生成されたURLでDiscordサーバーに招待

環境変数の設定

# Discord Bot トークンを設定
export DISCORD_TOKEN="your_discord_bot_token_here"

# ログレベルの設定(オプション)
export LOG_LEVEL="info"  # debug, info, warn, error

設定確認のコマンド

# Claude Desktop設定ファイルの確認 (macOS)
cat ~/Library/Application\ Support/Claude/claude_desktop_config.json

# JSON形式の検証
python -m json.tool ~/Library/Application\ Support/Claude/claude_desktop_config.json

# Dockerイメージの確認
docker images | grep discord-mcp

ライセンス

MIT License - 詳細はLICENSEファイルを参照してください。

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured