home / mcp / discord mcp server
A MCP server for the Discord integration. Enable your AI assistants to seamlessly interact with Discord. Enhance your Discord experience with powerful automation capabilities.
Configuration
View docs{
"mcpServers": {
"saseq-discord-mcp": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-e",
"DISCORD_TOKEN=<YOUR_DISCORD_BOT_TOKEN>",
"-e",
"DISCORD_GUILD_ID=<OPTIONAL_DEFAULT_SERVER_ID>",
"saseq/discord-mcp:latest"
],
"env": {
"DISCORD_TOKEN": "<YOUR_DISCORD_BOT_TOKEN>",
"DISCORD_GUILD_ID": "<OPTIONAL_DEFAULT_SERVER_ID>"
}
}
}
}This MCP server enables a Model Context Protocol integration with the Discord API, letting your AI assistants manage channels, send messages, and retrieve server data through MCP-compatible clients. It streamlines interactions between AI tools and Discord, enabling automated workflows and enhanced bot capabilities.
You can connect a Discord MCP server to your MCP client or AI assistant by configuring the MCP endpoint to run the server via Docker. Use the provided token and optional guild ID to initialize and target a specific Discord server.
Prerequisites: You need Docker installed on your machine to run the MCP server in a container.
{
"mcpServers": {
"mcp-server": {
"command": "docker",
"args": [
"run", "--rm", "-i",
"-e", "DISCORD_TOKEN=<YOUR_DISCORD_BOT_TOKEN>",
"-e", "DISCORD_GUILD_ID=<OPTIONAL_DEFAULT_SERVER_ID>",
"saseq/discord-mcp:latest"
]
}
}
}If you prefer a manual setup without Docker, you can build and run the server from source. First clone the repository, build the project, and then run the generated JAR with your Discord bot token.
# Clone the repository
git clone https://github.com/SaseQ/discord-mcp
# Build the project (requires Maven)
cddiscord-mcp
mvn clean package
# Run the server with your Discord bot token
java -jar /absolute/path/to/discord-mcp-0.0.1-SNAPSHOT.jarThe Discord MCP server accepts configuration via environment variables when using Docker. Set DISCORD_TOKEN to your bot token and optionally set DISCORD_GUILD_ID to establish a default server for tools that require a guildId.
{
"mcpServers": {
"discord-mcp": {
"command": "java",
"args": [
"-jar",
"/absolute/path/to/discord-mcp-0.0.1-SNAPSHOT.jar"
],
"env": {
"DISCORD_TOKEN": "YOUR_DISCORD_BOT_TOKEN",
"DISCORD_GUILD_ID": "OPTIONAL_DEFAULT_SERVER_ID"
}
}
}
}Keep your Discord bot token secure and do not share it publicly. If you provide a default guild ID, tools that require a guildId can omit it, but you can always override it per tool usage.
You can use the MCP server to fetch server information, manage channels, and send messages from your AI workflows. For instance, you can create text channels, send messages to a channel, or manage roles and webhooks through the available tool endpoints.
Get detailed information about the connected Discord server, including its channels, members, and settings.
Return a user ID by username within a guild to enable user mentions like <@id>.
Send a direct message to a specific Discord user.
Edit a private message sent to a user.
Delete a private message from a user.
Read recent private messages from a specific user.
Post a message to a specified text channel.
Edit a message in a specific channel.
Delete a message from a channel.
Read recent messages from a channel.
Add a reaction to a specific message.
Remove a reaction from a message.
Create a new text channel in the server.
Remove a channel from the server.
Find a channel by name and server ID.
List all channels in the server.
Create a new category to organize channels.
Delete a channel category.
Find a category ID by name and server ID.
List channels within a specific category.
Create a webhook on a channel.
Delete a webhook.
List webhooks on a channel.
Send a message via a webhook.
Retrieve a list of all roles on the server.
Create a new role on the server.
Modify an existing role's settings.
Permanently delete a role from the server.
Assign a role to a user.
Remove a role from a user.