Skip to main content
MCP server CX Codex

discord-mcp — Discord MCP server for Claude Code: setup

Gives an AI agent tools for managing Discord messages, channels, roles, moderation, and more. Connect it with a bot token.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add discord-mcp -e DISCORD_TOKEN=<DISCORD_TOKEN> -- npx -y @pasympa/discord-mcp
Open on GitHub

What discord-mcp does

The server exposes more than 95 tools for Discord, covering messages, channels, roles, permissions, moderation, forums, webhooks, invites, and direct messages. It can operate across multiple Discord servers rather than being tied to a single guild ID.

To run it with npx, provide a bot token through DISCORD_TOKEN. Docker and a build from source are other options. If the bot lacks a required privileged intent setting in the Discord Developer Portal, the connection can fail; portal settings also govern access to data.

Messages are fetched through the REST API, not received by subscribing to message events. Use DISCORD_MCP_TOOLSETS to narrow the exposed tools, or DISCORD_ALLOWED_GUILDS to restrict which servers the MCP server can act on.

What it helps with

  • find and manage messages in a Discord server
  • create a channel and configure its roles
  • inspect permissions and adjust moderation settings
  • manage forums, invites, or webhooks
  • limit the tools or guilds available to the MCP server

Example prompts for the agent

  • Find recent messages in this channel and summarize the discussion.
  • Create an announcements channel and set its permissions.
  • Review the Discord server's roles and moderation permissions.

How to install discord-mcp

Platform CLI

claude mcp add discord-mcp -e DISCORD_TOKEN=<DISCORD_TOKEN> -- npx -y @pasympa/discord-mcp

Replace <…> with your own values

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about discord-mcp

How do I install discord-mcp in Claude Code?

Run claude mcp add discord-mcp -e DISCORD_TOKEN=<DISCORD_TOKEN> -- npx -y @pasympa/discord-mcp, replacing <DISCORD_TOKEN> with your bot token.

What does discord-mcp do?

It connects an AI agent to Discord management tools for messages, channels, roles, moderation, and other features. It can work across multiple guilds.

What are DISCORD_MCP_TOOLSETS and DISCORD_ALLOWED_GUILDS for?

DISCORD_MCP_TOOLSETS selects which tools the agent can use. DISCORD_ALLOWED_GUILDS limits actions to specified Discord servers.

Similar MCP servers

MCP servers catalog →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor