Discord 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/HuckOps/discord-mcp.git
cd discord-mcp
go build -o discord-mcp ./cmd/server
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 "app_id=${app_id}" -e "app_secret=${app_secret}" -e "bot_token=${bot_token}" -e "guild_id=${guild_id}" discord-mcp-4019 -- node "<FULL_PATH_TO_DISCORD_MCP>/dist/index.js"

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

Required:app_idapp_secretbot_tokenguild_id
README.md

A Discord bot server enabling AI models to interact with Discord via MCP.

Discord MCP Server

A Discord bot server based on Model Context Protocol (MCP), enabling AI models to interact with Discord through the MCP protocol.

Features

  • 📋 Channel Management: Get server channels, create new channels
  • 💬 Message Operations: Send text messages, send files, retrieve message history
  • 👥 User Queries: Get server member list, query user information
  • 🔌 Dual Mode: Supports both STDIO and SSE Server modes
  • 📝 Structured Logging: High-performance logging with Zap

Available Tools

Channel Tools

  • channels - Get all channels
  • create_channels - Create a new channel

Message Tools

  • channel_last_messages - Get recent messages from a channel
  • send_channel_message - Send a message to a channel
  • send_channel_file - Send a file to a channel

User Tools

  • get_users - Get guild users
  • get_user - Get user info by user ID

Requirements

  • Go 1.25.5+

Installation

Build from Source

git clone https://github.com/HuckOps/discord-mcp.git
cd discord-mcp
go build -o discord-mcp ./cmd/server

Configuration

Create a discord_bot.yaml configuration file in the project root:

app_id: "Your Application ID"
app_secret: "Your Application Secret"
bot_token: "Your Bot Token"
guild_id: "Your Guild/Server ID"
proxy: "" # Optional proxy URL

Usage

STDIO Mode (Default)

./discord-mcp --stdio

SSE Server Mode

./discord-mcp --ssePort 8080

Tech Stack

  • Go - Primary programming language
  • discordgo - Discord API wrapper
  • mcp-go - MCP SDK
  • zap - High-performance logger

Dependencies

Main dependencies:

  • github.com/bwmarrin/discordgo
  • github.com/mark3labs/mcp-go
  • go.uber.org/zap
  • gopkg.in/yaml.v3

License

MIT License

Contributing

Issues and Pull Requests are welcome!

Contact

For questions or issues, please open a GitHub Issue.

Tools (7)

channelsGet all channels in the server
create_channelsCreate a new channel
channel_last_messagesGet recent messages from a channel
send_channel_messageSend a message to a channel
send_channel_fileSend a file to a channel
get_usersGet guild users
get_userGet user info by user ID

Environment Variables

app_idrequiredDiscord Application ID
app_secretrequiredDiscord Application Secret
bot_tokenrequiredDiscord Bot Token
guild_idrequiredDiscord Guild/Server ID

Configuration

claude_desktop_config.json
{"mcpServers": {"discord": {"command": "./discord-mcp", "args": ["--stdio"]}}}

Try it

List all the channels available in my Discord server.
Send a message to the general channel saying 'Hello from Claude'.
Get the user information for the user with ID 123456789.
Retrieve the last 10 messages from the announcements channel.

Frequently Asked Questions

What are the key features of Discord MCP Server?

Channel management including listing and creating channels. Message operations to send text, files, and retrieve history. User queries to fetch member lists and specific user details. Dual mode support for both STDIO and SSE server communication. High-performance structured logging using Zap.

What can I use Discord MCP Server for?

Automating server announcements by having Claude post updates to specific channels. Managing community moderation by querying user information directly through AI. Integrating AI-driven file sharing into Discord workflows. Building custom AI-powered Discord bots that can read and respond to channel history.

How do I install Discord MCP Server?

Install Discord MCP Server by running: git clone https://github.com/HuckOps/discord-mcp.git && cd discord-mcp && go build -o discord-mcp ./cmd/server

What MCP clients work with Discord MCP Server?

Discord MCP Server 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 MCP Server 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