Discord User MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
git clone https://github.com/olivier-motium/discord-user-mcp.git
cd discord-user-mcp
npm install
npm run build
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add -e "DISCORD_TOKEN=${DISCORD_TOKEN}" discord-user -- node "<FULL_PATH_TO_DISCORD_USER_MCP>/dist/index.js"

Replace <FULL_PATH_TO_DISCORD_USER_MCP>/dist/index.js with the actual folder you prepared in step 1.

Required:DISCORD_TOKEN+ 1 optional
README.md

Discord MCP server using user tokens for seamless message management.

discord-user-mcp

Discord MCP server using user tokens. No bot setup, no Developer Portal, no intents — just your token and go.

Built for Claude Code and any MCP-compatible client.

Why user tokens?

Every other Discord MCP server requires creating a bot application, configuring intents, and inviting the bot to your server. This one uses your existing Discord session — the same access you already have in the app.

Trade-off: Using user tokens for automation is against Discord's ToS. This is a personal tool for your own account on your own machine. Use responsibly.

Setup

1. Get your Discord token

Your token is stored encrypted in the Discord app's local storage. You can find it by:

  • Opening Discord in a browser → DevTools → Network tab → any request → Authorization header
  • Or extracting it from the desktop app's LevelDB storage (macOS: ~/Library/Application Support/discord/Local Storage/leveldb/)

2. Add to Claude Code

claude mcp add discord -e DISCORD_TOKEN=your-token-here -- node /path/to/discord-user-mcp/dist/index.js

With a default server:

claude mcp add discord \
  -e DISCORD_TOKEN=your-token-here \
  -e DISCORD_DEFAULT_GUILD=your-server-id \
  -- node /path/to/discord-user-mcp/dist/index.js

3. Build from source

git clone https://github.com/olivier-motium/discord-user-mcp.git
cd discord-user-mcp
npm install
npm run build

Tools (14)

Core

Tool Description
discord_list_guilds List servers you're in
discord_list_channels List channels grouped by category
discord_read_messages Read channel history with pagination
discord_send_message Send a message, optionally as a reply
discord_search Search messages by content, author, channel, date, attachment type

Essential

Tool Description
discord_list_dms List DM conversations
discord_send_dm Send a DM (by user ID or channel ID)
discord_react Add emoji reaction to a message
discord_pinned_messages Get pinned messages from a channel
discord_list_threads List active threads in a server
discord_guild_info Server details, roles, features

Additional

Tool Description
discord_edit_message Edit your own message
discord_delete_message Delete your own message
discord_user_info User profile with server roles

Configuration

Environment Variable Required Description
DISCORD_TOKEN Yes Your Discord user token
DISCORD_DEFAULT_GUILD No Default server ID — tools that need a guild will use this when not specified

Design choices

  • Plain text output — no raw JSON. Messages formatted as [2024-01-15 14:32] alice: content. IDs always inline for tool chaining.
  • No discord.js — raw fetch against Discord API v10. Zero runtime deps beyond MCP SDK.
  • Rate limit handling — automatic retry with retry_after + jitter, up to 3 attempts.
  • Search is the star — accepts usernames (resolved to IDs internally), date strings (YYYY-MM-DD converted to snowflakes), and all Discord search filters.
  • Conservative defaults — 25 messages per read, not 100. Keeps output manageable for AI.

License

MIT

Tools (14)

discord_list_guildsList servers you're in
discord_list_channelsList channels grouped by category
discord_read_messagesRead channel history with pagination
discord_send_messageSend a message, optionally as a reply
discord_searchSearch messages by content, author, channel, date, attachment type
discord_list_dmsList DM conversations
discord_send_dmSend a DM (by user ID or channel ID)
discord_reactAdd emoji reaction to a message
discord_pinned_messagesGet pinned messages from a channel
discord_list_threadsList active threads in a server
discord_guild_infoServer details, roles, features
discord_edit_messageEdit your own message
discord_delete_messageDelete your own message
discord_user_infoUser profile with server roles

Environment Variables

DISCORD_TOKENrequiredYour Discord user token
DISCORD_DEFAULT_GUILDDefault server ID for tools that need a guild

Configuration

claude_desktop_config.json
{"mcpServers": {"discord": {"command": "node", "args": ["/path/to/discord-user-mcp/dist/index.js"], "env": {"DISCORD_TOKEN": "your-token-here"}}}}

Try it

List all the servers I am currently a member of.
Search for messages from 'alice' in the general channel containing the word 'meeting'.
Send a message to the current channel saying 'I am currently busy, will reply later'.
Get the pinned messages from the project-updates channel.
List my recent direct message conversations.

Frequently Asked Questions

What are the key features of Discord User?

Uses personal user tokens for direct account access without bot setup. Supports message searching with filters for author, content, and date. Automatic rate limit handling with retry logic and jitter. Plain text output optimized for AI readability. Zero runtime dependencies beyond the MCP SDK.

What can I use Discord User for?

Managing personal Discord messages and history through an AI assistant. Quickly searching through server history for specific information. Automating routine message responses in personal channels. Retrieving server and user profile information for context.

How do I install Discord User?

Install Discord User by running: claude mcp add discord -e DISCORD_TOKEN=your-token-here -- node /path/to/discord-user-mcp/dist/index.js

What MCP clients work with Discord User?

Discord User works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Discord User docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare