discord-mcp
MCP server with over 70 tools to manage and maintain an entire Discord server.
README
Discord MCP Server
<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
-
Clone the repository:
git clone https://github.com/scarecr0w12/discord-mcp.git cd discord-mcp -
Install dependencies:
npm install -
Create a
.envfile from the example:cp .env.example .env -
Configure your Discord bot token in
.env:DISCORD_BOT_TOKEN=your_bot_token_here PORT=3000 -
Build the project:
npm run build -
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 requestsGET /mcp- SSE stream for server-initiated messagesDELETE /mcp- Session cleanupGET /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 toget_server_info- Get detailed information about a specific servermodify_server- Modify server settings
Channel Management
list_channels- List all channels in a serverget_channel_info- Get detailed channel informationcreate_channel- Create a new channeldelete_channel- Delete a channelmodify_channel- Modify channel settings
Member Management
list_members- List server membersget_member_info- Get member detailsmodify_member- Modify member propertieskick_member- Kick a member from the serverban_member- Ban a memberunban_member- Unban a memberlist_bans- List all bans
Role Management
list_roles- List all rolesget_role_info- Get role detailscreate_role- Create a new roledelete_role- Delete a rolemodify_role- Modify role settingsassign_role- Assign a role to a memberremove_role- Remove a role from a member
Permission Management
get_channel_permissions- Get channel permission overwritesset_channel_permission- Set channel permissionsdelete_channel_permission- Delete permission overwriteslist_permissions- List available permissionssync_channel_permissions- Sync permissions with category
Message Management
send_message- Send a message to a channelget_messages- Retrieve messages from a channeledit_message- Edit a bot messagedelete_message- Delete a messagebulk_delete_messages- Bulk delete messages (up to 100)pin_message/unpin_message- Pin/unpin messagesget_pinned_messages- Get all pinned messagesadd_reaction/remove_reactions- Manage reactions
Emoji & Sticker Management
list_emojis- List server emojiscreate_emoji- Create a custom emojidelete_emoji- Delete an emojimodify_emoji- Modify emoji settings- Sticker operations (list, create, delete, modify)
Webhook Management
list_channel_webhooks/list_guild_webhooks- List webhookscreate_webhook- Create a webhookdelete_webhook- Delete a webhookmodify_webhook- Modify webhook settingssend_webhook_message- Send a message via webhook
Invite Management
list_invites- List server invitesget_invite_info- Get invite detailscreate_invite- Create an invitedelete_invite- Delete an invite
Event Management
list_events- List scheduled eventsget_event_info- Get event detailscreate_event- Create a scheduled eventmodify_event- Modify an eventdelete_event- Delete an eventget_event_subscribers- Get event subscribers
Thread Management
list_threads- List threads in a channel or servercreate_thread- Create a new threadcreate_forum_post- Create a forum postmodify_thread- Modify thread settingsdelete_thread- Delete/archive a thread- Thread join/leave and member management operations
Audit & Moderation
get_audit_logs- Retrieve server audit logslist_audit_log_types- List available audit log action typeslist_automod_rules- List AutoMod rulesget_automod_rule- Get AutoMod rule detailsdelete_automod_rule- Delete an AutoMod ruletoggle_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.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
ISC License - see the LICENSE file for details.
Author
Jacob Bowen - @scarecr0w12
Recommended Servers
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
E2B
Using MCP to run code via e2b.