Discord MCP Server
by shawtymarco
README.md
# Discord MCP Server (Dockerized)
A Model Context Protocol (MCP) server that provides Discord integration capabilities, now enhanced with Role management tools and optimized for Docker.
This project is a fork of [hanweg/mcp-discord](https://github.com/hanweg/mcp-discord) with added features and simplified containerization.
## ✨ Recent Updates
- **v1.4.0** (2026-03-25): Added `read_thread_messages` tool to read messages inside threads. `read_messages` now includes message ID (for link generation) and thread metadata when a thread is attached to a message.
- **v1.4.1** (2026-05-20): Added optional image attachment content for `read_messages` and `read_thread_messages` via `include_image_data`.
- **v1.3.0** (2026-03-05): Enhanced `read_messages` with reaction information including custom emoji details (ID, name, animated status).
- **v1.2.0** (2026-02-05): Added support for reading forwarded messages (Message Snapshots) and detailed embed information (titles, fields, descriptions) in `read_messages`.
- **v1.1.0** (2026-02-04): Updated MCP SDK to v1.0.0+ to resolve `Resource` import errors and improve compatibility with latest MCP clients
## Available Tools
### 🛡️ Role & Member Management
- `list_roles`: List all roles in a server with their IDs and positions.
- `inspect_role`: Get detailed metadata for a specific role (permissions, color, etc.).
- `list_members`: List server members and their assigned roles.
### 📺 Channel & Permission Management (New)
- `inspect_channel`: View channel details and permission overwrites.
- `get_audit_log`: JSON viewing of recent server audit logs (actions like bans, role changes).
### 📊 Server Information
- `list_servers`: List all servers the bot has access to.
- `get_server_info`: Get detailed server metrics.
- `get_channels`: List channels in a server.
- `get_user_info`: Get detailed information about a Discord user.
### 💬 Messaging & Moderation
- `send_message`: Send a message to a channel.
- `read_messages`: Read recent history, reactions (including custom emoji details), embeds, message ID, and thread metadata.
- `read_thread_messages`: Read messages inside a thread by thread ID.
- `read_messages` / `read_thread_messages` can include image attachments as MCP image content with `include_image_data: true` and optional `image_limit`.
- `add_reaction` / `remove_reaction`: Manage message reactions.
- `moderate_message`: Delete messages and timeout users.
## 🚀 Getting Started (Docker)
This version is designed to run entirely within Docker, eliminating the need for local Python installations.
### 1. Build the Image
Clone this repository and run:
```bash
docker build -t discord-mcp .
```
### 2. Configure MCP Client
Add the following configuration to your MCP client (e.g., Claude Desktop or Antigravity).
- **Path for Windows (Claude):** `%APPDATA%\Claude\claude_desktop_config.json`
- **Path for Antigravity:** `~/.gemini/antigravity/mcp_config.json`
- **Path for Kiro:** - `c:\Users\Admin\.kiro\settings\mcp.json` (Kiro)
### Configuration (`config.yaml`)
This server uses a `config.yaml` file for custom settings like **Timezone**.
1. Create a `config.yaml` file in your project directory (or use the provided default).
2. Add your settings:
```yaml
# Example: Set timezone to South Korea
timezone: "Asia/Seoul"
```
3. **Mount this file** when running via Docker (already configured in `mcp_config.json`):
```bash
docker run -v /path/to/config.yaml:/app/config.yaml ...
```
### Docker Setup
```json
{
"mcpServers": {
"discord": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"DISCORD_TOKEN",
"discord-mcp"
],
"env": {
"DISCORD_TOKEN": "your_bot_token_here"
}
}
}
}
```
### 3. Setting Up Your Discord Bot
1. Go to the [Discord Developer Portal](https://discord.com/developers/applications).
2. Create an Application and a Bot.
3. Enable the following **Privileged Gateway Intents**:
- `PRESENCE INTENT`
- `SERVER MEMBERS INTENT`
- `MESSAGE CONTENT INTENT`
4. Copy your **Bot Token** and paste it into the `env` section above.
5. Invite the bot to your server using the OAuth2 URL Generator (permissions: `Administrator` recommended for full tool access).
## 🔮 Future Plans
We plan to add even more Discord functionality to this MCP server, expanding its capabilities for better server management and interaction. Stay tuned for updates!
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
Based on the original work by [Hanweg Altimer](https://github.com/hanweg/mcp-discord).
This server cannot be deployed
Maintenance
ActivityInactive
ResponsivenessNo issues