Skip to main content
Glama
hevji

Discord MCP Server

by hevji

Discord MCP Server

AIコーディングアシスタントから直接Discordサーバーを管理できます。チャンネル、カテゴリ、ロールの作成、権限の設定、ロールの割り当てなど、すべて自然言語で行えます。

virustotal: https://www.virustotal.com/gui/file/56fafed35e2734debed600e585741c53f456148da257065e9ea8c9fcb62c798d

ツール

ツール

説明

create_category

新しいカテゴリチャンネルを作成

create_channel

カテゴリ内にテキストまたはボイスチャンネルを作成

create_role

色、ホイスト、メンション可否を指定して新しいロールを作成

edit_role

ロールの名前、色、ホイスト、メンション可否を編集

delete_role

ロールを削除(管理対象外、ボットの階層より下)

assign_role

ユーザー名でメンバーにロールを割り当て

remove_role

ユーザー名でメンバーからロールを解除

restrict_channel

チャンネルの権限を設定(ロールの許可/拒否、読み取り専用モード、スレッド制御)

create_role_restricted_channel

チャンネルを作成し、一度の呼び出しで権限を制限

rename_channel

テキストまたはボイスチャンネルの名前を変更

delete_category

カテゴリチャンネルを削除

delete_channel

テキストまたはボイスチャンネルを削除

list_channels

すべてのチャンネルの名前、タイプ、カテゴリを一覧表示

list_roles

すべてのロールの名前、色、メンバー数を一覧表示

create_webhook

テキストチャンネルにウェブフックを作成

send_webhook_message

既存のウェブフックを使用してメッセージを送信

set_slowmode

テキストチャンネルのスローモード遅延(秒)を設定

Related MCP server: discord-mcp

セットアップ

1. Discord ボットを作成

  1. https://discord.com/developers/applications にアクセス

  2. New Application をクリック → 名前を入力 → Create

  3. BotAdd Bot の順に移動

  4. Privileged Gateway Intents の下で、以下を有効にします:

    • Server Members Intent

    • Message Content Intent

  5. Token をコピー

  6. OAuth2URL Generator に移動

    • スコープ: bot

    • ボットの権限: Administrator(または手動で選択: チャンネルの管理、ロールの管理、メンバーをキック、ウェブフックの管理、メッセージを送信、メッセージを読む、チャンネルを見る)

  7. 生成された URL をブラウザで開き、ボットをサーバーに招待します

2. 環境の設定

cp .env.example .env

.env を編集し、ボットのトークンを貼り付けます:

DISCORD_TOKEN=your_token_here

任意: 名前を指定してボットを特定のサーバーに固定します(デフォルトは Monolith)。すべてのツールはこのギルドのみで動作します:

DISCORD_GUILD_NAME=Monolith

3. 依存関係のインストール

pip install -r requirements.txt

MCPホストの設定

opencode

プロジェクトルートの opencode.json に追加:

{
  "mcp": {
    "discord": {
      "type": "local",
      "command": ["python", "/absolute/path/to/discord_mcp_server.py"]
    }
  }
}

サーバーを読み込むために opencode を再起動します。

Claude Desktop

claude_desktop_config.json を編集(File → Settings → Developer → Edit Config):

{
  "mcpServers": {
    "discord": {
      "command": "python",
      "args": ["/absolute/path/to/discord_mcp_server.py"],
      "env": {
        "DISCORD_TOKEN": "your_token_here"
      }
    }
  }
}

Claude Code

プロジェクトの ~/.claude.json または .mcp.json に追加:

{
  "mcpServers": {
    "discord": {
      "command": "python",
      "args": ["/absolute/path/to/discord_mcp_server.py"],
      "env": {
        "DISCORD_TOKEN": "your_token_here"
      }
    }
  }
}

Cursor

プロジェクトルートに .cursor/mcp.json を作成(グローバルにする場合は ~/.cursor/mcp.json):

{
  "mcpServers": {
    "discord": {
      "command": "python",
      "args": ["/absolute/path/to/discord_mcp_server.py"],
      "env": {
        "DISCORD_TOKEN": "your_token_here"
      }
    }
  }
}

Windsurf

~/.codeium/windsurf/mcp_config.json に追加:

{
  "mcpServers": {
    "discord": {
      "command": "python",
      "args": ["/absolute/path/to/discord_mcp_server.py"],
      "env": {
        "DISCORD_TOKEN": "your_token_here"
      }
    }
  }
}

Codex CLI

~/.codex/config.toml に追加:

[mcp_servers.discord]
command = "python"
args = ["/absolute/path/to/discord_mcp_server.py"]

[mcp_servers.discord.env]
DISCORD_TOKEN = "your_token_here"

またはCLIで追加:

codex mcp add discord -- python /absolute/path/to/discord_mcp_server.py

Antigravity (Google)

~/.gemini/config/mcp_config.json に追加:

{
  "mcpServers": {
    "discord": {
      "command": "python",
      "args": ["C:\\path\\to\\discord_mcp_server.py"],
      "env": {
        "DISCORD_TOKEN": "your_token_here"
      }
    }
  }
}

Antigravity → Agent panel → ... → MCP Servers → Manage MCP Servers → View raw config を開きます。

注意: .env ファイルをインラインの env の代わりに使用する場合は、env ブロックを省略し、スクリプト内の load_dotenv().env を見つけられるようにしてください(作業ディレクトリはホストによって異なります)。

仕組み

スクリプトは stdio 上で MCP サーバーを実行し、ボットトークンを介して Discord に接続します。起動時にすべてのツールを登録し、AI アシスタントが必要に応じてそれらを呼び出します。Discord ボットは1つのサーバーにのみ存在すればよく、ログイン時に最初のギルドを自動選択します。

Maintenance

ActivityMaintained
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables AI clients to manage Discord servers through natural language, offering tools for guilds, channels, messages, roles, members, webhooks, invites, and automations. Includes a conversational agent that responds to @mentions in Discord.
    8
    Apache 2.0
  • A
    license
    Not graded
    quality
    D
    maintenance
    Control your Discord server with AI. Lets you manage channels, roles, members, messages, and more through natural language.
    348
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables managing a Discord server using natural language through AI clients like Claude, with 139 admin tools across 20 categories for roles, channels, members, messages, threads, moderation, and more.
    168
    28
    MIT
  • A
    license
    B
    quality
    A
    maintenance
    Gives your AI assistant full control of a Discord server: 148 tools for chat, moderation, automod, events, and administration, up to building a complete community server from one paragraph. Every destructive action previews first and waits for your confirmation.
    100
    154
    7
    Elastic 2.0

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hevji/Discord-Bot-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server