Skip to main content

Discord MCP Server - Model Context Protocol server for Discord API integration

Project description

Discord MCP Server

Discord MCP Server provides Discord API integration for MCP-compatible AI models through a simple, secure server.

🚀 Quick Start with uvx (Recommended)

The easiest way to use Discord MCP Server is with uvx - no installation required:

# Set your Discord bot token
export DISCORD_TOKEN="your_bot_token_here"

# Run directly with uvx (no installation needed!)
uvx discord-mcp

🛠 Alternative Installation Methods

Using pipx

pipx install discord-mcp
export DISCORD_TOKEN="your_bot_token_here"
discord-mcp

Using pip

pip install discord-mcp
export DISCORD_TOKEN="your_bot_token_here" 
discord-mcp

Development Installation

git clone https://github.com/defi-wonderland/discord-mcp
cd discord-mcp
uv add mcp httpx python-dotenv
cp .env.example .env  # Add your Discord token
uv run python -m discord_mcp

🔧 Discord Bot Setup

  1. Go to https://discord.com/developers/applications
  2. Create a new application and bot
  3. Copy the bot token to your environment or .env file
  4. Invite the bot to your server with these permissions:
    • View Channels
    • Send Messages
    • Read Message History
    • Add Reactions
    • Create Public Threads

🔨 Available Tools (12 Total)

Message Operations

  • send_message - Send messages with mentions, formatting, and replies
  • get_messages - Retrieve message history with pagination
  • add_reaction - Add emoji reactions to messages

Channel Management

  • list_channels - List server channels with type filtering
  • get_channel_info - Get detailed channel information

Thread Discovery & Management

  • create_thread - Create new discussion threads
  • list_threads - Discover active threads in channels
  • list_archived_threads - Find archived threads (public/private)
  • join_thread - Join existing threads
  • get_thread_members - View thread membership

Server Information

  • get_server_info - Get server details and member counts
  • list_servers - List all accessible Discord servers

✨ Features

  • Zero Installation: Run directly with uvx discord-mcp
  • Direct REST API: No persistent bot process required
  • Comprehensive Error Handling: Helpful error messages with permission hints
  • Discord Formatting: Full support for markdown and mentions
  • Thread Management: Complete thread discovery and interaction
  • Secure: Minimal permissions, read-only server access
  • MCP Standard: Compatible with Claude Desktop and other MCP clients

🔗 Integration with MCP Clients

Claude Desktop

Add to your Claude Desktop MCP configuration:

{
  "mcpServers": {
    "discord": {
      "command": "uvx",
      "args": ["discord-mcp"],
      "env": {
        "DISCORD_TOKEN": "your_bot_token_here"
      }
    }
  }
}

Other MCP Clients

The server communicates via stdio and follows the MCP protocol standard.

📝 Usage Examples

Send a Message with Mentions

{
  "tool": "send_message",
  "arguments": {
    "channel_id": "123456789",
    "content": "Hello <@987654321>! Check out <#555666777>"
  }
}

Create and Manage Threads

{
  "tool": "create_thread", 
  "arguments": {
    "channel_id": "123456789",
    "name": "Discussion Thread"
  }
}

🤝 Contributing

This project is open source and contributions are welcome! See the repository for development setup and contribution guidelines.

📄 License

MIT License - see LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wonderland_discord_mcp-0.1.0.tar.gz (59.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wonderland_discord_mcp-0.1.0-py3-none-any.whl (67.0 kB view details)

Uploaded Python 3

File details

Details for the file wonderland_discord_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: wonderland_discord_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 59.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.18

File hashes

Hashes for wonderland_discord_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 de3ea4fbb44f7ca9fc635837b314c7bd66acb13a35c2482088b8cb3a4f5934fa
MD5 d0a74f84aaa62b5a09a223e13dee944d
BLAKE2b-256 fa3d230ad49db699820310185fff7b71d2bc22f7f374db3c7258c30207f049d3

See more details on using hashes here.

File details

Details for the file wonderland_discord_mcp-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for wonderland_discord_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 62dc6cce92b2887fa83d1f33963e4a118850551552bbf9306289236231611ced
MD5 c59a3e80374e480dfb9c66e1b4934c31
BLAKE2b-256 93a60f27c83ac5333b156d3d8672ac3302c32ef06384807f6680fed967f6184a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page