iprashantraj/mcp-discord-bridge

๐Ÿ’ฌ Communication
0 Views
0 Installs

๐Ÿ“‡ ๐Ÿ  ๐ŸŽ ๐ŸชŸ ๐Ÿง - Discord MCP server with 46 tools for channels, messages, forums, webhooks, members, roles, threads, and moderation. Zero-install via npx -y mcp-discord-bridge. Also runs as a standalone bot with slash commands.

Quick Install

One-Click IDE Configuration
claude_desktop_config.json
{
  "mcpServers": {
    "iprashantraj-mcp-discord-bridge": {
      "command": "npx",
      "args": [
        "-y",
        "iprashantraj-mcp-discord-bridge"
      ]
    }
  }
}
Or

Using an AI coding agent (Claude Code, Cursor, etc.)? Copy a ready-made prompt that tells it to fetch the setup instructions and install this server for you.

Documentation Overview

Discord MCP Server

npm version npm downloads CI License: MIT

Control your Discord server using AI โ€” 44 tools, no cloning required. Works with any MCP-compatible app: Claude Desktop, Cursor, Windsurf, Continue.dev, Zed, Claude Code, and more.

What is MCP? Model Context Protocol is an open standard that lets AI apps talk to external tools. This project is one of those tools โ€” it gives any AI assistant the power to manage your Discord server.

Demo showing Discord MCP tools in action

Install in one line

npx -y mcp-discord-bridge

That's it โ€” no clone, no npm install. Just add it to your AI app's MCP config (see Quick Start below).


What Can It Do?

Once connected, your AI assistant can:

  • Channels โ€” create, delete, rename, move channels and categories
  • Messages โ€” read, send, edit, delete, search messages, send DMs, add/remove reactions
  • Forum Channels โ€” list forums, create/read/reply/delete forum posts
  • Webhooks โ€” create, send via, edit, and delete webhooks
  • Members โ€” list members, view profiles, check roles
  • Roles โ€” list, create, edit, delete, assign, and remove roles
  • Moderation โ€” kick, ban, unban, timeout members, set nicknames
  • Threads โ€” create, list, archive, unarchive, join, and delete threads
  • Server โ€” list all servers the bot is in, view channel layouts

It also runs as a standalone Discord bot with /ping, /info, and /serverinfo slash commands.


Quick Start (3 minutes)

Step 1: Create a Discord Bot

  1. Go to the Discord Developer Portal
  2. Click New Application โ€” give it a name
  3. Go to Bot tab โ€” click Reset Token โ€” copy and save the token somewhere safe

Step 2: Invite the Bot to Your Server

  1. In the Developer Portal, go to OAuth2 > URL Generator
  2. Check these scopes: bot, applications.commands
  3. Check these permissions: Send Messages, Read Message History, Manage Channels, Manage Roles, Manage Webhooks, Kick Members, Ban Members, Moderate Members, Manage Nicknames
  4. Open the generated URL โ€” select your server โ€” authorize

Step 3: Add to Your AI App

Add this to your app's MCP config โ€” no cloning or installing needed:

{
  "mcpServers": {
    "discord": {
      "command": "npx",
      "args": ["-y", "mcp-discord-bridge"],
      "env": {
        "DISCORD_TOKEN": "paste_your_bot_token_here"
      }
    }
  }
}

Where is the config file?

AppConfig Location
Claude DesktopWindows: %APPDATA%\Claude\claude_desktop_config.json ยท macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Claude Code~/.claude.json (or run /mcp in Claude Code)
CursorSettings > search "MCP" > Edit MCP Settings
Windsurf~/.codeium/windsurf/mcp_settings.json
Continue.dev~/.continue/config.json
Zed~/.config/zed/settings.json

Step 4: Done!

Restart your AI app. You should now see Discord tools available. Try asking:

"List all channels in my Discord server"


All Available Tools (44)

ToolWhat It Does
Server
list_guildsList all servers the bot is in
list_channelsList all channels and categories
Channels
create_categoryCreate a new category
create_channelCreate a text or voice channel
delete_channelDelete a channel or category
move_channelMove a channel to a different category
rename_channelRename a channel or category
Messages
get_channel_messagesFetch recent messages (up to 100)
send_messageSend a message to a channel
delete_messageDelete a message
edit_messageEdit a bot message
search_messagesSearch messages by keyword
send_dmSend a direct message to a user
add_reactionAdd an emoji reaction to a message
remove_reactionRemove the bot's reaction from a message
add_multiple_reactionsAdd multiple reactions at once
Forum Channels
list_forum_channelsList all forum channels in a server
create_forum_postCreate a new forum post
get_forum_postFetch a forum post and its messages
reply_to_forum_postReply to a forum post
delete_forum_postDelete a forum post
Webhooks
create_webhookCreate a webhook for a channel
send_webhook_messageSend a message via webhook
edit_webhookEdit a webhook
delete_webhookDelete a webhook
Members
list_membersList server members with roles
get_memberGet detailed info about a member
Roles
list_rolesList all roles in a server
assign_roleGive a role to a member
remove_roleTake a role from a member
create_roleCreate a new role with name, color, mentionable
edit_roleEdit a role's name or color
delete_roleDelete a role from the server
Moderation
kick_memberKick a member from the server
ban_memberBan a user (with optional message cleanup)
unban_memberUnban a previously banned user
timeout_memberTimeout (mute) a member for a duration
set_nicknameSet or reset a member's nickname
Threads
create_threadCreate a thread in a text channel
list_threadsList active and archived threads
archive_threadArchive a thread (optionally lock it)
unarchive_threadUnarchive a thread
join_threadMake the bot join a thread
delete_threadDelete a thread

Install from Source (for contributors)

If you want to modify the code or run the standalone bot:

git clone https://github.com/iprashantraj/mcp-discord-bridge.git
cd mcp-discord-bridge
npm install
cp .env.example .env   # fill in DISCORD_TOKEN, CLIENT_ID, GUILD_ID

Then use ts-node to run directly:

{
  "mcpServers": {
    "discord": {
      "command": "npx",
      "args": ["ts-node", "/full/path/to/mcp-discord-bridge/mcp-server.ts"],
      "env": {
        "DISCORD_TOKEN": "paste_your_bot_token_here"
      }
    }
  }
}

Running as a Standalone Bot

If you just want the slash commands without MCP:

# Register commands (one time)
npm run deploy-commands

# Start the bot
npm run bot
CommandDescription
/pingCheck bot latency
/infoShow bot uptime and stats
/serverinfoShow server details

Docker Deployment

The image defaults to the MCP server (stdio). To run the standalone bot 24/7 instead, uncomment the command: ["node", "dist/index.js"] line in docker-compose.yml, then:

docker-compose up -d       # Start in background
docker-compose logs -f     # View logs

Architecture

mcp-discord-bridge architecture diagram

An MCP client talks to mcp-server.ts over stdio (JSON-RPC). The server advertises tools (with read-only/destructive annotations), then dispatches each call through mcp-handlers.ts โ€” a 44-tool registry that validates args, checks bot permissions, and enforces read-only mode. Handlers act through the shared client from discord-client.ts, which owns login and connection state. The standalone bot (index.ts) is a separate entrypoint that reuses the same client factory.

Editable source: assets/architecture.excalidraw โ€” open it at excalidraw.com.


Development

npm run typecheck    # Type check
npm run lint         # Lint
npm run test         # Run tests (59 tests)
npm run format       # Format code

CI runs automatically on every push and PR via GitHub Actions.

Project Structure

mcp-discord-bridge/
โ”œโ”€โ”€ discord-client.ts     # Shared Discord client setup
โ”œโ”€โ”€ mcp-server.ts         # MCP server (tool schemas + wiring)
โ”œโ”€โ”€ mcp-handlers.ts       # Tool handler logic (registry pattern)
โ”œโ”€โ”€ index.ts              # Standalone bot (slash commands)
โ”œโ”€โ”€ deploy-commands.ts    # One-time command registration
โ”œโ”€โ”€ tests/                # Vitest test suite
โ”œโ”€โ”€ .github/workflows/    # CI pipeline
โ””โ”€โ”€ Dockerfile            # Multi-stage Docker build

Read-Only Mode

This server can delete channels, ban members, and remove roles. If you only want the AI to read your server, set DISCORD_READONLY in the env block:

"env": {
  "DISCORD_TOKEN": "your_token",
  "DISCORD_READONLY": "true"
}

In read-only mode only the 10 read tools (list_*, get_*, search_messages) are advertised and callable; every write/destructive tool is refused.

All tools also carry MCP annotations (readOnlyHint / destructiveHint), so compatible clients can flag or confirm destructive actions before running them.

Security

  • Never commit your .env file โ€” it's already in .gitignore
  • Treat your DISCORD_TOKEN like a password โ€” if leaked, regenerate it immediately in the Developer Portal
  • The bot can only assign roles below its own role in the hierarchy (Discord enforces this)
  • Grant the bot only the permissions you need โ€” if you won't use moderation, don't grant Ban/Kick
  • Because the AI can read channel messages and act on the server, treat untrusted message content as a prompt-injection risk; use read-only mode for safer deployments
  • See SECURITY.md for the full threat model and reporting policy

License

MIT โ€” use it however you want.

Related MCP Servers

AbdelStark/nostr-mcp

โ˜๏ธ - A Nostr MCP server that allows to interact with Nostr, enabling posting notes, and more.

๐Ÿ’ฌ Communication0 views
adhikasp/mcp-twikit

๐Ÿ โ˜๏ธ - Interact with Twitter search and timeline

๐Ÿ’ฌ Communication0 views
aeoess/mingle-mcp

๐Ÿ“‡ โ˜๏ธ - Agent-to-agent networking. Your AI publishes what you need, matches with other people's agents, both humans approve before connecting. 6 tools, Ed25519 signed, shared network at api.aeoess.com.

๐Ÿ’ฌ Communication0 views
agenticmail/agenticmail

๐Ÿ“‡ ๐Ÿ  ๐ŸŽ ๐ŸชŸ ๐Ÿง - Real email and SMS for AI agents. Run a local mail server with disposable inboxes, send/receive real email, fetch verification codes, and drive a real inbox โ€” all from your machine, no third-party email API. Install with npx @agenticmail/mcp.

๐Ÿ’ฌ Communication0 views

Engagement

Views
0
Installs
0
Upvotes
0

Views and upvotes are unique per visitor network (hashed IP). Installs count copy actions.

Status

Health: Not checked yet

We have not completed a health check for this listing yet.

No check timestamp yet.

Unclaimed listing (imported or pending owner verification). Claim it โ†’
โ˜… Spotlight Slot

Feature Your MCP Server

Get maximum visibility for your server across our directory, search results, and detail pages.

Spotlight Your Server

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to get the verified badge and attach your website.

Claim this listing

Promote this listing

Optional paid placement. Free listings stay free forever.

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.