Discord (Full API)
About
Integrates with Discord's API to enable flexible bot development and management through simplified REST and slash command interfaces.
Details
- Author
- hanweg
- Repository
- hanweg/mcp-discord-raw
- GitHub stars
- 7
- Downloads
- 375
- License
- MIT License
- Categories
- Community, Design, Developer Tools, AI, API, Communication, Frontend
- Tags
- #integration
Jump to
- Single tool for full Discord REST API access
- Supports both raw REST and slash command syntax
- Handles creation, modification, and querying of Discord resources
- Works with roles, channels, messages, members, and more
- Lightweight Python-based implementation using uv
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Discord (Full API)Command (node, npx, python, etc.)uvArguments-
Argument 1
--directory -
Argument 2
PATH/TO/mcp-discord-raw -
Argument 3
run -
Argument 4
discord-raw-mcp
Environment-
DISCORD_TOKEN
YOUR-BOT-TOKEN
Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
-
Argument 1
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
To install Discord Raw API for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @hanweg/mcp-discord-raw --client claude
1. Set up your Discord bot:
- Create a new application at Discord Developer Portal
- Create a bot and copy the token
- Enable required privileged intents:
- MESSAGE CONTENT INTENT
- PRESENCE INTENT
- SERVER MEMBERS INTENT
- Invite the bot to your server using OAuth2 URL Generator
2. Clone and install the package:
uv venv
.venv\Scripts\activate
uv pip install -e .
create_role
Create a role in a specified guild. Parameters: method (POST), endpoint (e.g., '/role create name:Moderator color:red permissions:moderate_members guild_id:123456789')
send_message
Send a message to a specified channel. Parameters: method (POST), endpoint (e.g., 'channels/123456789/messages'), payload (e.g., '{"content": "Hello from the API!"}')
get_server_information
Retrieve information about a specified server. Parameters: method (GET), endpoint (e.g., 'guilds/123456789')
create_category
Create a category in a specified guild. Parameters: method (POST), endpoint (e.g., 'guilds/{server_id}/channels'), payload (e.g., '{"name": "Category Name", "type": 4}')
create_text_channel
Create a text channel in a specified guild. Parameters: method (POST), endpoint (e.g., 'guilds/{server_id}/channels'), payload (e.g., '{"name": "channel-name", "type": 0, "parent_id": "category_id", "topic": "Channel description"}')
move_channel_to_category
Move a channel to a specified category. Parameters: method (PATCH), endpoint (e.g., 'channels/{channel_id}'), payload (e.g., '{"parent_id": "category_id"}')
assign_role
Assign a role to a specified member in a guild. Parameters: method (PUT), endpoint (e.g., 'guilds/{server_id}/members/{user_id}/roles/{role_id}'), payload (e.g., '{}')
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"discord (full api)": {
"env": {
"DISCORD_TOKEN": "YOUR-BOT-TOKEN"
},
"args": [
"--directory",
"PATH/TO/mcp-discord-raw",
"run",
"discord-raw-mcp"
],
"command": "uv"
}
}
}
Linux
{
"env": {
"DISCORD_TOKEN": "YOUR-BOT-TOKEN"
},
"args": [
"--directory",
"PATH/TO/mcp-discord-raw",
"run",
"discord-raw-mcp"
],
"command": "uv"
}
Macos
{
"env": {
"DISCORD_TOKEN": "YOUR-BOT-TOKEN"
},
"args": [
"--directory",
"PATH/TO/mcp-discord-raw",
"run",
"discord-raw-mcp"
],
"command": "uv"
}
Windows
{
"env": {
"DISCORD_TOKEN": "YOUR-BOT-TOKEN"
},
"args": [
"--directory",
"PATH/TO/mcp-discord-raw",
"run",
"discord-raw-mcp"
],
"command": "uv"
}
Discord Raw API MCP Server
This MCP server provides raw Discord API access through a single flexible tool. It supports both REST API calls and slash command syntax.
<a href="https://glama.ai/mcp/servers/ct3fi5s557"></a>
Installation
Installing via Smithery
To install Discord Raw API for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @hanweg/mcp-discord-raw --client claude
Manual Installation
1. Set up your Discord bot: - Create a new application at Discord Developer Portal - Create a bot and copy the token - Enable required privileged intents: - MESSAGE CONTENT INTENT - PRESENCE INTENT - SERVER MEMBERS INTENT - Invite the bot to your server using OAuth2 URL Generator2. Clone and install the package:
# Clone the repository
git clone https://github.com/hanweg/mcp-discord-raw.git
cd mcp-discord-raw
Create and activate virtual environment
uv venv
.venv\Scripts\activate
If using Python 3.13+ - install audioop library: uv pip install audioop-lts
Install the package
uv pip install -e .
Configuration
Add this to your claude_desktop_config.json
"discord-raw": {
"command": "uv",
"args": [
"--directory",
"PATH/TO/mcp-discord-raw",
"run",
"discord-raw-mcp"
],
"env": {
"DISCORD_TOKEN": "YOUR-BOT-TOKEN"
}
}
Usage
REST API Style
{
"method": "POST",
"endpoint": "guilds/123456789/roles",
"payload": {
"name": "Bot Master",
"permissions": "8",
"color": 3447003,
"mentionable": true
}
}
Slash Command Style
{
"method": "POST",
"endpoint": "/role create name:Bot_Master color:blue permissions:8 mentionable:true guild_id:123456789"
}
Examples
1. Create a role:
{
"method": "POST",
"endpoint": "/role create name:Moderator color:red permissions:moderate_members guild_id:123456789"
}
2. Send a message:
{
"method": "POST",
"endpoint": "channels/123456789/messages",
"payload": {
"content": "Hello from the API!"
}
}
3. Get server information:
{
"method": "GET",
"endpoint": "guilds/123456789"
}
Recommendations:
Put server, channel and user IDs and some examples in project knowledge to avoid having to remind the model of those, along with something like this to get it started:"Here's how to effectively use the Discord raw API tool:
The tool is called discord_api and takes three parameters:
1. method: HTTP method ("GET", "POST", "PUT", "PATCH", "DELETE")
2. endpoint: Discord API endpoint (e.g., "guilds/{guild.id}/roles")
3. payload: Optional JSON object for the request body
Key examples I've used:
1. Creating roles:
```
discord_api
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





