Discord Raw API

@hanweg/mcp-discord-raw

Provides raw Discord API access for REST API calls and slash commands.

This MCP server provides raw Discord API access through a single flexible tool. It supports both REST API calls and slash command syntax.

Configuration

Add this to your claude_desktop_config.json:

Usage

REST API Style

Slash Command Style

Examples

  1. Create a role:
  1. Send a message:
  1. Get server information:

Recommendations

Put server, channel, and user IDs and some examples in project knowledge to avoid having to remind the model of those. 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:

  1. Creating roles:
discord_api method: POST endpoint: guilds/\{server_id\}/roles payload: { "name": "Role Name", "color": 3447003, // Blue color in decimal "mentionable": true }
  1. Creating categories and channels:
// Category discord_api method: POST endpoint: guilds/\{server_id\}/channels payload: { "name": "Category Name", "type": 4 // 4 = category } // Text channel in category discord_api method: POST endpoint: guilds/\{server_id\}/channels payload: { "name": "channel-name", "type": 0, // 0 = text channel "parent_id": "category_id", "topic": "Channel description" }
  1. Moving channels to categories:
discord_api method: PATCH endpoint: channels/\{channel_id\} payload: { "parent_id": "category_id" }
  1. Sending messages:
discord_api method: POST endpoint: channels/\{channel_id\}/messages payload: { "content": "Message text with emojis 😄" }
  1. Assigning roles:
discord_api method: PUT endpoint: guilds/\{server_id\}/members/\{user_id\}/roles/\{role_id\} payload: {}

The tool supports the full Discord API, so you can reference the Discord API documentation for more endpoints and features. The responses include IDs and other metadata you can use for subsequent requests.

Pro tips:

  • Save IDs returned from creation requests to use in follow-up requests.
  • Channel types: 0 = text, 2 = voice, 4 = category, 13 = stage.
  • Role colors are in decimal format (not hex).
  • Most modification endpoints use PATCH method.
  • Empty payloads should be {} not null.

Installation

Install Command

Integrate this tool for Claude Desktop.

Report Bug

Server Statistics

LocalNo
Published1/6/2025