Simple MCP for Discord
discord-mcp gives your agent Discord's REST API, gateway events and API
reference, and acts as your bot.
Install
One binary, nothing else to set up.
cargo binstall discord-mcpcurl -fsSL https://raw.githubusercontent.com/DeityLamb/discord-mcp/main/install.sh | sh
curl -fsSL https://raw.githubusercontent.com/DeityLamb/discord-mcp/main/install.sh | sh
irm https://raw.githubusercontent.com/DeityLamb/discord-mcp/main/install.ps1 | iex
Set up
Create a bot in the Developer Portal and copy its token.
Invite it with this link (the ID is on General Information).
https://discord.com/oauth2/authorize?client_id=<id>&scope=bot&permissions=0Add it to your agent with the token.
claude mcp add discord -s user -e DISCORD_TOKEN=<token> -- discord-mcp
// claude_desktop_config.json { "mcpServers": { "discord": { "command": "discord-mcp", "env": { "DISCORD_TOKEN": "<token>" } } } }
codex mcp add discord --env DISCORD_TOKEN=<token> -- discord-mcp
pi mcp add discord --env DISCORD_TOKEN=<token> -- discord-mcp
// or just send this page to your agent { "mcpServers": { "discord": { "command": "discord-mcp", "env": { "DISCORD_TOKEN": "<token>" } } } }
Tools
discord_get and discord_call take any API path, so there is no tool per endpoint.
Every call can take a jq filter to shorten the answer.
discord_docs | API reference from Discord's OpenAPI spec, kept up to date. |
discord_get | GET requests: servers, channels, messages, members, roles. |
discord_call | POST, PUT, PATCH, DELETE: send, edit, moderate, upload. |
discord_events | Gateway events as they arrive: messages, reactions, joins. |
discord_gateway | The bot's status and activity, and member lookups. |
Example
Asked to open a thread for release notes and wait for a reply.
> discord_docs { "keywords": ["thread", "threads"] } POST /channels/{channel_id}/threads — create_thread … > discord_call { "method": "POST", "path": "/channels/1290…/threads", "body": { "name": "Release notes" }, "jq": ".id" } "1301…" > discord_events { "types": ["MESSAGE_CREATE"], "wait": 300, "jq": "{author: .author.username, content}" } #815 MESSAGE_CREATE {"author":"ann","content":"looks good"}