Discord Mcp
概览
什么是 Discord-MCP?
Discord-MCP 是一个强大的服务器,旨在与 Discord 集成,使 AI 助手与 Discord 平台之间实现无缝互动。该工具通过自动化各种任务和提供先进功能,增强用户体验,从而简化 Discord 社区内的沟通和互动。
Discord-MCP 的特点
- AI 集成:允许 AI 助手直接与 Discord 互动,提供实时响应和帮助。
- 自动化功能:自动化重复任务,使用户更容易管理他们的 Discord 服务器。
- 用户友好的界面:设计简洁,适合所有技能水平的用户使用。
- 开源:作为一个公共仓库,用户可以参与其开发并根据需要进行定制。
- 社区支持:一个不断壮大的用户和开发者社区,分享使用 Discord-MCP 的技巧、窍门和支持。
如何使用 Discord-MCP
- 安装:从 GitHub 克隆仓库,并按照 README 文件中的安装说明进行操作。
- 配置:设置您的 Discord 机器人,并配置必要的权限以允许其与您的服务器互动。
- 集成:将您的 AI 助手连接到 Discord-MCP,使其能够响应命令和消息。
- 自定义:根据需要修改代码,以便将功能调整为您的特定要求。
- 互动:开始在 Discord 中使用您的 AI 助手,增强互动并自动化任务,以获得更顺畅的体验。
常见问题解答
问:Discord-MCP 是免费使用的吗?
答:是的,Discord-MCP 是一个开源项目,免费使用。
问:我可以为该项目做贡献吗?
答:当然可以!欢迎贡献。您可以分叉仓库,进行更改,并提交拉取请求。
问:Discord-MCP 使用了哪些编程语言?
答:Discord-MCP 主要使用 JavaScript 和 Node.js 构建。
问:我该如何报告问题或错误?
答:您可以通过在 GitHub 仓库的“问题”标签下创建新问题来报告。
问:我在哪里可以找到 Discord-MCP 的文档?
答:文档可在仓库的 README 文件中找到,也可以通过社区论坛和讨论获取。
通过使用 Discord-MCP,用户可以显著提升他们的 Discord 体验,使互动更加高效和愉快。
详情
📖 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.
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
get_server_info
: Get detailed discord server information
User Management
get_user_id_by_name
: Get a Discord user's ID by username in a guild for ping usage<@id>
send_private_message
: Send a private message to a specific useredit_private_message
: Edit a private message from a specific userdelete_private_message
: Delete a private message from a specific userread_private_messages
: Read recent message history from a specific user
Message Management
send_message
: Send a message to a specific channeledit_message
: Edit a message from a specific channeldelete_message
: Delete a message from a specific channelread_messages
: Read recent message history from a specific channeladd_reaction
: Add a reaction (emoji) to a specific messageremove_reaction
: Remove a specified reaction (emoji) from a message
Channel Management
create_text_channel
: Create text a channeldelete_channel
: Delete a channelfind_channel
: Find a channel type and ID using name and server IDlist_channels
: List of all channels
Category Management
create_category
: Create a new category for channelsdelete_category
: Delete a categoryfind_category
: Find a category ID using name and server IDlist_channels_in_category
: List of channels in a specific category
Webhook Management
create_webhook
: Create a new webhook on a specific channeldelete_webhook
: Delete a webhooklist_webhooks
: List of webhooks on a specific channelsend_webhook_message
: Send a message via webhook
<hr>If
DISCORD_GUILD_ID
is set, theguildId
parameter becomes optional for all tools above.
A more detailed examples can be found in the Wiki.
Server配置
{
"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"
}
}
}
}