discord-mcp
A local MCP server for Discord that enables reading and sending messages through a bot account, with tools for server/channel listing, messaging, reactions, and member search.
README
discord-mcp
A local MCP (Model Context Protocol) server for Discord, written in TypeScript. It lets MCP clients like Cursor and Claude Code read and send Discord messages through a bot account.
Tools
| Tool | Description |
|---|---|
list_servers |
List servers the bot is a member of |
list_channels |
List channels in a server (with IDs and types) |
read_messages |
Read recent messages from a channel, with paging via before |
send_message |
Send a message to a channel, optionally as a reply |
send_dm |
Send a direct message to a user by ID |
add_reaction |
React to a message with an emoji |
search_members |
Search server members by name prefix |
get_server_info |
Get server name, description, member count, owner |
Setup
1. Create a Discord bot
-
Go to the Discord Developer Portal and click New Application.
-
Under Bot, click Reset Token and copy the token — this is your
DISCORD_TOKEN. -
Still under Bot, enable the Privileged Gateway Intents you want:
- Message Content Intent — required to read message text.
- Server Members Intent — required for
search_members.
(The server still works without these, but message content will be empty and member search unavailable.)
-
Invite the bot to your server: under OAuth2 → URL Generator, select the
botscope, then permissions View Channels, Send Messages, Read Message History, Add Reactions. Open the generated URL and pick your server.
2. Build
npm install
npm run build
3. Register with your MCP client
Cursor — add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (per-project):
{
"mcpServers": {
"discord": {
"command": "node",
"args": ["/absolute/path/to/discord-mcp/dist/index.js"],
"env": {
"DISCORD_TOKEN": "your-bot-token"
}
}
}
}
Claude Code:
claude mcp add discord -e DISCORD_TOKEN=your-bot-token -- node /absolute/path/to/discord-mcp/dist/index.js
Notes
- The bot connects to Discord lazily on the first tool call, so the server starts even before a token is configured.
- Messages are capped at Discord's 2000-character limit.
DISCORD_BOT_TOKENis accepted as an alternative toDISCORD_TOKEN.
Why a bot token instead of email/password?
Automating a regular user account (a "self-bot") violates Discord's Terms of Service and commonly results in permanent account bans. Bot tokens are the supported way to build integrations and take about two minutes to set up.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.