discord-maint-mcp
Allows interacting with permitted Discord channels and their threads via the Discord REST API, including listing channels and active threads, reading recent messages, and posting messages with attachments.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
discord-maint-mcp
Claude Code などの MCP クライアントから、許可した Discord チャンネルを読む・投稿するためのローカル stdio サーバーです。Discord REST API を利用します。
開発中のbotの返事を読んだり、成果物を添付したりするために作りました。単独でも使えます。communitd と組み合わせると、botのメンションからローカルエージェントに仕事を依頼できます。
ツール
ツール | 内容 |
| テキストチャンネル名と、設定上の許可の有無 |
| 指定した許可チャンネル内のアクティブなスレッド |
| 許可チャンネルまたは配下スレッドの直近のメッセージ(最大50件、古い順) |
| 本文(最大2000字)とファイル(最大10個)の投稿 |
メッセージの削除・編集、サーバー管理のツールはありません。
Related MCP server: discord-context-bridge
必要なもの
Node.js 22以上
Claude Code、またはローカル stdio に対応する MCP クライアント
自分で管理できる Discord サーバーとbot
Windowsで開発・検証しています。自動テストでは偽のDiscordを使います。CIもWindows上で実行します。
セットアップ
Discord Developer Portal でアプリとbotを作ります。Bot設定で Message Content Intent を有効にします。
「チャンネルを見る・メッセージを送る・スレッドで送る・履歴を読む・ファイルを添付」を付けて招待します。管理者権限は不要です。
<APP_ID>はアプリのIDに置き換えます。https://discord.com/oauth2/authorize?client_id=<APP_ID>&scope=bot&permissions=274878008320リポジトリを取得し、依存をインストールします。
git clone https://github.com/jiro-prog/discord-maint-mcp.git cd discord-maint-mcp npm ci.env.exampleを.envにコピーします(PowerShellならCopy-Item .env.example .env)。botトークン、サーバーID、許可チャンネル名を入力します。トークンはGitに入れません。Claude Codeに登録します。次の2つのパスを、取得したリポジトリの絶対パスに置き換えます。パスに空白がある場合も引用符を残します。
claude mcp add --transport stdio --scope user discord-maint -- node "--env-file=/absolute/path/discord-maint-mcp/.env" "/absolute/path/discord-maint-mcp/src/server.mjs"Windowsなら
/absolute/path/部分をC:/tools/などの実際の場所にします。登録構文は Claude Codeの公式ドキュメント を参照してください。Claude Codeを開き直し、
/mcpで接続状態を確認します。
他のMCPクライアントでも、同じ node コマンドと2つの引数で起動できます。npm start はリポジトリ内から手動で起動する場合のコマンドです。
設定
環境変数 | 内容 |
| botトークン(必須) |
| サーバーID(必須) |
| 許可チャンネル名。 |
| 添付専用フォルダの絶対パス。カンマ区切り。未設定なら添付不可 |
| 投稿記録のJSONLファイル。指定した場合のみ記録。絶対パスを推奨 |
| 1ファイルの上限。既定10 MiB。Discord側の制限も適用 |
チャンネル名は一意に解決できる必要があります。同じ名前のチャンネルが複数ある場合は、その名前宛ての読み書きを拒否します。
設計と境界
読み書き先は許可チャンネルと配下のスレッドに限定します。チャンネル一覧には許可していないチャンネル名も表示します。
添付は実体パスで確認し、許可フォルダ外を指すリンクやジャンクションを拒否します。
.env・.gitなど、ドットで始まる名前を含むパスも拒否します。許可フォルダ内の通常名のファイルは内容を検査しません。アップロード専用の場所を指定してください。PC全体やホームディレクトリを指定する用途には向きません。
@everyone/@hereは拒否し、ロール通知も無効にします。ユーザーへのメンションは可能です。投稿記録を有効にすると、本文の先頭80字と添付の名前・サイズを保存します。記録を書き込めなくても投稿は継続します。
botトークンをエラー文から伏せます。Discord本文は他人の指示を含みうるため、読むだけで新たな操作を許可したことにはなりません。
Discordへの本文・添付の送信と、MCPクライアントが読み取った内容をモデルへ渡す処理は、外部サービスを利用します。
communitd と組み合わせる場合
communitd の config.secrets.json に "maintenanceBotIds": ["<APP_ID>"] を設定して再起動します。このbotからのメンションは作者の代理として扱われるため、トークンを持つ人はローカルエージェントに仕事を依頼できる立場になります。
開発と検証
npm ci
npm test自動テストは12件です。許可範囲・添付の実体パス・メンション・上限・トークン伏字と、実プロセスに対するMCPのツール一覧取得を検証します。実際のDiscordには接続しません。
src/policy.mjs は検証ルール、src/discord.mjs はREST API窓口、src/tools.mjs はツール処理、src/server.mjs はMCP登録を担当します。
ライセンス
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
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
- Discortics - Discord BotDeprecatedcom.discortics
Set up and manage your Discord server from MCP: channels, roles, verification, tickets and security.
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.
Discover MCP servers and A2A agents; verify, message, post, follow, react, and receive webhooks.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceEnables MCP clients to read, post to, and moderate a Discord server through the Discord REST API, with opt-in guardrails and dry-run safeguards.-
- AlicenseNot gradedqualityBmaintenanceEnables authorized MCP clients to perform five read-only operations — checking connection status, listing conversations, reading messages, searching, and polling for changes — over selected Discord server channels and DMs, with scope-based authentication, retention limits, and no ability to send messages or moderate.1MIT
- AlicenseNot gradedqualityCmaintenanceEnables MCP clients to read a Discord server’s text history through per-member Discord OAuth approval, with read-only channel, thread, message retrieval, and bounded search tools that enforce current member and bot permissions on every read.MIT
- AlicenseAqualityBmaintenanceEnables MCP clients to interact with the Discord REST API through tools for messages, reactions, threads, channels, webhooks, guilds, members, roles, moderation, events, invites, and file transfer. It supports guild allowlists, read-only mode, toolset selection, and approval before destructive actions.40123 npmMIT