Discord MCP
Provides read-only access to Discord servers, including listing guilds, channels, and messages, and retrieving individual message details.
Click on "Deploy 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., "@Discord MCP Show the last 25 messages in the #general 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.
Discord MCP
Local, read-only Discord MCP server. It uses stdio and direct Discord REST API calls—there is no HTTP listener, Kubernetes deployment, Gateway connection, event cache, or write tool.
Safety boundaries
DISCORD_ALLOWED_GUILDSis required; the server fails to start without it.DISCORD_ALLOWED_CHANNELSis optional but recommended. When set, all channel and message reads outside it are rejected.Message tools always return message bodies. Enable Message Content Intent for the bot in Discord Developer Portal; without it, Discord returns empty content fields.
The bot needs only
View ChannelandRead Message Historyfor the initial tools. Do not grant Administrator, management, moderation, webhook, invite, or voice permissions.The bot token stays in your local MCP configuration or a local
.envfile;.envis ignored by Git.
Related MCP server: telegram-mcp
Tools
discord_list_guildsdiscord_list_channelsdiscord_get_channeldiscord_list_messagesdiscord_get_message
All tools are read-only. Message reads support a bounded limit (1–100) and a before or after cursor. The service never downloads attachments and never returns attachment URLs.
Setup
npm installCopy .env.example to an ignored local .env file if you want a convenience template, then export it deliberately before running the development command:
set -a
. ./.env
set +a
npm run devPopulate DISCORD_BOT_TOKEN and the numeric guild ID in that local file. Use Discord's Developer Mode to copy IDs. Add channel IDs to DISCORD_ALLOWED_CHANNELS before enabling the server for a shared guild.
Build and verify without contacting Discord:
npm run check
npm run buildCodex configuration
Export the configuration variables in the same local environment that launches the Codex CLI. Do not put the token in this repository or config.toml.
Add this local MCP entry to ~/.codex/config.toml, replacing the path with your clone path:
[mcp_servers.discord]
command = "node"
args = ["/absolute/path/to/discord-mcp/dist/index.js"]
cwd = "/absolute/path/to/discord-mcp"
env_vars = [
"DISCORD_BOT_TOKEN",
"DISCORD_ALLOWED_GUILDS",
"DISCORD_ALLOWED_CHANNELS",
]For example, in the shell you use to start Codex:
export DISCORD_BOT_TOKEN='...'
export DISCORD_ALLOWED_GUILDS='your-guild-id'
export DISCORD_ALLOWED_CHANNELS='your-test-channel-id'
codexBuild first, then restart Codex from that environment. If you use the ChatGPT desktop app rather than Codex CLI, configure the environment at the app-launch level or use the app's MCP-server form; a variable exported in an unrelated Terminal window will not be inherited by the already-running app.
Development
npm run dev
npm test
npm run typechecknpm run dev reads environment variables from the current shell. It deliberately does not load .env automatically so the token cannot be accidentally supplied through an unexpected execution path.
Available Tools
5 toolsdiscord_get_channelGet Discord channel metadataARead-onlyIdempotent
Gets metadata for one allowlisted guild channel. This does not fetch messages.
Inputs: channelId (required).
discord_get_messageGet one Discord messageARead-onlyIdempotent
Gets one message from an allowlisted guild channel. The Discord application must have Message Content Intent enabled.
Inputs: channelId (required), messageId (required).
discord_list_channelsList Discord channelsARead-onlyIdempotent
Lists channels in one allowlisted Discord guild. Optional channel allowlisting is applied.
Inputs: guildId (required).
discord_list_guildsList allowed Discord guildsARead-onlyIdempotent
Lists only the Discord guilds explicitly allowed by local configuration.
Inputs: no named parameters.
discord_list_messagesList Discord messagesARead-onlyIdempotent
Reads a bounded page of messages from one allowlisted guild channel. The Discord application must have Message Content Intent enabled.
Inputs: channelId (required), after, limit, before.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool targets a distinct resource and action: listing guilds, listing channels, getting channel metadata, listing messages, and getting a single message. There is no overlap or ambiguity between them.
All tool names follow the consistent pattern of 'discord_' + verb + '_' + noun, using lowercase snake_case throughout (list_guilds, get_channel, list_messages). This makes the set predictable and easy to navigate.
With 5 tools, the server is well-scoped and focused on read-only Discord operations. Each tool covers a distinct aspect of the domain without excess or omissions that would make the set feel thin.
The tool set provides solid read coverage (guilds, channels, messages), but lacks any write operations like sending messages or creating/deleting channels. This is a notable gap for a general-purpose Discord MCP, though it may be intentional for a read-only use case.
Related MCP Connectors
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
Public read-only MCP server for Genvernium product and developer resources.
Discord MCP server for ChatGPT, Claude and any AI agent: list servers and channels, read channel messages, search messages, send message, reply to message, send DM, read mentions and assign role in your own Discord account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Discord yourself; Cotlet does not store your password and you need no Discord API key. About the official Discord API: Yes, Discord has an official API for bots and OAuth2 apps, but it acts as a bot that a server manager adds, not as you, and Discord has no official MCP server for it (checked 5 Nov 2026). The MCP server on Discord's docs site only searches documentation. Setup and FAQ: https://cotlet.dev/integrations/discord-api-mcp-server
Read-only MCP server for interior design studios: projects, overviews, weekly activity. No writes.
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server for interacting with Discord via REST API, enabling guild, channel, and message operations using a bot token.7MIT
- FlicenseAqualityDmaintenanceRead-only MCP server for self-hosted Telegram access via Telethon. Enables reading messages, chats, and media but disallows any write operations.10-
- AlicenseNot gradedqualityDmaintenanceRead-only MCP server for Discord that lists guilds, channels, and reads or searches messages using a self-bot account via discord.py-self.MIT
- AlicenseNot gradedqualityCmaintenanceA local MCP server that reads Discord servers and channels and optionally sends messages with explicit allowlists, read-only by default.47 npm21 PyPIMIT