discord-mcp

discord-mcp

MCP server with over 70 tools to manage and maintain an entire Discord server.

Category
Visit Server

README

Discord MCP Server

License: ISC MCP Node.js

<a href="https://glama.ai/mcp/servers/@scarecr0w12/discord-mcp"> <img width="380" height="200" src="https://glama.ai/mcp/servers/@scarecr0w12/discord-mcp/badge" alt="Discord MCP server" /> </a>

A Model Context Protocol (MCP) server that provides comprehensive tools for managing Discord servers. This server uses HTTP transport with Server-Sent Events (SSE) for real-time communication.

Features

  • 50+ Discord Management Tools across 12 categories
  • HTTP Transport with StreamableHTTPServerTransport for easy integration
  • Session Management for concurrent MCP connections
  • Comprehensive Error Handling with detailed error messages
  • Graceful Shutdown handling

Prerequisites

  • Node.js 18+
  • A Discord Bot Token with appropriate permissions
  • Discord bot added to your server(s)

Installation

  1. Clone the repository:

    git clone https://github.com/scarecr0w12/discord-mcp.git
    cd discord-mcp
    
  2. Install dependencies:

    npm install
    
  3. Create a .env file from the example:

    cp .env.example .env
    
  4. Configure your Discord bot token in .env:

    DISCORD_BOT_TOKEN=your_bot_token_here
    PORT=3000
    
  5. Build the project:

    npm run build
    
  6. Start the server:

    npm start
    

Discord Bot Setup

Your Discord bot requires the following Gateway Intents enabled in the Discord Developer Portal:

  • GUILDS - Access to guild information
  • GUILD_MEMBERS - Access to member information (Privileged)
  • GUILD_MODERATION - Access to moderation events
  • GUILD_MESSAGES - Access to messages
  • GUILD_PRESENCES - Access to presence information (Privileged)
  • MESSAGE_CONTENT - Access to message content (Privileged)

Configuration

Environment Variable Description Default
DISCORD_BOT_TOKEN Your Discord bot token (required) -
PORT HTTP server port (HTTP mode only) 3000
MCP_TRANSPORT Transport mode (stdio or http) http

Usage

The server supports two transport modes:

HTTP Mode (Default)

Start the server in HTTP mode:

npm start

HTTP Endpoints

  • POST /mcp - MCP requests
  • GET /mcp - SSE stream for server-initiated messages
  • DELETE /mcp - Session cleanup
  • GET /health - Health check endpoint

VS Code MCP Configuration (HTTP)

Add to your .vscode/mcp.json:

{
  "servers": {
    "discord-mcp": {
      "type": "http",
      "url": "http://localhost:3000/mcp"
    }
  }
}

Stdio Mode

For use with Claude Desktop, Cline, or other MCP clients that use stdio transport:

npm start -- --stdio
# or
MCP_TRANSPORT=stdio npm start

Claude Desktop Configuration

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "discord-mcp": {
      "command": "node",
      "args": ["/path/to/discord-mcp/dist/index.js", "--stdio"],
      "env": {
        "DISCORD_BOT_TOKEN": "your_bot_token_here"
      }
    }
  }
}

Cline Configuration

Add to your Cline MCP settings:

{
  "mcpServers": {
    "discord-mcp": {
      "command": "node",
      "args": ["/path/to/discord-mcp/dist/index.js", "--stdio"],
      "env": {
        "DISCORD_BOT_TOKEN": "your_bot_token_here"
      }
    }
  }
}

Available Tools

Server Management

  • list_servers - List all Discord servers the bot has access to
  • get_server_info - Get detailed information about a specific server
  • modify_server - Modify server settings

Channel Management

  • list_channels - List all channels in a server
  • get_channel_info - Get detailed channel information
  • create_channel - Create a new channel
  • delete_channel - Delete a channel
  • modify_channel - Modify channel settings

Member Management

  • list_members - List server members
  • get_member_info - Get member details
  • modify_member - Modify member properties
  • kick_member - Kick a member from the server
  • ban_member - Ban a member
  • unban_member - Unban a member
  • list_bans - List all bans

Role Management

  • list_roles - List all roles
  • get_role_info - Get role details
  • create_role - Create a new role
  • delete_role - Delete a role
  • modify_role - Modify role settings
  • assign_role - Assign a role to a member
  • remove_role - Remove a role from a member

Permission Management

  • get_channel_permissions - Get channel permission overwrites
  • set_channel_permission - Set channel permissions
  • delete_channel_permission - Delete permission overwrites
  • list_permissions - List available permissions
  • sync_channel_permissions - Sync permissions with category

Message Management

  • send_message - Send a message to a channel
  • get_messages - Retrieve messages from a channel
  • edit_message - Edit a bot message
  • delete_message - Delete a message
  • bulk_delete_messages - Bulk delete messages (up to 100)
  • pin_message / unpin_message - Pin/unpin messages
  • get_pinned_messages - Get all pinned messages
  • add_reaction / remove_reactions - Manage reactions

Emoji & Sticker Management

  • list_emojis - List server emojis
  • create_emoji - Create a custom emoji
  • delete_emoji - Delete an emoji
  • modify_emoji - Modify emoji settings
  • Sticker operations (list, create, delete, modify)

Webhook Management

  • list_channel_webhooks / list_guild_webhooks - List webhooks
  • create_webhook - Create a webhook
  • delete_webhook - Delete a webhook
  • modify_webhook - Modify webhook settings
  • send_webhook_message - Send a message via webhook

Invite Management

  • list_invites - List server invites
  • get_invite_info - Get invite details
  • create_invite - Create an invite
  • delete_invite - Delete an invite

Event Management

  • list_events - List scheduled events
  • get_event_info - Get event details
  • create_event - Create a scheduled event
  • modify_event - Modify an event
  • delete_event - Delete an event
  • get_event_subscribers - Get event subscribers

Thread Management

  • list_threads - List threads in a channel or server
  • create_thread - Create a new thread
  • create_forum_post - Create a forum post
  • modify_thread - Modify thread settings
  • delete_thread - Delete/archive a thread
  • Thread join/leave and member management operations

Audit & Moderation

  • get_audit_logs - Retrieve server audit logs
  • list_audit_log_types - List available audit log action types
  • list_automod_rules - List AutoMod rules
  • get_automod_rule - Get AutoMod rule details
  • delete_automod_rule - Delete an AutoMod rule
  • toggle_automod_rule - Enable/disable an AutoMod rule

Development

# Run in development mode with hot reload
npm run dev

# Build the project
npm run build

# Start the production server
npm start

Attributions

This project is built with the following open-source libraries:

  • @modelcontextprotocol/sdk - Official MCP TypeScript SDK
  • discord.js - A powerful JavaScript library for interacting with the Discord API
  • Express - Fast, unopinionated, minimalist web framework for Node.js
  • Zod - TypeScript-first schema validation with static type inference
  • dotenv - Loads environment variables from .env file

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

ISC License - see the LICENSE file for details.

Author

Jacob Bowen - @scarecr0w12

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
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
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
VeyraX MCP

VeyraX MCP

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

Official
Featured
Local
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
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
Qdrant Server

Qdrant Server

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

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
E2B

E2B

Using MCP to run code via e2b.

Official
Featured