
How to add Discord MCP to Windsurf
Connect AI assistants to Discord — manage channels, messages, roles, members, events and more via a JDA-powered bot. Paste the config into ~/.codeium/windsurf/mcp_config.json and restart Windsurf.
Last updated June 14, 2026 · 358★ · http · apikey
Windsurf config for Discord MCP
docker run -d -i --name discord-mcp --restart unless-stopped -p 8085:8085 -e SPRING_PROFILES_ACTIVE -e DISCORD_TOKEN -e DISCORD_GUILD_ID saseq/discord-mcp:latest{
"mcpServers": {
"discord-mcp": {
"serverUrl": "http://localhost:8085/mcp"
}
}
}Remote server — no local install needed. Restart the client after saving the config.
Setup steps
- 1Open Windsurf → Cascade → the hammer/MCP icon → Configure (or edit ~/.codeium/windsurf/mcp_config.json).
- 2Paste the Discord MCP config below.
- 3Fill in placeholder secrets, then save.
- 4Click Refresh in the MCP panel.
- 5Discord MCP's tools become available to Cascade.
Before you start
- A Discord bot and its token (DISCORD_TOKEN)
- Docker (recommended) — or Maven + Java to build and run the JAR manually
- Optional: DISCORD_GUILD_ID to set a default server ID so guildId can be omitted on tools
What Discord MCP can do in Windsurf
get_server_infoGet detailed Discord server information
get_user_id_by_nameGet a Discord user's ID by username in a guild for ping usage <@id>
send_private_messageSend a private message to a specific user
edit_private_messageEdit a private message from a specific user
delete_private_messageDelete a private message from a specific user
read_private_messagesRead private message history from a specific user (includes attachment metadata, count 1-100 and optional cursor: before/after/around)
send_messageSend a message to a specific channel
edit_messageEdit a message from a specific channel
Security
Requires a Discord bot token (DISCORD_TOKEN) supplied via environment variable; treat it as a secret. The bot can perform destructive and moderation actions (delete channels/messages, kick/ban members, manage roles and permissions), so grant it only the Discord permissions it needs. The default HTTP endpoint http://localhost:8085/mcp is reachable only from the local machine; to expose it remotely (e.g. for Claude Desktop remote connectors) put it behind public HTTPS via a tunnel or reverse proxy.
Discord MCP + Windsurf FAQ
Where is the Windsurf config file?
Windsurf reads MCP servers from ~/.codeium/windsurf/mcp_config.json. Paste the Discord MCP config there under the "mcpServers" key and restart the client.
Is Discord MCP safe to use with Windsurf?
Requires a Discord bot token (DISCORD_TOKEN) supplied via environment variable; treat it as a secret. The bot can perform destructive and moderation actions (delete channels/messages, kick/ban members, manage roles and permissions), so grant it only the Discord permissions it needs. The default HTTP endpoint http://localhost:8085/mcp is reachable only from the local machine; to expose it remotely (e.g. for Claude Desktop remote connectors) put it behind public HTTPS via a tunnel or reverse proxy.
What credentials do I need?
A Discord bot token set as the DISCORD_TOKEN environment variable. Optionally set DISCORD_GUILD_ID to a default server ID so the guildId parameter becomes optional on every tool.
Which transport should I use?
HTTP singleton mode is recommended — connect clients to http://localhost:8085/mcp. A legacy stdio mode is also supported, which launches a new process/container per client session.
How do I run it?
Pull and run the Docker image saseq/discord-mcp:latest (also available via Docker Compose), or build the JAR from source with Maven and run it with java -jar.