Discord MCP Server
Discord MCP Server
AIコーディングアシスタントから直接Discordサーバーを管理できます。チャンネル、カテゴリ、ロールの作成、権限の設定、ロールの割り当てなど、すべて自然言語で行えます。
virustotal: https://www.virustotal.com/gui/file/56fafed35e2734debed600e585741c53f456148da257065e9ea8c9fcb62c798d
ツール
ツール | 説明 |
| 新しいカテゴリチャンネルを作成 |
| カテゴリ内にテキストまたはボイスチャンネルを作成 |
| 色、ホイスト、メンション可否を指定して新しいロールを作成 |
| ロールの名前、色、ホイスト、メンション可否を編集 |
| ロールを削除(管理対象外、ボットの階層より下) |
| ユーザー名でメンバーにロールを割り当て |
| ユーザー名でメンバーからロールを解除 |
| チャンネルの権限を設定(ロールの許可/拒否、読み取り専用モード、スレッド制御) |
| チャンネルを作成し、一度の呼び出しで権限を制限 |
| テキストまたはボイスチャンネルの名前を変更 |
| カテゴリチャンネルを削除 |
| テキストまたはボイスチャンネルを削除 |
| すべてのチャンネルの名前、タイプ、カテゴリを一覧表示 |
| すべてのロールの名前、色、メンバー数を一覧表示 |
| テキストチャンネルにウェブフックを作成 |
| 既存のウェブフックを使用してメッセージを送信 |
| テキストチャンネルのスローモード遅延(秒)を設定 |
Related MCP server: discord-mcp
セットアップ
1. Discord ボットを作成
New Application をクリック → 名前を入力 → Create
Bot → Add Bot の順に移動
Privileged Gateway Intents の下で、以下を有効にします:
Server Members IntentMessage Content Intent
Token をコピー
OAuth2 → URL Generator に移動
スコープ:
botボットの権限:
Administrator(または手動で選択: チャンネルの管理、ロールの管理、メンバーをキック、ウェブフックの管理、メッセージを送信、メッセージを読む、チャンネルを見る)
生成された URL をブラウザで開き、ボットをサーバーに招待します
2. 環境の設定
cp .env.example .env.env を編集し、ボットのトークンを貼り付けます:
DISCORD_TOKEN=your_token_here任意: 名前を指定してボットを特定のサーバーに固定します(デフォルトは Monolith)。すべてのツールはこのギルドのみで動作します:
DISCORD_GUILD_NAME=Monolith3. 依存関係のインストール
pip install -r requirements.txtMCPホストの設定
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.pyAntigravity (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つのサーバーにのみ存在すればよく、ログイン時に最初のギルドを自動選択します。
This server cannot be deployed
Maintenance
Related MCP Connectors
Build Discord communities with AI: roles, channels, modules, automations and reviewed announcements.
Control your Discord community: send/read messages, manage channels and forums, and handle webhook…
An MCP server that integrates with Discord to provide AI-powered features.
Run Discord forms, surveys, polls and quizzes from your AI app: build, launch and analyze projects.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceControl your Discord server with AI. Lets you manage channels, roles, members, messages, and more through natural language.96 npmMIT
- AlicenseAqualityCmaintenanceEnables AI clients to manage Discord servers, including channels, messages, roles, members, permissions, threads, invites, events, webhooks, and emoji, through natural language commands.5596 npm1MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to interact with Discord by managing servers, channels, roles, members, messages, forum posts, reactions, webhooks, and permissions.733 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to interact with the Discord platform for managing servers, channels, messages, roles, members, forums, and webhooks through natural language.733 npmMIT