discord-mcp

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.

Category
Visit Server

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

  1. Go to the Discord Developer Portal and click New Application.

  2. Under Bot, click Reset Token and copy the token — this is your DISCORD_TOKEN.

  3. 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.)

  4. Invite the bot to your server: under OAuth2 → URL Generator, select the bot scope, 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_TOKEN is accepted as an alternative to DISCORD_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

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured