Nika
Nika — Discord MCPサーバー
AIアシスタントがDiscordコミュニティを運営できるようにする包括的なModel Context Protocolサーバー:メッセージング、モデレーション、ロール、チャンネル、フォーラム、ウェブフック、招待、予定イベント、AutoMod、オンボーディング、絵文字/ステッカー、権限上書き、音声管理 — 111ツール、さらに生のRESTパススルー(discord_api_request)により、Discord APIができることはすべて到達可能です。
Python + discord.py(永続的なゲートウェイ接続)とFastMCPで構築されています。
セットアップ
1. Discordボットを作成する(済み)
アプリケーション: Nika(ID
1538805149865091092)有効なインテント: Server Members、Message Content
トークン:
.envに保存(絶対にコミットしないでください —.gitignoreが保護します)
2. ボットをサーバーに招待する
このURLを開いてサーバーを選択してください(完全な機能を利用するにはAdministratorを付与してください):
https://discord.com/api/oauth2/authorize?client_id=1538805149865091092&permissions=8&scope=bot%20applications.commands⚠️ ボットがサーバーに参加していないと、ほとんどのツールは何もできません。
3. インストールと設定
python -m venv .venv
.venv\Scripts\pip install -e ".[dev]".env(既に作成済み):
DISCORD_TOKEN=... # bot token
DISCORD_GUILD_ID= # optional: default server id → makes guildId optional everywhere
MCP_TRANSPORT=stdio # stdio | http
HTTP_HOST=0.0.0.0 # HTTP mode only
HTTP_PORT=8085
LOG_LEVEL=INFORelated MCP server: Cloud Discord
使用方法
stdio(デフォルト — Claude Desktop、VS Code、Cursor など)
.venv\Scripts\python -m discord_mcpClaude Desktop の claude_desktop_config.json:
{
"mcpServers": {
"nika": {
"command": "d:\\Projects\\david\\DiscordMCP\\.venv\\Scripts\\python.exe",
"args": ["-m", "discord_mcp"],
"cwd": "d:\\Projects\\david\\DiscordMCP"
}
}
}HTTP(ストリーミング) — リモートアクセス、n8n、マルチクライアント
.venv\Scripts\python -m discord_mcp --transport http --port 8085
# endpoint: http://localhost:8085/mcpクライアント設定:
{
"mcpServers": {
"nika": { "url": "http://localhost:8085/mcp" }
}
}Docker
docker compose up -d # builds + runs HTTP mode on :8085
docker run -i --rm -e DISCORD_TOKEN=$env:DISCORD_TOKEN discord-mcp:latest # stdioMCP Inspector でテストする
npx @modelcontextprotocol/inspector .venv\Scripts\python.exe -m discord_mcpツールリファレンス(111ツール)
領域 | ツール |
サーバー |
|
チャンネル |
|
メッセージ |
|
メンバー |
|
ロール |
|
DM |
|
モデレーション |
|
ボイス |
|
イベント |
|
権限 |
|
招待 |
|
ウェブフック |
|
フォーラム |
|
絵文字とステッカー |
|
AutoMod |
|
オンボーディングと監査 |
|
生API |
|
設計メモ
ハイブリッドゲートウェイ + REST: 1つの永続的な discord.py ゲートウェイ接続がライブ状態(メンバー/チャンネルの検索、名前→ID)を提供し、変更は同じクライアントを通じて行われます。ツール呼び出しは
asyncio.run_coroutine_threadsafeでゲートウェイループにブリッジされます。安全性: 生ツールは変更メソッドに対して
confirmDestructive=trueを要求します。prune_membersはデフォルトでドライランです。破壊的なツールはreasonを受け付け、監査ログに書き込まれます。オプションの
guildId:.envにDISCORD_GUILD_IDを設定すると、すべてのguildIdパラメータがオプションになります。エラー: Discord エラーは読みやすいメッセージに変換されます(例:
Missing permissions: ...)。
制限事項
ボットトークンが必要です(ユーザートークン/セルフボットの自動化はDiscordの利用規約に違反します)。
メッセージの読み取りには、ボットがチャンネルを閲覧できることと(内容を取得するには)Message Contentインテントが必要です。
音声のストリーミング/受信はサポートされていません。
開発
.venv\Scripts\python -m pytest # 22 unit testsレイアウト: discord_mcp/bot.py(ゲートウェイブリッジ) · discord_mcp/server.py(FastMCP) · discord_mcp/tools/*.py(ドメインごとに1モジュール) · discord_mcp/utils/(シリアライザー、埋め込み)。
ライセンス
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
- Discortics - Discord BotDeprecatedcom.discortics
Set up and manage your Discord server from MCP: channels, roles, verification, tickets and security.
Discord MCP server for ChatGPT, Claude and any AI agent: list servers and channels, read channel messages, search messages, send message, reply to message, send DM, read mentions and assign role in your own Discord account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Discord yourself; Cotlet does not store your password and you need no Discord API key. About the official Discord API: Yes, Discord has an official API for bots and OAuth2 apps, but it acts as a bot that a server manager adds, not as you, and Discord has no official MCP server for it (checked 5 Nov 2026). The MCP server on Discord's docs site only searches documentation. Setup and FAQ: https://cotlet.dev/integrations/discord-api-mcp-server
Official MCP server for subfeed.app — the cloud for agents. 15+ tools for AI agents to register, build, and deploy other agents. Zero human required. Start here: subfeed.app/skill.md
Related MCP Servers
- AlicenseBqualityDmaintenanceA Discord MCP server that enables AI assistants to interact with Discord platforms, providing functionalities like sending messages, managing channels, creating forum posts, and handling webhooks.211MIT
- AlicenseNot gradedqualityBmaintenanceAn MCP server that gives AI agents full admin control over Discord servers with 59 tools for messaging, moderation, roles, channels, forums, reactions, files, and more, deployed on Cloudflare Workers.9MIT
- AlicenseNot gradedqualityDmaintenanceComprehensive Discord MCP server with 66 tools that provides rich message context including emoji reactions, thread indicators, and attachment metadata inline. Enables AI assistants to interact with Discord servers for messaging, moderation, roles, channels, and more.1MIT
- AlicenseBqualityDmaintenanceA Discord MCP server that enables AI assistants to interact with the Discord platform, providing features like message sending, channel management, forum operations, reactions, and webhook management.22MIT