Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
150 changes: 150 additions & 0 deletions servers/discord-agent/readme.md
Original file line number Diff line number Diff line change
@@ -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.
41 changes: 41 additions & 0 deletions servers/discord-agent/server.yaml
Original file line number Diff line number Diff line change
@@ -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
186 changes: 186 additions & 0 deletions servers/discord-agent/tools.json
Original file line number Diff line number Diff line change
@@ -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"
}
]