GuildBridge MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add -e "DISCORD_CLIENT_ID=${DISCORD_CLIENT_ID}" -e "DISCORD_CLIENT_SECRET=${DISCORD_CLIENT_SECRET}" -e "DISCORD_BOT_TOKEN=${DISCORD_BOT_TOKEN}" -e "COOKIE_ENCRYPTION_KEY=${COOKIE_ENCRYPTION_KEY}" guildbridge -- npx -y @dend/guildbridge
Required:DISCORD_CLIENT_IDDISCORD_CLIENT_SECRETDISCORD_BOT_TOKENCOOKIE_ENCRYPTION_KEY+ 1 optional
README.md

A remote MCP server for Discord, deployed on Cloudflare Workers.

GuildBridge

A remote MCP server for Discord, deployed on Cloudflare Workers.

About
·
Tools
·
Access Control
·
Token Usage
·
Contributing

About

There is no official Discord MCP server, yet much of the coordination with contributors in the MCP community happens on Discord. GuildBridge fills that gap for me — it gives MCP clients authenticated, permission-aware access to Discord servers so that AI agents can read, search, and post messages where the conversation is already happening. It very much came to life on the heels of a problem that I had that I solved by building my own MCP server.

[!WARNING] The actual hosted version of this MCP server is not broadly available (I have restricted it to specific accounts and servers), but you can just as easily configure and deploy it yourself on your Cloudflare account.

Querying data from the Discord MCP server with Claude

[!NOTE] When hosted, this MCP server authenticates users via Discord OAuth2 and makes all API calls with a bot token. Role-Based Access Control (RBAC) is implemented server-side, as Discord's own auth surface doesn't enable a clean role separation and integration with messaging APIs in its OAuth implementation.

Prerequisites

Discord App Setup

  1. Go to the Discord Developer Portal and create (or select) an application.
  2. Under Bot, click "Reset Token" to get your bot token. Save it.
  3. Under OAuth2, note the Client ID and Client Secret.
  4. Under OAuth2 > Redirects, add your callback URL:
    • Local dev: http://localhost:8788/callback
    • Production: https://<your-worker>.workers.dev/callback (you will get this URI later when you deploy your MCP server to Cloudflare)
  5. Under OAuth2 > Scopes, ensure `identify` and `guilds` are selected.
  6. Under Bot > Privileged Gateway Intents, enable **Message Content Intent** if you want full message content in search results.
  7. Invite the bot to your server(s) using the OAuth2 URL Generator with the bot scope and these permissions: View Channels, Read Message History, Send Messages.

Local Development

# Install dependencies
npm install

# Copy the example files and fill in your values
cp wrangler.jsonc.example wrangler.jsonc
cp .dev.vars.example .dev.vars

# Start the dev server
npm run dev

The server runs at http://localhost:8788. The MCP endpoint is at /mcp.

`.dev.vars`

[!NOTE] You will need to fill this out prior to deployment to ensure that the MCP server can actually talk to Discord's APIs.

Variable Description
DISCORD_CLIENT_ID OAuth2 client ID from Discord Developer Portal
DISCORD_CLIENT_SECRET OAuth2 client secret
DISCORD_BOT_TOKEN Bot token (used for all Discord API calls)
COOKIE_ENCRYPTION_KEY Random string for signing cookies — generate with openssl rand -hex 16
ALLOWED_DISCORD_USER_IDS Comma-separated Discord user IDs allowed to authenticate (empty = all users)

Deploy to Cloudflare

# Create the KV namespace (https://developers.cloudflare.com/kv/)
npx wrangler kv namespace create OAUTH_KV

Copy the output id into wrangler.jsonc replacing PLACEHOLDER_KV_ID.

# Set secrets (https://developers.cloudflare.com/workers/configuration/secrets/)
npx wrangler secret bulk .dev.vars

# Deploy
npm run deploy

After deploying, Wrangler will print your worker URL (e.g. https://guildbridge.<your-subdomain>.workers.dev). Add https://<your-worker-url>/callback

Tools (3)

read_messagesRead messages from a specific Discord channel.
search_messagesSearch for messages within a Discord server.
post_messagePost a message to a specific Discord channel.

Environment Variables

DISCORD_CLIENT_IDrequiredOAuth2 client ID from Discord Developer Portal
DISCORD_CLIENT_SECRETrequiredOAuth2 client secret
DISCORD_BOT_TOKENrequiredBot token used for all Discord API calls
COOKIE_ENCRYPTION_KEYrequiredRandom string for signing cookies
ALLOWED_DISCORD_USER_IDSComma-separated Discord user IDs allowed to authenticate

Configuration

claude_desktop_config.json
{"mcpServers": {"guildbridge": {"command": "npx", "args": ["-y", "@dend/guildbridge"], "env": {"DISCORD_BOT_TOKEN": "YOUR_TOKEN"}}}}

Try it

Search for recent messages in the general channel about the new project update.
Post a summary of our meeting notes to the team-updates channel.
Find all messages mentioning 'MCP' in the last 24 hours.
Read the latest messages from the announcements channel to catch up on news.

Frequently Asked Questions

What are the key features of GuildBridge?

Authenticated access to Discord servers via OAuth2. Role-Based Access Control (RBAC) implemented server-side. Ability to read, search, and post messages in Discord channels. Deployed as a remote server on Cloudflare Workers. Supports Discord bot token authentication for API calls.

What can I use GuildBridge for?

Allowing AI agents to participate in community coordination on Discord. Automating the posting of project status updates to specific Discord channels. Searching through historical Discord conversations to retrieve technical context. Enabling secure, permission-aware AI assistance within private Discord servers.

How do I install GuildBridge?

Install GuildBridge by running: npm run deploy

What MCP clients work with GuildBridge?

GuildBridge 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 GuildBridge 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