From 7d5d0c1641fb2f3f32841a04110ba27ace6339b4 Mon Sep 17 00:00:00 2001 From: aj-geddes Date: Wed, 22 Oct 2025 10:26:54 -0500 Subject: [PATCH 1/3] Add Discord Agent MCP server Production-ready MCP server for AI-assisted Discord management and automation with 46+ tools: **Messaging Tools (10)** - send_message, send_rich_message, send_message_with_file - read_messages, edit_message, delete_message, bulk_delete_messages - add_reaction, pin_message, unpin_message **Channel Management (10)** - list_channels, get_channel_details - create_text_channel, create_voice_channel, create_forum_channel - create_category, create_stage_channel - modify_channel, delete_channel, set_channel_permissions **Thread Management (3)** - find_threads, create_thread, archive_thread **Server Management (6)** - get_server_info, modify_server, get_audit_logs - list_webhooks, create_webhook, get_invites, create_invite **Member Management (3)** - get_member_info, list_members, set_nickname **Role Management (6)** - assign_role, remove_role - create_role, delete_role, modify_role - list_roles, get_role_info **Moderation (5)** - kick_member, ban_member, unban_member - timeout_member, remove_timeout, get_bans **Technical Details** - Category: communication - License: MIT - Built with: Discord.js v14, TypeScript, Docker - Transport: HTTP (default) and STDIO modes - Homepage: https://github.com/aj-geddes/discord-agent-mcp **Prerequisites** Requires DISCORD_TOKEN environment variable (marked as secret in server.yaml). Users need to create a Discord bot at the Developer Portal with: - Server Members Intent enabled - Message Content Intent enabled - Appropriate bot permissions **Validation Note** The server requires a valid Discord bot token to initialize and connect to Discord. tools.json is provided for catalog validation without requiring a live Discord connection. --- servers/discord-agent/readme.md | 150 ++++++++++++++++++++++++ servers/discord-agent/server.yaml | 41 +++++++ servers/discord-agent/tools.json | 186 ++++++++++++++++++++++++++++++ 3 files changed, 377 insertions(+) create mode 100644 servers/discord-agent/readme.md create mode 100644 servers/discord-agent/server.yaml create mode 100644 servers/discord-agent/tools.json diff --git a/servers/discord-agent/readme.md b/servers/discord-agent/readme.md new file mode 100644 index 000000000..ab7a69240 --- /dev/null +++ b/servers/discord-agent/readme.md @@ -0,0 +1,150 @@ +# Discord Agent MCP Server + +Comprehensive Discord automation and management through the Model Context Protocol. This server provides 46+ tools for AI assistants to interact with Discord servers, including messaging, channel management, roles, moderation, and more. + +## Features + +- **10 Messaging Tools**: Send, edit, delete messages, add reactions, manage pins +- **10 Channel Tools**: Create, modify, delete channels (text, voice, forum, stage) +- **3 Thread Tools**: Create, find, and archive forum threads +- **6 Server Management Tools**: Server info, webhooks, invites, audit logs +- **3 Member Tools**: Member info, list members, set nicknames +- **6 Role Tools**: Assign, create, modify, delete roles +- **5 Moderation Tools**: Kick, ban, timeout members +- **Resources**: Guild listings and information +- **Prompts**: Interactive moderation and announcement assistants + +## Prerequisites + +Before using this server, you need: + +1. **Discord Bot Token** + - Create a bot at [Discord Developer Portal](https://discord.com/developers/applications) + - Enable these Privileged Gateway Intents: + - Server Members Intent ✅ + - Message Content Intent ✅ + - Invite the bot to your server with appropriate permissions + +2. **Required Configuration** + - `DISCORD_TOKEN`: Your Discord bot token (required, secret) + +3. **Optional Configuration** + - `TRANSPORT_MODE`: `http` or `stdio` (default: `http`) + - `HTTP_PORT`: Port for HTTP mode (default: `3000`) + - `LOG_LEVEL`: Logging level (default: `info`) + - `LOG_FORMAT`: `json` or `pretty` (default: `json`) + +## Quick Start + +### 1. Create Discord Bot + +1. Go to [Discord Developer Portal](https://discord.com/developers/applications) +2. Create a new application and add a bot +3. Copy the bot token +4. Enable "Server Members Intent" and "Message Content Intent" +5. Generate invite URL with bot permissions: + - Manage Channels, Manage Roles, Manage Messages + - Send Messages, Read Message History + - Manage Threads, Moderate Members + +### 2. Configure the Server + +When prompted for configuration: +- **DISCORD_TOKEN**: Paste your bot token +- Leave other settings as default or customize as needed + +### 3. Use with AI Assistant + +Once running, the server exposes 46+ tools that AI assistants can use: + +**Example Interactions:** +- "Send a welcome message to the #general channel" +- "List all channels in the server" +- "Create a new forum channel called 'Q&A'" +- "Give the @member role to user123" +- "Show me the last 10 messages in #announcements" + +## Available Tools + +### Messaging +- `send_message` - Send text messages +- `send_rich_message` - Send formatted embeds +- `send_message_with_file` - Send with attachments +- `read_messages` - Get message history +- `edit_message`, `delete_message`, `bulk_delete_messages` +- `add_reaction`, `pin_message`, `unpin_message` + +### Channel Management +- `list_channels`, `get_channel_details` +- `create_text_channel`, `create_voice_channel`, `create_forum_channel` +- `create_category`, `create_stage_channel` +- `modify_channel`, `delete_channel`, `set_channel_permissions` + +### Threads +- `find_threads` - Search forum threads +- `create_thread` - Create new threads +- `archive_thread` - Archive threads + +### Server +- `get_server_info` - Server details +- `modify_server` - Update server settings +- `get_audit_logs` - View audit logs +- `list_webhooks`, `create_webhook` +- `get_invites`, `create_invite` + +### Members +- `get_member_info` - Member details +- `list_members` - List all members +- `set_nickname` - Change nicknames + +### Roles +- `assign_role`, `remove_role` +- `create_role`, `delete_role`, `modify_role` +- `list_roles`, `get_role_info` + +### Moderation +- `kick_member` - Remove member (can rejoin) +- `ban_member`, `unban_member` - Ban management +- `timeout_member`, `remove_timeout` - Temporary mutes +- `get_bans` - List banned users + +## Use Cases + +- **Community Management**: Automate welcome messages, role assignments, channel creation +- **Moderation**: AI-assisted moderation with timeout, kick, and ban capabilities +- **Content Distribution**: Post announcements, updates, and embeds across channels +- **Server Organization**: Create and manage channels, categories, and forum threads +- **Member Support**: Answer questions, provide information, manage roles +- **Event Management**: Create stage channels, manage voice channels, send invites + +## Security Notes + +- **Bot Token Security**: Your Discord token is stored securely as a secret +- **Permissions**: Bot can only perform actions it has permissions for +- **Rate Limits**: Respects Discord's rate limits automatically +- **Audit Trail**: All actions are logged in Discord's audit log + +## Architecture + +Built with: +- **TypeScript** - Type-safe implementation +- **Discord.js v14** - Official Discord API library +- **MCP Protocol** - Standard AI assistant integration +- **Docker** - Containerized deployment +- **Structured Logging** - JSON-formatted logs for monitoring + +## Support & Documentation + +- **Full Documentation**: [GitHub README](https://github.com/aj-geddes/discord-agent-mcp#readme) +- **Source Code**: [GitHub Repository](https://github.com/aj-geddes/discord-agent-mcp) +- **Issues**: [GitHub Issues](https://github.com/aj-geddes/discord-agent-mcp/issues) +- **Discord.js Docs**: [Discord.js Guide](https://discordjs.guide/) +- **MCP Protocol**: [Model Context Protocol](https://modelcontextprotocol.io/) + +## License + +MIT License - See [LICENSE](https://github.com/aj-geddes/discord-agent-mcp/blob/main/LICENSE) + +--- + +**Note**: This is a third-party MCP server and is not officially affiliated with Discord, Inc. diff --git a/servers/discord-agent/server.yaml b/servers/discord-agent/server.yaml new file mode 100644 index 000000000..e50ffcea9 --- /dev/null +++ b/servers/discord-agent/server.yaml @@ -0,0 +1,41 @@ +name: discord-agent +type: local +meta: + category: communication + tags: + - discord + - chat + - automation + - community-management + - bot +about: + title: Discord Agent MCP + description: Production-ready MCP server for AI-assisted Discord management and automation. Provides 46+ tools for comprehensive Discord API integration including messaging, channels, threads, roles, members, and moderation. + icon: https://assets-global.website-files.com/6257adef93867e50d84d30e2/636e0a6a49cf127bf92de1e2_icon_clyde_blurple_RGB.png + documentation_url: https://github.com/aj-geddes/discord-agent-mcp#readme + source_url: https://github.com/aj-geddes/discord-agent-mcp +build: + dockerfile: Dockerfile + context: . +config: + environment: + - name: DISCORD_TOKEN + description: Your Discord bot token from Discord Developer Portal + required: true + secret: true + - name: TRANSPORT_MODE + description: Transport mode (http or stdio) + required: false + default: http + - name: HTTP_PORT + description: HTTP server port + required: false + default: "3000" + - name: LOG_LEVEL + description: Logging level (debug, info, warn, error) + required: false + default: info + - name: LOG_FORMAT + description: Log format (json or pretty) + required: false + default: json diff --git a/servers/discord-agent/tools.json b/servers/discord-agent/tools.json new file mode 100644 index 000000000..c5608fb69 --- /dev/null +++ b/servers/discord-agent/tools.json @@ -0,0 +1,186 @@ +[ + { + "name": "send_message", + "description": "Send a message to a Discord channel" + }, + { + "name": "send_rich_message", + "description": "Send a richly formatted message with embeds, images, and advanced formatting" + }, + { + "name": "send_message_with_file", + "description": "Send a message with file attachment to a Discord channel" + }, + { + "name": "read_messages", + "description": "Retrieve recent message history from a channel" + }, + { + "name": "edit_message", + "description": "Edit an existing message sent by the bot" + }, + { + "name": "delete_message", + "description": "Delete a specific message from a channel" + }, + { + "name": "bulk_delete_messages", + "description": "Delete multiple messages at once (max 100, must be <14 days old)" + }, + { + "name": "add_reaction", + "description": "Add an emoji reaction to a message" + }, + { + "name": "pin_message", + "description": "Pin a message to the channel" + }, + { + "name": "unpin_message", + "description": "Unpin a message from the channel" + }, + { + "name": "list_channels", + "description": "Get all channels in the server organized by type" + }, + { + "name": "get_channel_details", + "description": "Get detailed information about a channel including type, permissions, and capabilities" + }, + { + "name": "create_text_channel", + "description": "Create a new text channel in a Discord server" + }, + { + "name": "create_voice_channel", + "description": "Create a new voice channel in the server" + }, + { + "name": "create_category", + "description": "Create a new category to organize channels" + }, + { + "name": "create_forum_channel", + "description": "Create a new forum channel for threaded discussions" + }, + { + "name": "create_stage_channel", + "description": "Create a stage voice channel for presentations and events" + }, + { + "name": "modify_channel", + "description": "Update channel name, topic, slowmode, or other settings" + }, + { + "name": "delete_channel", + "description": "Permanently delete a Discord channel" + }, + { + "name": "set_channel_permissions", + "description": "Override permissions for a role or member on a specific channel" + }, + { + "name": "find_threads", + "description": "Search for threads in a forum channel by name or list all threads" + }, + { + "name": "create_thread", + "description": "Create a new thread in a channel or from a message" + }, + { + "name": "archive_thread", + "description": "Archive (lock) a thread" + }, + { + "name": "get_server_info", + "description": "Retrieve detailed information about a Discord server" + }, + { + "name": "modify_server", + "description": "Update server name, description, or other settings" + }, + { + "name": "get_audit_logs", + "description": "Retrieve recent audit log entries for the server" + }, + { + "name": "list_webhooks", + "description": "Get all webhooks in the server or a specific channel" + }, + { + "name": "create_webhook", + "description": "Create a new webhook for a channel" + }, + { + "name": "get_invites", + "description": "List all active invite links for the server" + }, + { + "name": "create_invite", + "description": "Create a new invite link for a channel" + }, + { + "name": "get_member_info", + "description": "Get detailed information about a server member" + }, + { + "name": "list_members", + "description": "List all members in the server with optional filters" + }, + { + "name": "set_nickname", + "description": "Change a member's server nickname" + }, + { + "name": "assign_role", + "description": "Add a role to a server member" + }, + { + "name": "remove_role", + "description": "Remove a role from a server member" + }, + { + "name": "create_role", + "description": "Create a new role in the server with specified permissions" + }, + { + "name": "delete_role", + "description": "Delete a role from the server" + }, + { + "name": "modify_role", + "description": "Update a role's name, color, permissions, or other settings" + }, + { + "name": "list_roles", + "description": "Get all roles in the server with their permissions" + }, + { + "name": "get_role_info", + "description": "Get detailed information about a specific role" + }, + { + "name": "kick_member", + "description": "Remove a member from the server (they can rejoin)" + }, + { + "name": "ban_member", + "description": "Ban a member from the server (prevents rejoining)" + }, + { + "name": "unban_member", + "description": "Remove a ban, allowing the user to rejoin" + }, + { + "name": "timeout_member", + "description": "Temporarily mute a member (prevents sending messages, reactions, joining voice)" + }, + { + "name": "remove_timeout", + "description": "Remove timeout from a member, restoring their permissions" + }, + { + "name": "get_bans", + "description": "List all banned users in the server" + } +] From 2bd78d069d9d83b46ff57c7743981fc16faf3d91 Mon Sep 17 00:00:00 2001 From: Sundeep Gottipati Date: Thu, 6 Nov 2025 08:17:21 -0800 Subject: [PATCH 2/3] Update servers/discord-agent/server.yaml --- servers/discord-agent/server.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servers/discord-agent/server.yaml b/servers/discord-agent/server.yaml index e50ffcea9..1a7a2dbfe 100644 --- a/servers/discord-agent/server.yaml +++ b/servers/discord-agent/server.yaml @@ -11,7 +11,7 @@ meta: about: title: Discord Agent MCP description: Production-ready MCP server for AI-assisted Discord management and automation. Provides 46+ tools for comprehensive Discord API integration including messaging, channels, threads, roles, members, and moderation. - icon: https://assets-global.website-files.com/6257adef93867e50d84d30e2/636e0a6a49cf127bf92de1e2_icon_clyde_blurple_RGB.png + icon: https://www.google.com/s2/favicons?domain=discord.com&sz=64 documentation_url: https://github.com/aj-geddes/discord-agent-mcp#readme source_url: https://github.com/aj-geddes/discord-agent-mcp build: From 2834ec1f220e4386440b49e8c3b7a2c0c53ed4b2 Mon Sep 17 00:00:00 2001 From: Sundeep Gottipati Date: Thu, 6 Nov 2025 08:28:17 -0800 Subject: [PATCH 3/3] Apply suggestion from @kgprs --- servers/discord-agent/server.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servers/discord-agent/server.yaml b/servers/discord-agent/server.yaml index 1a7a2dbfe..3a23c0c62 100644 --- a/servers/discord-agent/server.yaml +++ b/servers/discord-agent/server.yaml @@ -9,7 +9,7 @@ meta: - community-management - bot about: - title: Discord Agent MCP + title: Discord description: Production-ready MCP server for AI-assisted Discord management and automation. Provides 46+ tools for comprehensive Discord API integration including messaging, channels, threads, roles, members, and moderation. icon: https://www.google.com/s2/favicons?domain=discord.com&sz=64 documentation_url: https://github.com/aj-geddes/discord-agent-mcp#readme