Discord MCP Server

Discord MCP Server

Enables AI assistants to manage a Discord server, including creating channels, categories, roles, setting permissions, and assigning roles through natural language commands.

Category
Visit Server

README

Discord MCP Server

Manage a Discord server directly from your AI coding assistant. Create channels, categories, roles, set permissions, assign roles, and more — all through natural language.

Tools

Tool Description
create_category Create a new category channel
create_channel Create a text or voice channel under a category
create_role Create a new role with color, hoist, mentionable
edit_role Edit a role's name, color, hoist, or mentionable
delete_role Delete a role (non-managed, below bot's hierarchy)
assign_role Assign a role to a member by username
remove_role Remove a role from a member by username
restrict_channel Set channel permissions (allow/deny roles, read-only mode)
create_role_restricted_channel Create a channel + restrict it in one call
delete_category Delete a category channel
delete_channel Delete a text or voice channel

Setup

1. Create a Discord bot

  1. Go to https://discord.com/developers/applications
  2. Click New Application → name it → Create
  3. Go to BotAdd Bot
  4. Under Privileged Gateway Intents, enable:
    • Server Members Intent
    • Message Content Intent
  5. Copy the Token
  6. Go to OAuth2URL Generator
    • Scopes: bot
    • Bot Permissions: Administrator (or manually select: Manage Channels, Manage Roles, Kick Members, Manage Webhooks, Send Messages, Read Messages, View Channels)
  7. Open the generated URL in your browser to invite the bot to your server

2. Configure environment

cp .env.example .env

Edit .env and paste your bot token:

DISCORD_TOKEN=your_token_here

3. Install dependencies

pip install -r requirements.txt

MCP Host Configuration

opencode

Add to opencode.json in your project root:

{
  "mcp": {
    "discord": {
      "type": "local",
      "command": ["python", "/absolute/path/to/discord_mcp_server.py"]
    }
  }
}

Restart opencode to load the server.

Claude Desktop

Edit claude_desktop_config.json (File → Settings → Developer → Edit Config):

{
  "mcpServers": {
    "discord": {
      "command": "python",
      "args": ["/absolute/path/to/discord_mcp_server.py"],
      "env": {
        "DISCORD_TOKEN": "your_token_here"
      }
    }
  }
}

Claude Code

Add to ~/.claude.json or .mcp.json in your project:

{
  "mcpServers": {
    "discord": {
      "command": "python",
      "args": ["/absolute/path/to/discord_mcp_server.py"],
      "env": {
        "DISCORD_TOKEN": "your_token_here"
      }
    }
  }
}

Cursor

Create .cursor/mcp.json in your project root (or ~/.cursor/mcp.json for global):

{
  "mcpServers": {
    "discord": {
      "command": "python",
      "args": ["/absolute/path/to/discord_mcp_server.py"],
      "env": {
        "DISCORD_TOKEN": "your_token_here"
      }
    }
  }
}

Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "discord": {
      "command": "python",
      "args": ["/absolute/path/to/discord_mcp_server.py"],
      "env": {
        "DISCORD_TOKEN": "your_token_here"
      }
    }
  }
}

Codex CLI

Add to ~/.codex/config.toml:

[mcp_servers.discord]
command = "python"
args = ["/absolute/path/to/discord_mcp_server.py"]

[mcp_servers.discord.env]
DISCORD_TOKEN = "your_token_here"

Or add via CLI:

codex mcp add discord -- python /absolute/path/to/discord_mcp_server.py

Antigravity (Google)

Add to ~/.gemini/config/mcp_config.json:

{
  "mcpServers": {
    "discord": {
      "command": "python",
      "args": ["C:\\path\\to\\discord_mcp_server.py"],
      "env": {
        "DISCORD_TOKEN": "your_token_here"
      }
    }
  }
}

Open Antigravity → Agent panel → ... → MCP Servers → Manage MCP Servers → View raw config.

Note: If using the .env file instead of inline env, omit the env block and ensure load_dotenv() in the script finds your .env (the working directory depends on the host).

How it works

The script runs an MCP server over stdio that connects to Discord via the bot token. It registers all tools on startup, and your AI assistant calls them as needed. The Discord bot only needs to be in one server — it auto-selects the first guild on login.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured