Discord Mcp Go
FreeNot checkedDiscord Model Context Protocol (MCP) server in Go supporting dual SSE and stdio transport, dynamic multi-guild routing, and Discord API administration
About
Discord Model Context Protocol (MCP) server in Go supporting dual SSE and stdio transport, dynamic multi-guild routing, and Discord API administration
README
Overview
discord-mcp-go provides a production-grade Discord Model Context Protocol (MCP) server for AI assistants and autonomous agent platforms (Claude Desktop, Cursor, n8n, Antigravity, OpenClaw). It exposes 113 granular tools and native MCP resource templates covering Discord server administration, human-in-the-loop collaboration (ask_user), moderation, channel operations, polls, stickers, soundboard clips, messaging, custom persistent memory resources, and multi-action block pipelines.
Core Capabilities
- Sub-15ms cold start: Starts in under 15 milliseconds.
- Low memory footprint: Runs inside less than 20 MB RAM.
- Dual transport architecture: Native HTTP Server-Sent Events (SSE) and standard input/output (stdio).
- Dynamic guild routing: Manages all bot-joined Discord guilds through runtime
guildIdparameters andDISCORD_GUILD_IDdefaults. - Blacklist protection: Configurable guild blacklist (
DISCORD_BLACKLISTED_GUILDS) to protect private servers against unauthorized agent actions. - Path confinement: Allowed directory confinement (
DISCORD_ALLOWED_FILE_PATHS) restricts filesystem reads during file uploads. - Compound block execution: Chained multi-action pipelines with variable interpolation via
run_pipeline. - Minimal container footprint: Multi-stage Alpine container image under 18 MB.
🚀 Quickstart
1. Run with Docker / GHCR (Recommended)
Run the pre-built container from GitHub Container Registry:
docker run -d \
--name discord-mcp \
-p 8085:8085 \
-e DISCORD_TOKEN="your_bot_token" \
-e DISCORD_GUILD_ID="optional_default_guild_id" \
ghcr.io/0xopcode/discord-mcp-go:latest
Or use Docker Compose:
docker compose up -d
Endpoint is available at: http://localhost:8085/sse.
2. Standalone Binaries (GitHub Releases)
Download pre-compiled static binaries from GitHub Releases:
- Linux:
amd64(baselineGOAMD64=v1for legacy AMD/Intel CPUs),arm64,armv7 - macOS:
arm64(Apple Silicon),amd64(Intel) - Windows:
amd64(.exe),arm64(.exe)
chmod +x discord-mcp-go-linux-amd64
DISCORD_TOKEN="your_token" ./discord-mcp-go-linux-amd64 --transport=sse --port=8085
3. Run from Source
git clone https://github.com/0xOpCode/discord-mcp-go.git
cd discord-mcp-go
# HTTP SSE mode
DISCORD_TOKEN="your_bot_token" go run ./cmd/server --transport=sse --port=8085
# STDIO mode
DISCORD_TOKEN="your_bot_token" go run ./cmd/server --transport=stdio
🔗 AI Client Setup
Claude Desktop (claude_desktop_config.json)
Option A: HTTP SSE (Singleton mode, recommended)
Add under Connectors UI or via reverse proxy URL:
{
"mcpServers": {
"discord": {
"url": "http://localhost:8085/sse"
}
}
}
Option B: Stdio mode
{
"mcpServers": {
"discord": {
"command": "/absolute/path/to/discord-mcp-go",
"args": ["-transport=stdio"],
"env": {
"DISCORD_TOKEN": "YOUR_DISCORD_BOT_TOKEN",
"DISCORD_GUILD_ID": "OPTIONAL_DEFAULT_GUILD_ID"
}
}
}
}
Cursor (~/.cursor/mcp.json)
{
"mcpServers": {
"discord": {
"url": "http://localhost:8085/sse"
}
}
}
n8n MCP Client Node
- Add an MCP Client node to your n8n workflow.
- Select HTTP / SSE transport.
- Server URL:
http://localhost:8085/sse(or container service name if internal).
🛠️ Complete Tool Directory (113 Tools)
Compound Workflows & Pipelines
run_pipeline: Execute a sequence of MCP actions as connected blocks with variable reference interpolation (e.g.{{step1.id}}) in a single network round-trip.
Multi-Server & Discovery
list_servers: List all Discord guilds joined by the bot with IDs and admin flags.get_server_info: Detailed guild metadata, counts, owner, and settings.check_bot_permissions: Audit bot permissions inside a guild.get_audit_logs: Inspect audit log events and moderation actions.set_bot_activity: Set bot presence status (playing, watching, streaming, listening).
Message Management
send_message: Post text messages, message replies (replyToMessageId), or rich embeds (embedsJson) to specific channels.get_message: Fetch a specific message by channel ID and message ID.search_guild_messages: Search messages across channels in a Discord server by content, author, channel, mentions, and media attachments.send_file: Upload files or attachments (images, PDFs, documents) to a text channel.edit_message: Edit bot-authored messages.delete_message: Remove messages from channels.read_messages: Paginated retrieval of channel history (cursor support: before, after, around).purge_messages: Bulk delete up to 100 recent messages from a channel.list_pinned_messages: List pinned messages in a channel.pin_message: Pin a message in a channel.unpin_message: Unpin a message from a channel.crosspost_message: Publish an announcement message to follower channels.add_reaction: Add reactions using unicode or custom emojis.remove_reaction: Remove bot reactions from messages.
Users & Direct Messages
list_guild_members: List members in a Discord server with roles and joined timestamps.get_user_id_by_name: Resolve usernames or server nicknames to user IDs.send_private_message: Open DM channels and message users.send_private_file: Upload files or attachments directly to a user in DM.edit_private_message: Edit sent direct messages.delete_private_message: Delete sent direct messages.read_private_messages: Retrieve direct message history.
Channel Management
create_text_channel: Create text channels with topics, category, slowmode, and NSFW settings.edit_text_channel: Update channel parameters.delete_channel: Delete text or voice channels.find_channel: Search channels by name substring.list_channels: List all server channels with IDs and types.get_channel_info: Fetch channel properties.move_channel: Reposition channels and update category parentage.create_thread: Spawn public or private discussion threads inside text channels.create_thread_from_message: Start a public discussion thread directly on an existing message.list_threads: List active discussion threads within a text channel.
Category Management
create_category: Create channel organizational categories.edit_category: Rename and reposition categories.delete_category: Delete channel categories.find_category: Find category by name.list_channels_in_category: List channels belonging to a category.
Roles & Permissions
list_roles: List all server roles, colors, and positions.create_role: Create roles with color, hoist, and permissions bitmask.edit_role: Update role metadata and permissions.delete_role: Remove roles from guilds.assign_role: Assign roles to server members.remove_role: Revoke roles from server members.list_channel_permission_overwrites: Audit channel permissions per role and member.upsert_role_channel_permissions: Set allow/deny bitmasks for roles.upsert_member_channel_permissions: Set allow/deny bitmasks for specific members.delete_channel_permission_overwrite: Reset permission overrides.
Moderation & Member Pruning
kick_member: Kick members with audit log reasons.ban_member: Ban users with configurable message deletion windows.unban_member: Revoke bans.timeout_member: Apply communication timeouts (mutes) with minute-precision.remove_timeout: Lift communication timeouts.set_nickname: Modify member nicknames.get_bans: List banned users and recorded reasons.estimate_prune: Estimate number of inactive members eligible for pruning.prune_members: Kick inactive members past specified days threshold.
Auto-Moderation
list_automod_rules: List active AutoMod keyword and spam filter rules.create_automod_rule: Configure custom keyword and spam blocking rules.
Interactive Polls
create_poll: Create native Discord polls with answers, duration hours, and multi-select.end_poll: Expire and finalize active polls.
Voice & Stage Channels
create_voice_channel: Create voice channels with bitrate and user limits.create_stage_channel: Create stage channels for audio events.edit_voice_channel: Update voice channel parameters.move_member: Move active voice users between rooms.disconnect_member: Disconnect members from voice.modify_voice_state: Server mute or deafen members.
Webhooks
create_webhook: Create webhooks on target channels.delete_webhook: Remove webhooks.list_webhooks: View webhooks on a channel.send_webhook_message: Post messages with custom usernames via webhooks.
Scheduled Events
create_guild_scheduled_event: Schedule stage, voice, or external events with timestamps.edit_guild_scheduled_event: Update event details and lifecycle statuses.set_event_image: Upload and update the cover image banner for a scheduled event.delete_guild_scheduled_event: Cancel and remove scheduled events.list_guild_scheduled_events: List upcoming server events.get_guild_scheduled_event_users: List subscribers interested in an event.
Invites
create_invite: Generate instant invites with max uses, age, and temporary status.list_invites: Audit active guild invites.delete_invite: Revoke invite codes.get_invite_details: Fetch invite destination and member counts.
Forums
create_forum_channel: Create forum discussion channels with tags and layout guidelines.edit_forum_channel: Update forum settings.list_forum_channels: List all server forum channels.get_forum_channel_info: Inspect forum tags and configuration.list_forum_tags: List tag names and moderation requirements.create_forum_post: Start threads with opening posts in forum channels.list_forum_posts: Fetch active discussion threads.modify_forum_post: Lock, archive, or rename forum threads.
Custom Emojis
list_emojis: List guild custom emojis.get_emoji_details: Inspect emoji author and animation flags.create_emoji: Upload new custom emojis using base64 image strings.edit_emoji: Rename custom emojis.delete_emoji: Remove custom emojis.
Soundboard Sounds
list_soundboard_sounds: List custom soundboard audio clips.create_soundboard_sound: Upload custom soundboard audio clips with volume and emoji.delete_soundboard_sound: Remove soundboard clips.
Custom Stickers
list_stickers: List custom guild stickers.create_sticker: Upload custom stickers using base64 data or file paths.delete_sticker: Remove custom stickers.
Role Connections & Linked Roles
get_role_connection: Fetch user application role connection metadata.update_role_connection: Update application role connection platform and metadata.get_role_connection_metadata: Inspect application role connection metadata configuration.update_role_connection_metadata: Configure metadata records for verification rules.
Interactive Human Collaboration
ask_user: Ask the human user a question or approval request via Discord DM and wait for their response, with configurable timeout and attachment support.
Native MCP Resources
discord://guide/overview: System architecture, capabilities, transport modes, and operating principles.discord://guide/tools: Directory and tool selection rules across all 113 tools and 18 domains.discord://guide/pipelines: Pipeline DSL manual, variable interpolation syntax, and multi-step recipes.discord://guide/best-practices: Autonomous agent protocols for context discovery, batching, and human confirmation gating.discord://memory/{key}: Read persistent custom memory documents stored in local storage.discord://guilds/{guildId}/overview: Inspect guild metadata, member count, and channel list.discord://guilds/{guildId}/roles: List server roles, colors, positions, and permission bitmasks.discord://channels/{channelId}/pinned: Retrieve pinned messages and attachments in a channel.discord://channels/{channelId}/recent: Read recent 50 messages formatted in clean markdown.
Persistent Custom Resources
save_custom_resource: Store custom notes, runbooks, owner identity, or state underdiscord://memory/{key}.get_custom_resource: Retrieve stored persistent resources by key or URI.delete_custom_resource: Remove stored persistent resources.list_custom_resources: Enumerate all persistent custom resources stored on disk.
⚙️ Configuration Reference
| Environment Variable | CLI Flag | Default | Description |
|---|---|---|---|
DISCORD_TOKEN |
-token |
(Required) | Bot token for Discord authentication |
DISCORD_GUILD_ID |
-guild-id |
"" |
Default guild ID for channel and event operations |
DISCORD_OWNER_USER_ID |
-owner-user-id |
"" |
Optional Discord User ID for interactive prompts (ask_user) |
DISCORD_BLACKLISTED_GUILDS |
-blacklisted-guilds |
"" |
Comma-separated guild IDs to block |
DISCORD_ALLOWED_FILE_PATHS |
-allowed-file-paths |
"" |
Comma-separated allowed directories for file uploads |
DISCORD_DATA_DIR |
-data-dir |
~/.config/discord-mcp-go |
Directory path for persistent custom resources storage |
PORT |
-port |
8085 |
HTTP port for SSE transport |
TRANSPORT |
-transport |
sse |
Protocol transport: sse or stdio |
📄 License
This project is licensed under the MIT License.
Installing Discord Mcp Go
This server has no published package — it is built from source. Open the repository and follow its README.
▸ github.com/0xOpCode/discord-mcp-goFAQ
Is Discord Mcp Go MCP free?
Yes, Discord Mcp Go MCP is free — one-click install via Unyly at no cost.
Does Discord Mcp Go need an API key?
No, Discord Mcp Go runs without API keys or environment variables.
Is Discord Mcp Go hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install Discord Mcp Go in Claude Desktop, Claude Code or Cursor?
Open Discord Mcp Go on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
Gmail
Read, send and search emails from Claude
by GoogleSlack
Send, search and summarize Slack messages
by SlackRunbear
No-code MCP client for team chat platforms, such as Slack, Microsoft Teams, and Discord.
Discord Server
A community discord server dedicated to MCP by [Frank Fiegel](https://github.com/punkpeye)
Klavis AI
Open Source MCP Infra. Hosted MCP servers and MCP clients on Slack and Discord.
Work90210/APIFold
Turn any REST API into a hosted MCP server, with ready-made public servers for GitHub, Stripe, Slack, OpenAI, Notion and more.
by Work90210arikusi/deepseek-mcp-server
DeepSeek AI chat and reasoning with multi-turn sessions, function calling, thinking mode and cost tracking.
by arikusihashgraph-online/hashnet-mcp-js
Discover, register and chat with AI agents on the Hashgraph network via the Registry Broker.
by hashgraph-onlineprofullstack/mcp-server
Developer utilities: SEO optimization, document conversion, domain lookup, email validation, QR codes, weather data, social media posting and security scanning.
by profullstackWayStation-ai/mcp
Connect MCP hosts to apps such as Notion, Slack, Monday and Airtable.
by waystation-aiCompare Discord Mcp Go with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All communication MCPs
