Discord Mcp

建立者SaseQSaseQ

一個用於 Discord 整合的 MCP 伺服器。讓你的 AI 助手能夠無縫地與 Discord 互動。通過強大的自動化功能提升你的 Discord 體驗。

概覽

什麼是 Discord-MCP?

Discord-MCP 是一個強大的伺服器,旨在與 Discord 整合,實現 AI 助手與 Discord 平台之間的無縫互動。這個工具通過自動化各種任務和提供先進的功能,提升用戶體驗,簡化 Discord 社區內的溝通和互動。

Discord-MCP 的功能

  • AI 整合:允許 AI 助手直接與 Discord 互動,提供即時回應和協助。
  • 自動化能力:自動化重複性任務,使用戶更容易管理他們的 Discord 伺服器。
  • 友好的介面:以簡單為設計理念,讓所有技能水平的用戶都能輕鬆使用。
  • 開源:作為一個公共庫,用戶可以參與其開發並根據需要進行自定義。
  • 社區支持:一個不斷增長的用戶和開發者社區,分享使用 Discord-MCP 的技巧、竅門和支持。

如何使用 Discord-MCP

  1. 安裝:從 GitHub 克隆庫並按照 README 文件中的安裝說明進行操作。
  2. 配置:設置你的 Discord 機器人並配置必要的權限,以允許其與你的伺服器互動。
  3. 整合:將你的 AI 助手連接到 Discord-MCP,使其能夠回應命令和消息。
  4. 自定義:根據需要修改代碼,以調整功能以符合你的具體要求。
  5. 互動:開始在 Discord 中使用你的 AI 助手,增強互動並自動化任務,提供更流暢的體驗。

常見問題

問:Discord-MCP 是免費使用的嗎?

答:是的,Discord-MCP 是一個開源項目,免費使用。

問:我可以為這個項目做貢獻嗎?

答:當然可以!歡迎貢獻。你可以分叉庫,進行更改,並提交拉取請求。

問:Discord-MCP 使用了哪些編程語言?

答:Discord-MCP 主要使用 JavaScript 和 Node.js 構建。

問:我該如何報告問題或錯誤?

答:你可以通過在 GitHub 庫的 "Issues" 標籤下創建新問題來報告問題。

問:我可以在哪裡找到 Discord-MCP 的文檔?

答:文檔可在庫的 README 文件中找到,並通過社區論壇和討論獲得。

通過使用 Discord-MCP,用戶可以顯著提升他們的 Discord 體驗,使互動更加高效和愉快。

詳細

<div align="center"> <img src="assets/img/Discord_MCP_full_logo.svg" width="60%" alt="DeepSeek-V3" /> </div> <hr> <div align="center" style="line-height: 1;"> <a href="https://github.com/modelcontextprotocol/servers" target="_blank" style="margin: 2px;"> <img alt="MCP Server" src="https://badge.mcpx.dev?type=server" style="display: inline-block; vertical-align: middle;"/> </a> <a href="https://smithery.ai/server/@SaseQ/discord-mcp" target="_blank" style="margin: 2px;"> <img alt="Smithery Badge" src="https://camo.githubusercontent.com/ee5c6c6dc502821f4d57313b2885f7878af52be14142dd98526ea12aedf9b260/68747470733a2f2f736d6974686572792e61692f62616467652f40646d6f6e74676f6d65727934302f646565707365656b2d6d63702d736572766572" data-canonical-src="https://smithery.ai/server/@SaseQ/discord-mcp" style="display: inline-block; vertical-align: middle;"/> </a> <a href="https://discord.gg/5Uvxe5jteM" target="_blank" style="margin: 2px;"> <img alt="Discord" src="https://img.shields.io/discord/936242526120194108?color=7389D8&label&logo=discord&logoColor=ffffff" style="display: inline-block; vertical-align: middle;"/> </a> <a href="https://github.com/SaseQ/discord-mcp/blob/main/LICENSE" target="_blank" style="margin: 2px;"> <img alt="MIT License" src="https://img.shields.io/github/license/SaseQ/discord-mcp" style="display: inline-block; vertical-align: middle;"/> </a> </div>

📖 Description

A Model Context Protocol (MCP) server for the Discord API (JDA), allowing seamless integration of Discord Bot with MCP-compatible applications like Claude Desktop.

Enable your AI assistants to seamlessly interact with Discord. Manage channels, send messages, and retrieve server information effortlessly. Enhance your Discord experience with powerful automation capabilities.

🔬 Installation

► 🐳 Docker Installation (Recommended)

NOTE: Docker installation is required. Full instructions can be found on docker.com.

{
  "mcpServers": {
    "mcp-server": {
      "command": "docker",
      "args": [
        "run", "--rm", "-i",
        "-e", "DISCORD_TOKEN=<YOUR_DISCORD_BOT_TOKEN>",
        "-e", "DISCORD_GUILD_ID=<OPTIONAL_DEFAULT_SERVER_ID>",
        "saseq/discord-mcp:latest"
      ]
    }
  }
}
<details> <summary style="font-size: 1.35em; font-weight: bold;"> 🔧 Manual Installation </summary>
Clone the repository
git clone https://github.com/SaseQ/discord-mcp
Build the project

NOTE: Maven installation is required to use the mvn command. Full instructions can be found here.

cd discord-mcp
mvn clean package # The jar file will be available in the /target directory
Configure AI client

Many code editors and other AI clients use a configuration file to manage MCP servers.

The Discord MPC server can be configured by adding the following to your configuration file.

NOTE: You will need to create a Discord Bot token to use this server. Instructions on how to create a Discord Bot token can be found here.

{
  "mcpServers": {
    "discord-mcp": {
      "command": "java",
      "args": [
        "-jar",
        "/absolute/path/to/discord-mcp-0.0.1-SNAPSHOT.jar"
      ],
      "env": {
        "DISCORD_TOKEN": "YOUR_DISCORD_BOT_TOKEN",
        "DISCORD_GUILD_ID": "OPTIONAL_DEFAULT_SERVER_ID"
      }
    }
  }
}

The DISCORD_GUILD_ID environment variable is optional. When provided, it sets a default Discord server ID so any tool that accepts a guildId parameter can omit it.

</details> <details> <summary style="font-size: 1.35em; font-weight: bold;"> ⚓ Smithery Installation </summary>

Install Discord MCP Server automatically via Smithery:

npx -y @smithery/cli@latest install @SaseQ/discord-mcp --client <CLIENT_NAME> --key <YOUR_SMITHERY_KEY>
</details> <details> <summary style="font-size: 1.35em; font-weight: bold;"> 🖲 Cursor Installation </summary>

Go to: Settings -> Cursor Settings -> MCP -> Add new global MCP server

Pasting the following configuration into your Cursor ~/.cursor/mcp.json file is the recommended approach. You may also install in a specific project by creating .cursor/mcp.json in your project folder. See Cursor MCP docs for more info.

{
  "mcpServers": {
    "mcp-server": {
      "command": "docker",
      "args": [
        "run", "--rm", "-i",
        "-e", "DISCORD_TOKEN=<YOUR_DISCORD_BOT_TOKEN>",
        "-e", "DISCORD_GUILD_ID=<OPTIONAL_DEFAULT_SERVER_ID>",
        "saseq/discord-mcp:latest"
      ]
    }
  }
}
</details> <details> <summary style="font-size: 1.35em; font-weight: bold;"> ⌨️ Claude Code Installation </summary>

Run this command. See Claude Code MCP docs for more info.

claude mcp add mcp-server -- docker run --rm -i -e DISCORD_TOKEN=<YOUR_DISCORD_BOT_TOKEN> -e DISCORD_GUILD_ID=<OPTIONAL_DEFAULT_SERVER_ID> saseq/discord-mcp:latest
</details>

🛠️ Available Tools

Server Information
User Management
Message Management
Channel Management
Category Management
Webhook Management

If DISCORD_GUILD_ID is set, the guildId parameter becomes optional for all tools above.

<hr>

A more detailed examples can be found in the Wiki.

伺服器配置

{
  "mcpServers": {
    "discord-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/metorial/mcp-container--saseq--discord-mcp--discord-mcp",
        "java -Dserver.port=$PORT $JAVA_OPTS -jar target/*jar"
      ],
      "env": {
        "DISCORD_TOKEN": "discord-token"
      }
    }
  }
}

專案資訊

作者
SaseQ
Category
通訊
建立於
Sept 15, 2025
星標
68
語言
Java

Discord Mcp 替代方案

若您需要Discord Mcp 的一些替代方案,我們依分類為您提供相關網站。

Mcp 伺服器用於對講機

Unichat Mcp 伺服器在 Python 中

簡介
Unichat 是一個簡單的聊天伺服器,使用 Python 編寫,允許多個用戶連接並進行即時通訊。

安裝
首先,確保你已經安裝了 Python。然後,你可以使用 pip 安裝所需的庫:

```bash
pip install socket
```

伺服器代碼
以下是建立 Unichat Mcp 伺服器的基本代碼:

```python
import socket
import threading

設定伺服器的 IP 和端口
HOST = '127.0.0.1'
PORT = 12345

儲存連接的客戶端
clients = []

def handle_client(client_socket, addr):
    print(f"連接來自 {addr}")
    clients.append(client_socket)
    
    while True:
        try:
            message = client_socket.recv(1024).decode('utf-8')
            if message:
                print(f"來自 {addr} 的消息: {message}")
                broadcast(message, client_socket)
            else:
                break
        except:
            break
    
    client_socket.close()
    clients.remove(client_socket)
    print(f"{addr} 斷開連接")

def broadcast(message, client_socket):
    for client in clients:
        if client != client_socket:
            client.send(message.encode('utf-8'))

def start_server():
    server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    server.bind((HOST, PORT))
    server.listen()
    print(f"伺服器啟動,監聽 {HOST}:{PORT}")

    while True:
        client_socket, addr = server.accept()
        thread = threading.Thread(target=handle_client, args=(client_socket, addr))
        thread.start()

if __name__ == "__main__":
    start_server()
```

運行伺服器
將上述代碼保存為 `unichat_server.py`,然後在終端中運行:

```bash
python unichat_server.py
```

客戶端連接
你可以使用任何支持 TCP 的客戶端來連接這個伺服器,例如使用 telnet 或自定義的 Python 客戶端。

結論
這是一個簡單的 Unichat Mcp 伺服器示例,使用 Python 和 socket 庫來實現基本的聊天功能。你可以根據需要擴展和改進這個伺服器。

Unichat Mcp 伺服器在 Python 中 簡介 Unichat 是一個簡單的聊天伺服器,使用 Python 編寫,允許多個用戶連接並進行即時通訊。 安裝 首先,確保你已經安裝了 Python。然後,你可以使用 pip 安裝所需的庫: ```bash pip install socket ``` 伺服器代碼 以下是建立 Unichat Mcp 伺服器的基本代碼: ```python import socket import threading 設定伺服器的 IP 和端口 HOST = '127.0.0.1' PORT = 12345 儲存連接的客戶端 clients = [] def handle_client(client_socket, addr): print(f"連接來自 {addr}") clients.append(client_socket) while True: try: message = client_socket.recv(1024).decode('utf-8') if message: print(f"來自 {addr} 的消息: {message}") broadcast(message, client_socket) else: break except: break client_socket.close() clients.remove(client_socket) print(f"{addr} 斷開連接") def broadcast(message, client_socket): for client in clients: if client != client_socket: client.send(message.encode('utf-8')) def start_server(): server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server.bind((HOST, PORT)) server.listen() print(f"伺服器啟動,監聽 {HOST}:{PORT}") while True: client_socket, addr = server.accept() thread = threading.Thread(target=handle_client, args=(client_socket, addr)) thread.start() if __name__ == "__main__": start_server() ``` 運行伺服器 將上述代碼保存為 `unichat_server.py`,然後在終端中運行: ```bash python unichat_server.py ``` 客戶端連接 你可以使用任何支持 TCP 的客戶端來連接這個伺服器,例如使用 telnet 或自定義的 Python 客戶端。 結論 這是一個簡單的 Unichat Mcp 伺服器示例,使用 Python 和 socket 庫來實現基本的聊天功能。你可以根據需要擴展和改進這個伺服器。

@amidabuddha

Unichat Mcp 伺服器

一個桌面聊天應用程式,利用MCP(模型上下文協議)與其他大型語言模型(LLMs)進行接口。

Agentmail 工具包

第二快的AI聊天機器人™

MCP 類型機器人

查看更多 >>