Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

discord-mcp

A minimal MCP server for Discord. Exposes two read-only tools — listing channels and reading messages — from a single configured guild.

Tools

  • list_channels — lists all channels in the configured guild (id, name, type)
  • get_messages — retrieves recent messages from a channel (channel_id required, limit optional 1–100, default 50)

Setup

1. Create a Discord Bot

  1. Go to https://discord.com/developers/applications and create an application
  2. Under Bot, click Add Bot
  3. Copy the token
  4. Under OAuth2 → URL Generator, select scopes: bot — permissions: View Channels, Read Message History
  5. Open the generated URL to invite the bot to your server

2. Configure

cp config.example.toml config.toml

Edit config.toml:

[discord]
token = "Bot YOUR_TOKEN_HERE"
guild_id = "YOUR_GUILD_ID"

To find your guild ID: in Discord, enable Developer Mode (Settings → Advanced), right-click your server → Copy Server ID.

3. Build

cargo build --release

4. Add to Claude Code

In your Claude Code MCP config (.mcp.json or claude_desktop_config.json):

{
  "mcpServers": {
    "discord": {
      "command": "/path/to/discord-mcp/target/release/discord-mcp",
      "args": []
    }
  }
}

The server reads config.toml from its current working directory. Set cwd in the MCP config if needed.

Development

cargo test        # run all tests
cargo clippy      # lint
cargo build       # debug build

About

Minimal MCP server for Discord — list channels and read messages

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages