Explore a versatile Discord Raw API tool for seamless server management via REST and slash commands
The Discord Raw API MCP Server offers an extensive and flexible toolset to integrate raw Discord API access directly into AI applications, such as Claude Desktop, Continue, Cursor, and more. By leveraging the Model Context Protocol (MCP), this server acts as a bridge between these AI applications and the Discord platform, allowing seamless data exchange and command execution through a standardized interface.
The core capabilities of the Discord Raw API MCP Server include:
Users can execute both REST API calls and manage slash commands through various HTTP methods like POST, GET, PUT. The tool supports creating roles, sending messages, managing channels, and more, aligning with the comprehensive Discord API suite.
The server supports two primary command styles: REST API style for detailed, structured requests, and slash command syntax for streamlined, user-friendly interactions. This dual approach ensures that both developers and end-users can interact effectively with the platform.
At its heart, the Discord Raw API MCP Server adheres to the Model Context Protocol (MCP) architecture. The protocol flow diagram illustrates how AI applications connect through an MCP client to this server before accessing underlying resources or tools.
graph TD
A[AI Application] -->|MCP Client| B[MCP Protocol]
B --> C[MCP Server]
C --> D[Data Source/Tool]
style A fill:#e1f5fe
style C fill:#f3e5f5
style D fill:#e8f5e8
The data flow within this architecture ensures that the AI application can issue commands through MCP, which are then proxied by the server to interact with Discord's APIs. This process is optimized for efficiency and reliability.
To set up the Discord Raw API MCP Server automatically using Smithery:
npx -y @smithery/cli install @hanweg/mcp-discord-raw --client claude
Set Up Your Discord Bot
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 .
By integrating this MCP server, an AI application can monitor real-time events within a Discord server (like new member joins) and automate specific actions. This integration enhances user experience by providing dynamic and responsive interactions.
AI applications can use the API to create chat bots that provide personalized responses based on user input. For example, fetching information about events or users directly from Discord when queried.
The server is designed to work seamlessly with various MCP clients:
This compatibility matrix ensures that developers can choose the most suitable AI application client for their projects.
The following matrix outlines how well different MCP clients perform with this server, highlighting key features and support levels:
MCP Client | Resources | Tools | Prompts | Status |
---|---|---|---|---|
Claude Desktop | ✅ | ✅ | ✅ | Full Support |
Continue | ✅ | ✅ | ✅ | Full Support |
Cursor | ❌ | ✅ | ❌ | Tools Only |
Here's an example of how to configure the server in a 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"
}
}
Ensure that all environment variables are set securely and avoid hardcoding sensitive information.
Q: How do I ensure secure access to the Discord API?
A: Secure your bot token by using secure credentials storage methods, limiting the scope of tokens where possible, and following best security practices.
Q: Can I use this server with other MCP clients besides those listed in the compatibility matrix?
A: While not officially supported, some MCP clients might integrate with the server based on customization and configuration efforts. Check community support for updates.
Q: Are there any limitations to using this server with AI applications?
A: The main limitation is the requirement that your bot must have appropriate permissions enabled in the Discord Developer Portal.
Q: How can I optimize performance when making API calls from my AI application?
A: Optimize by batching requests together, reducing unnecessary calls, and ensuring proper rate limiting to avoid hitting API quotas or encountering rate limits.
Q: How do I troubleshoot connection issues with the Discord Raw API server in MCP?
A: Check logs for errors, verify environment variables are correctly set, and ensure network connectivity between your AI application and the server is stable and fast.
Contributors can contribute to this project by:
Feel free to join our community for discussions, support, and collaboration opportunities.
For more information on the broader MCP ecosystem and resources, visit:
These resources provide valuable insights into working with MCP across various applications and tools.
The protocol flow illustrates the interaction between the AI application, MCP client, server, and underlying data source:
graph TD
A[AI Application] -->|MCP Client| B[MCP Protocol]
B --> C[MCP Server]
C --> D[Data Source/Tool]
The matrix diagram visually highlights which MCP clients are supported for the Discord Raw API server:
graph LR
A[Claude Desktop] -->|✅ Resource, Tools, Prompts| B[MCP Server Full Support]
C[Continue] -->|✅ Resource, Tools, Prompts| D[MCP Server Full Support]
E[Cursor] -->|❌ Resources, Limited Tools| F[MCP Server Tools Only]
Example 1: Chat Bot Automation
Example 2: Event Monitoring & Notifications
By integrating the Discord Raw API MCP Server, developers can harness the full potential of AI applications to interact effectively with the vast capabilities of Discord, providing seamless and powerful integrations.
RuinedFooocus is a local AI image generator and chatbot image server for seamless creative control
Learn to set up MCP Airflow Database server for efficient database interactions and querying airflow data
Simplify MySQL queries with Java-based MysqlMcpServer for easy standard input-output communication
Build stunning one-page websites track engagement create QR codes monetize content easily with Acalytica
Access NASA APIs for space data, images, asteroids, weather, and exoplanets via MCP integration
Explore CoRT MCP server for advanced self-arguing AI with multi-LLM inference and enhanced evaluation methods