Add it to Claude Code
claude mcp add -e "DISCORD_TOKEN=${DISCORD_TOKEN}" discord-mcp -- npx -y @pasympa/discord-mcpDISCORD_TOKENMake your agent remember this setup
discord-mcp's config, env vars, and the gotchas you hit — recalled in every future Claude Code, Cursor, and Codex session.
npx conare@latestFree · one command · indexes the sessions already on disk. Set up in the browser instead →
What it does
- 60+ tools for managing messages, channels, roles, and permissions
- Multi-guild support allowing management across multiple servers
- Lightweight architecture built with TypeScript and Node.js
- Modular design for easy extension with new tools
- Compatible with Claude Desktop, Claude Code, Cursor, and VS Code
Tools 2
discord_list_guildsList all servers the bot is connected todiscord_get_guild_infoGet detailed guild info (name, members, channels, roles, boosts)Environment Variables
DISCORD_TOKENrequiredThe bot token from the Discord Developer PortalTry it
Original README from PaSympa/discord-mcp
Discord MCP Server
A lightweight, multi-guild Discord MCP server with 60+ tools
Manage your entire Discord server from Claude Desktop, Claude Code, Cursor, VS Code Copilot, or any MCP-compatible client. Messages, channels, roles, permissions, moderation, forums, webhooks — all through natural language.
Why this one?
- 60+ tools — messages, channels, roles, permissions, moderation, forums, webhooks, embeds, and more
- Multi-guild — works across multiple servers, no
GUILD_IDlock-in - Lightweight — TypeScript + Node.js, ~25kB package, ~73MB Docker image (vs 400MB+ for Java alternatives)
- Modular — clean architecture, easy to extend with new tools
- Two install methods — npm or Docker, your choice
Quick Start
Add this to your MCP client config and replace YOUR_TOKEN_HERE with your bot token:
{
"mcpServers": {
"discord": {
"command": "npx",
"args": ["-y", "@pasympa/discord-mcp"],
"env": {
"DISCORD_TOKEN": "YOUR_TOKEN_HERE"
}
}
}
}
No install needed — npx handles everything.
Don't have a bot yet? See Creating Your Discord Bot.
Configuration
<details> <summary><strong>Claude Desktop</strong></summary>Add the config above to your claude_desktop_config.json:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Restart Claude Desktop after saving.
</details> <details> <summary><strong>Claude Code</strong></summary>claude mcp add discord -e DISCORD_TOKEN=YOUR_TOKEN_HERE -- npx -y @pasympa/discord-mcp
</details>
<details>
<summary><strong>Cursor</strong></summary>
Add the config above to ~/.cursor/mcp.json. See Cursor MCP docs for details.
Add to your .vscode/mcp.json:
{
"inputs": [
{
"type": "promptString",
"id": "discord-token",
"description": "Discord Bot Token",
"password": true
}
],
"servers": {
"discord": {
"command": "npx",
"args": ["-y", "@pasympa/discord-mcp"],
"env": {
"DISCORD_TOKEN": "${input:discord-token}"
}
}
}
}
See VS Code MCP docs for details.
</details> <details> <summary><strong>Docker</strong></summary>{
"mcpServers": {
"discord": {
"command": "docker",
"args": [
"run", "--rm", "-i",
"-e", "DISCORD_TOKEN=YOUR_TOKEN_HERE",
"pasympa/discord-mcp:latest"
]
}
}
}
</details>
<details>
<summary><strong>From source</strong></summary>
git clone https://github.com/PaSympa/discord-mcp
cd discord-mcp
npm install && npm run build
{
"mcpServers": {
"discord": {
"command": "node",
"args": ["/absolute/path/to/discord-mcp/dist/index.js"],
"env": {
"DISCORD_TOKEN": "YOUR_TOKEN_HERE"
}
}
}
}
</details>
<details>
<summary><strong>.env file (alternative)</strong></summary>
Instead of passing the token in the MCP config, create a .env file at the project root:
DISCORD_TOKEN=YOUR_TOKEN_HERE
The server loads .env automatically via dotenv.
Creating Your Discord Bot
- Go to discord.com/developers/applications
- New Application > give it a name
- Bot tab > Reset Token > copy the token
- Enable Privileged Gateway Intents:
- Server Members Intent
- Message Content Intent
- OAuth2 > URL Generator:
- Scopes:
bot - Permissions:
Send Messages,Read Message History,Manage Channels,Manage Roles,Kick Members,Ban Members,Moderate Members,View Audit Log,Manage Messages,Manage Threads,Add Reactions,Manage Guild,Manage Webhooks
- Scopes:
- Copy the generated URL and invite the bot to your server
Available Tools (60)
Discovery & Navigation
| Tool | Description |
|---|---|
discord_list_guilds |
List all servers the bot is connected to |
discord_get_guild_info |
Get detailed guild info (name, members, channels, roles, boosts) |