Skip to main content
Glama
669px

Dc-MCP

by 669px

Dc-MCP

Discord Administration MCP Server for Cursor.

Dc-MCPは、Model Context Protocol (stdio)を介してCursorをDiscordボットに接続します。Cursorは、ギルドの完全な構造を検査し、明示的なツールを通じて正確な管理操作を実行できます。自由形式のDiscord APIエグゼキューターではありません。

Cursor  ──MCP (stdio)──▶  Dc-MCP  ──discord.py──▶  Discord API

機能

  • Cursor向けの完全なギルドマップ(discord_analyze_server / discord_server_structure

  • チャンネル、ロール、メンバー、メッセージ、モデレーション、招待、ウェブフック、監査ログ用の詳細なツール

  • 中央集権的な権限+階層チェック(オーナーを対象にしない、ボットより上のロールを対象にしない)

  • 破壊的操作の保護(confirm=true + オプションのハード無効化)

  • 構造化されたJSON結果。シークレットは返却・記録されません

  • CursorのMCPクライアントと互換性のあるStdioトランスポート

Related MCP server: Discord MCP Server

要件

  • Python 3.11+

  • Discordアプリケーション+ボット

  • 特権インテント: Server Members IntentMessage Content Intent

クイックスタート

git clone https://github.com/669px/Dc-MCP.git
cd Dc-MCP
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
pip install -e .
cp .env.example .env

.envを編集:

DISCORD_BOT_TOKEN=your_bot_token
DISCORD_GUILD_ID=your_guild_id
ALLOW_DANGEROUS_ACTIONS=true
REQUIRE_CONFIRMATION=true
LOG_LEVEL=INFO

実行:

python -m src.main

ログはstderrに出力されます。stdoutはMCP JSON-RPC用に予約されています。

Discordボットのセットアップ

  1. Discord Developer Portalでアプリケーションを作成

  2. ボットを追加し、トークンをDISCORD_BOT_TOKENにコピー

  3. Server Members IntentMessage Content Intentを有効化

  4. チャンネル/ロール/メッセージの管理、キック/バン、メンバーのモデレーション、監査ログの表示、ウェブフック/ギルドの管理、メッセージの送信、埋め込みリンク、リアクションの追加、メッセージ履歴の読み取り、インスタント招待の作成などの権限でボットを招待

  5. 管理対象のロール/メンバーを管理できるよう、ボットのロールを十分高い位置に配置

  6. DISCORD_GUILD_IDを設定して、すべての操作を1つのギルドに制限

Cursor MCP設定

プロジェクトまたはユーザーのmcp.json:

{
  "mcpServers": {
    "discord-admin": {
      "command": "/ABSOLUTE/PATH/TO/Dc-MCP/.venv/bin/python",
      "args": ["-m", "src.main"],
      "cwd": "/ABSOLUTE/PATH/TO/Dc-MCP"
    }
  }
}

シークレットはcwd.envから読み込まれます。保存後、Settings → Tools & MCPdiscord-adminを有効化/更新してください。

CLI:

agent mcp enable discord-admin
agent mcp list

コアツール

Tool

Purpose

discord_analyze_server

Cursor向けの完全なギルドマップ+サマリー

discord_server_structure

より軽量なカテゴリ/チャンネル/ロールツリー

discord_server_info

ギルドのメタデータ

discord_list_channels / discord_list_roles / discord_list_members

インベントリ

discord_get_audit_log

フィルタリングされた監査エントリ

その他にも含まれるもの: チャンネルのCRUD+権限、ロールのCRUD+割り当て/削除、メンバーのモデレーション(キック/バン/タイムアウト/ニックネーム)、メッセージング(送信/編集/削除/ピン留め/リアクション)、招待、ウェブフック、discord_purge_messages

破壊的ツールは、REQUIRE_CONFIRMATION=trueの場合にconfirm=trueが必要です。

セキュリティ

  • .envをコミットしない

  • REQUIRE_CONFIRMATION=trueを推奨

  • DISCORD_GUILD_IDでスコープを制限

  • メンションはデフォルトで制限(許可されない限り@everyone/大量ロールはオフ)

  • シェル、eval、HTTPプロキシ、汎用APIエグゼキューターのツールはなし

  • ウェブフックトークンは決して返却されない

プロジェクト構成

src/
  main.py              MCP entrypoint (stdio)
  config.py            Environment settings
  discord_client.py    discord.py client
  permissions.py       Guild / hierarchy / confirmation gates
  errors.py            Structured error mapping
  responses.py         Success / failure payloads
  server_map.py        Full guild analysis for Cursor
  tools/               Granular MCP tools
tests/                 Unit tests (mocked Discord)

開発

source .venv/bin/activate
python -m compileall src
python -m pytest
python -c "import discord; print(discord.__version__)"

Discordの制限事項

  • 一括削除は14日未満のメッセージでのみ機能

  • 一括/パージの上限はデフォルトで100

  • ギルドオーナーやボットの最上位ロール以上の対象はモデレーション不可

  • 管理/統合ロールは編集不可

  • メンバーリスト/検索にはServer Members Intentが必要

ライセンス

MIT

Install Server
A
license - permissive license
C
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

Related MCP Servers

  • A
    license
    C
    quality
    D
    maintenance
    Provides comprehensive administrative control over Discord communities through 128 operations covering moderation, messaging, and channel management. It enables AI assistants to manage server roles, events, and automations via the Model Context Protocol.
    3
    35
    MIT
  • 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
    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
    377
    6
    Elastic 2.0
  • F
    license
    Not graded
    quality
    B
    maintenance
    Gives AI agents full control over Discord server creation and configuration. Exposes 36 tools covering guild lifecycle, channels, roles, members, content, messages, templates, and a declarative blueprint engine.

View all related MCP servers

Related MCP Connectors

  • A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…

  • MCP server for Gainium — manage trading bots, deals, and balances via AI assistants

  • Shared, permission-aware company context for AI agents, with provenance, approvals and audit.

View all MCP Connectors

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/669px/Dc-MCP'

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