mcp-discord
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-discordsearch for 'deployment plan' in #dev channel"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-discord
An MCP (Model Context Protocol) server that enables searching Discord messages using Discord's native search API. Designed for use with Claude Code to find project decisions and communications in Discord.
Quick Start (Team Members)
Step 1: Configure npm for GitHub Packages
Run this once to set up access to our private package:
npm config set @acheronlabs:registry https://npm.pkg.github.com
npm login --registry=https://npm.pkg.github.comWhen prompted:
Username: Your GitHub username
Password: A GitHub Personal Access Token with
read:packagesscope (create one here)Email: Your email
Step 2: Install globally
npm install -g @acheronlabs/mcp-discordStep 3: Configure your Discord token
mcp-discord-setupFollow the prompts to enter your Discord token (see Getting Your Token).
Step 4: Add to Claude Code
Option A: Global (available in all projects)
Run this command to add globally:
claude mcp add discord-search --scope user -- mcp-discordOption B: Per-project
Add to your project's .mcp.json file:
{
"mcpServers": {
"discord-search": {
"command": "mcp-discord"
}
}
}Step 5: Restart Claude Code
Restart Claude Code and verify with the /mcp command.
Related MCP server: ClaudeHistoryMCP
Features
Search Messages: Full-text search with filters for author, channel, date range, and attachment types
List Guilds: View all Discord servers you have access to
List Channels: Browse channels in a server
Message Context: Get surrounding messages for context around search results
Daily Summary: Get aggregated messages over a time period with author statistics (rate-limit safe)
Prerequisites
Node.js 24+
Discord user token (see Getting Your Token)
Installation
Option 1: Global Install from GitHub Packages (Recommended)
See Quick Start above.
Option 2: Clone and Build (Development)
git clone https://github.com/AcheronLabs/mcp-discord.git
cd mcp-discord
npm install
npm run build
npm run setupConfiguration
1. Run Setup (Recommended)
The easiest way to configure the server is using the interactive setup:
# If installed globally
mcp-discord-setup
# Or after cloning and building
npm run setupThis will:
Guide you through getting your Discord token
Store it securely in
~/.config/mcp-discord/config.jsonSet proper file permissions (600 - owner read/write only)
2. Configure Claude Code
Add to your project's .mcp.json:
{
"mcpServers": {
"discord-search": {
"command": "node",
"args": ["/path/to/mcp-discord/dist/index.js"]
}
}
}Or if installed globally:
{
"mcpServers": {
"discord-search": {
"command": "mcp-discord"
}
}
}3. Restart Claude Code
After configuring, restart Claude Code for changes to take effect. Verify with /mcp command.
Alternative: Environment Variable
If you prefer environment variables (e.g., for CI/CD), you can set:
export DISCORD_USER_TOKEN="your_token_here"The server checks config file first, then falls back to environment variable.
Getting Your Discord Token
Open Discord in your browser at https://discord.com/app
Open Developer Tools (F12 or Cmd+Option+I)
Go to the Network tab
Perform any action in Discord (send a message, switch channels)
Click on any request to
discord.com/apiLook for the
Authorizationheader in the request headersCopy the token value (without "Bearer " prefix if present)
Security: Your token is stored in ~/.config/mcp-discord/config.json with 600 permissions (only you can read/write).
Available Tools
search_messages
Search Discord messages with powerful filters.
Parameter | Type | Required | Description |
guild_id | string | Yes | Server ID to search in |
content | string | No | Text to search for |
author_id | string | No | Filter by user ID |
channel_id | string | No | Filter to specific channel |
has | enum | No | Filter by: file, link, embed, image, video, sound, sticker |
before | string | No | Messages before date (ISO 8601) or message ID |
after | string | No | Messages after date (ISO 8601) or message ID |
limit | number | No | Max results 1-25 (default: 25) |
offset | number | No | Pagination offset |
Response includes: guild_name, channel_name, author, content, timestamp, attachments for each message.
Example usage in Claude:
Search the Dimensional server for "mini pc" referenceslist_guilds
List all Discord servers you have access to. No parameters required.
list_channels
List channels in a Discord server.
Parameter | Type | Required | Description |
guild_id | string | Yes | Server ID |
type | enum | No | Filter: text, voice, category, thread, forum, all (default: text) |
get_message_context
Get messages surrounding a specific message for context.
Parameter | Type | Required | Description |
guild_id | string | Yes | Server ID containing the message |
channel_id | string | Yes | Channel containing the message |
message_id | string | Yes | Target message ID |
content | string | No | Text from the target message (recommended for reliable results) |
before_count | number | No | Messages before (0-25, default: 5) |
after_count | number | No | Messages after (0-25, default: 5) |
Note: The content parameter is recommended because Discord's search API requires content to reliably find specific messages. Without it, the target message may not be found.
get_daily_summary
Get a summary of all messages from a Discord server over a time period. Useful for daily digests.
Parameter | Type | Required | Description |
guild_id | string | Yes | Server ID to summarize |
channel_ids | string[] | No | Specific channel IDs (default: all channels) |
hours | number | No | Hours to look back (1-168, default: 24) |
max_messages | number | No | Max messages to fetch (25-1000, default: 500) |
Rate Limiting: Uses conservative 500ms delays between API requests (2 req/sec) to avoid Discord blocks. A full 500-message fetch takes ~10 seconds.
Response includes:
stats: Total messages, channels, authors, API calls made, truncation infoactive_authors: Top 20 most active users with message countschannels: Messages grouped by channel, sorted by activity
Example usage in Claude:
Give me a daily summary of the Dimensional server
Summarize the last 48 hours of messages in the dev channelUsage Examples
Once configured, you can ask Claude:
"List my Discord servers"
"Search the Dimensional server for discussions about hardware"
"Find messages from @alex about navigation"
"Show me messages with attachments in the dev channel"
"Get context around message ID 1234567890" (use with content text for best results)
"Give me a daily summary of the Dimensional server"
Troubleshooting
MCP server not appearing
Check
/mcpcommand output for errorsVerify token is configured:
cat ~/.config/mcp-discord/config.jsonEnsure the path in
.mcp.jsonis absoluteRestart Claude Code
Token not found
Run the setup again:
npm run setup"Rate limited" errors
The server handles rate limits automatically with retries. If you see persistent rate limit errors, wait a few minutes before trying again.
"Discord API error (401)"
Your token is invalid or expired. Get a fresh token from Discord.
"Discord API error (403)"
You don't have permission to access that server or channel.
Notes
This uses Discord's user token (not a bot token) to access the native search API
Using user tokens is against Discord's Terms of Service - use at your own risk for personal productivity
The server caches channel and guild information for better performance
Search results are limited to 25 per request (Discord API limit)
Publishing a New Release (Maintainers)
To publish a new version to GitHub Packages, just run:
npm run releaseThis will automatically:
Run tests and build
Bump the version (you'll be prompted for patch/minor/major)
Create a git tag
Push to GitHub
Create a GitHub Release
The GitHub Release triggers the publish workflow, which publishes to GitHub Packages.
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityDmaintenanceMCP server that lets you search your Claude Code conversation history to find past solutions, track file changes, and learn from previous work.8153177MIT
- AlicenseAqualityDmaintenanceAn MCP server that makes Claude Code conversation history searchable and proactively useful by indexing past sessions with hybrid BM25+TF-IDF search, extracting decisions and solutions, and auto-injecting relevant project context at session start.91365MIT
- FlicenseBqualityDmaintenanceAn MCP server that provides tools for searching and analyzing Claude Code conversation history.84
- FlicenseAqualityCmaintenanceRead-only MCP server for finding Discord messages. It enables searching guild messages, locating messages from jump URLs, and reading context around results.71
Related MCP Connectors
Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
An MCP server that gives your AI access to the source code and docs of all public github repos
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/cyprocypro/mcp-discord'
If you have feedback or need assistance with the MCP directory API, please join our Discord server