Featured

Deploy OpenClaw in 60 seconds β€” 20% off logoDeploy OpenClaw in 60 seconds β€” 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger β†’
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger β†’
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free β†’
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now β†’
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data β€” no proxies, no parsers, no maintenance.

Start building free β†’
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it β€” secured from day one.

Get it set up for you β†’
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free β†’
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here β†’

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

iprashantraj/mcp-discord-bridge MCP server](https://glama.ai/mcp/servers/iprashantraj/mcp-discord-bridge/badges/score.svg)](https://glama.ai/mcp/servers/iprashantraj/mcp-discord-bridge) πŸ“‡ 🏠 🍎 πŸͺŸ 🐧 - Discord MCP server with 46 tools for channels,...

README.md

Discord MCP Server

![npm version](https://www.npmjs.com/package/mcp-discord-bridge) ![npm downloads](https://www.npmjs.com/package/mcp-discord-bridge) ![CI](https://github.com/iprashantraj/mcp-discord-bridge/actions/workflows/ci.yml) ![License: MIT](./LICENSE)

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.

<p align="center"> <img src="./assets/demo.svg" alt="Demo showing Discord MCP tools in action" width="820"> </p>

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?

| App | Config Location | |-----|----------------| | Claude Desktop | Windows: %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) | | Cursor | Settings > 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)

| Tool | What It Does | |------|-------------| | Server | | | list_guilds | List all servers the bot is in | | list_channels | List all channels and categories | | Channels | | | create_category | Create a new category | | create_channel | Create a text or voice channel | | delete_channel | Delete a channel or category | | move_channel | Move a channel to a different category | | rename_channel | Rename a channel or category | | Messages | | | get_channel_messages | Fetch recent messages (up to 100) | | send_message | Send a message to a channel | | delete_message | Delete a message | | edit_message | Edit a bot message | | search_messages | Search messages by keyword | | send_dm | Send a direct message to a user | | add_reaction | Add an emoji reaction to a message | | remove_reaction | Remove the bot's reaction from a message | | add_multiple_reactions | Add multiple reactions at once | | Forum Channels | | | list_forum_channels | List all forum channels in a server | | create_forum_post | Create a new forum post | | get_forum_post | Fetch a forum post and its messages | | reply_to_forum_post | Reply to a forum post | | delete_forum_post | Delete a forum post | | Webhooks | | | create_webhook | Create a webhook for a channel | | send_webhook_message | Send a message via webhook | | edit_webhook | Edit a webhook | | delete_webhook | Delete a webhook | | Members | | | list_members | List server members with roles | | get_member | Get detailed info about a member | | Roles | | | list_roles | List all roles in a server | | assign_role | Give a role to a member | | remove_role | Take a role from a member | | create_role | Create a new role with name, color, mentionable | | edit_role | Edit a role's name or color | | delete_role | Delete a role from the server | | Moderation | | | kick_member | Kick a member from the server | | ban_member | Ban a user (with optional message cleanup) | | unban_member | Unban a previously banned user | | timeout_member | Timeout (mute) a member for a duration | | set_nickname | Set or reset a member's nickname | | Threads | | | create_thread | Create a thread in a text channel | | list_threads | List active and archived threads | | archive_thread | Archive a thread (optionally lock it) | | unarchive_thread | Unarchive a thread | | join_thread | Make the bot join a thread | | delete_thread | Delete 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

| Command | Description | |---------|-------------| | /ping | Check bot latency | | /info | Show bot uptime and stats | | /serverinfo | Show 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

<p align="center"> <img src="./assets/architecture.svg" alt="mcp-discord-bridge architecture diagram" width="760"> </p>

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.

See related servers & alternatives β†’

Related MCP servers

Browse all β†’

Related guides

Hand-picked reading to help you choose and use Communication servers.