
mcp discord
DiscordのBot機能をMCPツールとして提供するREST API MCPサーバー(Stdioトランスポート対応、日本語README付き)
Repository Info
About This Server
DiscordのBot機能をMCPツールとして提供するREST API MCPサーバー(Stdioトランスポート対応、日本語README付き)
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
Discord MCPサーバー(REST API版)
このプロジェクトは、DiscordのBot機能をMCP(Model Context Protocol)ツールとして提供するサーバーです。 REST APIのみを利用し、標準入出力(Stdioトランスポート)でMCPクライアントと通信します。
主な機能(ツール)
send_message:指定したチャンネルにメッセージを送信get_server_info:サーバー情報の取得list_members:サーバーメンバー一覧とロール名の取得get_user_info:ユーザー情報の取得get_roles:サーバー内のロール一覧取得
セットアップ手順
1. Discord Botの作成
- Discord Developer Portal で新規アプリケーションを作成
- Botを作成し、トークンを取得
- Botをサーバーに招待(必要な権限を付与)
2. 必要な環境変数
DISCORD_TOKEN:BotのトークンDISCORD_GUILD_ID:サーバーID(ギルドID)
例:
export DISCORD_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
export DISCORD_GUILD_ID=123456789012345678
3. 依存パッケージのインストール
pip install -r requirements.txt
4. サーバーの起動
python src/discord_mcp/rest_api_sample.py
MCPクライアントからStdioトランスポートで接続してください。
ログについて
- すべてのAPIリクエストやMCPツール呼び出しのログは
/tmp/discord_mcp_rest_api.logに出力されます。 - 問題発生時はこのファイルを確認してください。
注意事項
- 本サーバーはREST APIのみを利用しているため、Bot Gatewayイベントには対応していません。
- チャンネルIDは都度ツール呼び出し時に指定してください(環境変数不要)。
ライセンス
MIT License
Quick Start
Clone the repository
git clone https://github.com/nodoka8/mcp-discordInstall dependencies
cd mcp-discord
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.