discord-admin-mcp
by kfus
README.md
# Discord Admin MCP
A Model Context Protocol (MCP) server that empowers your AI assistants with full administrative control over your Discord server. It acts as a bridge between LLMs (like Claude) and the Discord API, allowing you to manage roles, channels, members, messages, and security configurations autonomously or via natural language commands.
## ✨ Features
- **Server Insights:** Instantly retrieve server stats, member counts, and general configuration data.
- **Channel Management:** Create, delete, edit, clone, and reorganize text and voice channels, including categories.
- **Role Administration:** Create, assign, remove, and manage roles dynamically. Set precise permissions and hoist settings.
- **Moderation Tools:** Kick, ban, timeout, server mute, server deafen, and fetch detailed member info.
- **Advanced Automation:** Easily extensible to add permanent event listeners (e.g., AFK channel auto-muting, welcome messages).
- **Secure by Default:** Connects safely via standard MCP `stdio` transport.
## 🛠️ Requirements
- Node.js (v18+)
- A Discord Account
- A Discord Developer Application
## 📥 Installation
Clone the repository and install the dependencies:
```bash
git clone https://github.com/YOUR_GITHUB_USERNAME/discord-admin-mcp.git
cd discord-admin-mcp
npm install
```
## ⚙️ Configuration
Before running the server, you must provide it with your Discord Bot Token and Server (Guild) ID.
### 1. Create a Discord Application
1. Go to the [Discord Developer Portal](https://discord.com/developers/applications).
2. Click **New Application** and give it a name (e.g., "MCP Admin").
### 2. Create the Bot & Get the Token
1. In your application, navigate to the **Bot** tab on the left menu.
2. Under **Privileged Gateway Intents**, enable **ALL** intents (Presence, Server Members, Message Content).
3. Click **Reset Token** and copy the new **Bot Token**.
### 3. Get the Application & Guild IDs
1. Navigate to the **OAuth2 > General** tab to copy your **Client ID** (Application ID).
2. To get your **Guild ID** (Server ID), open Discord, go to Advanced Settings, enable **Developer Mode**, then right-click your Server icon and select **Copy Server ID**.
### 4. Setup `.env`
Rename the provided `.env.example` file to `.env` and paste your copied values:
```env
DISCORD_TOKEN=your_bot_token_here
GUILD_ID=your_server_id_here
CLIENT_ID=your_client_id_here
```
### 5. Invite the Bot to Your Server
Generate an invite link by replacing `YOUR_CLIENT_ID` in the following URL with your actual Client ID:
`https://discord.com/oauth2/authorize?client_id=YOUR_CLIENT_ID&permissions=8&integration_type=0&scope=bot`
*(This link requests Administrator permissions to ensure the bot can fully manage the server).*
## 🚀 Usage
Once configured, build and start the server:
```bash
npm run build
npm start
```
The server will connect to Discord and start listening for MCP requests on `stdio`!
## 📜 License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
This server cannot be deployed
Maintenance
ActivitySlowing
ResponsivenessNo issues