Connects to Discord through a bot so agents can send messages, manage channels and read server information.
接入配置
选择客户端,复制配置,再按项目文档补齐环境变量。
claude mcp add discord --env DISCORD_TOKEN='<DISCORD_TOKEN>' --env DISCORD_GUILD_ID='<DISCORD_GUILD_ID>' -- java -jar /absolute/path/to/discord-mcp-0.0.1-SNAPSHOT.jar~/.codex/config.toml
[mcp_servers.discord]
command = "java"
args = ["-jar", "/absolute/path/to/discord-mcp-0.0.1-SNAPSHOT.jar"]
env = { DISCORD_TOKEN = "<DISCORD_TOKEN>", DISCORD_GUILD_ID = "<DISCORD_GUILD_ID>" }
# codex mcp add discord --env DISCORD_TOKEN='<DISCORD_TOKEN>' --env DISCORD_GUILD_ID='<DISCORD_GUILD_ID>' -- java -jar /absolute/path/to/discord-mcp-0.0.1-SNAPSHOT.jar~/.cursor/mcp.json
{
"mcpServers": {
"discord": {
"command": "java",
"args": [
"-jar",
"/absolute/path/to/discord-mcp-0.0.1-SNAPSHOT.jar"
],
"env": {
"DISCORD_TOKEN": "<DISCORD_TOKEN>",
"DISCORD_GUILD_ID": "<DISCORD_GUILD_ID>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"discord": {
"type": "stdio",
"command": "java",
"args": [
"-jar",
"/absolute/path/to/discord-mcp-0.0.1-SNAPSHOT.jar"
],
"env": {
"DISCORD_TOKEN": "<DISCORD_TOKEN>",
"DISCORD_GUILD_ID": "<DISCORD_GUILD_ID>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"discord": {
"command": "java",
"args": [
"-jar",
"/absolute/path/to/discord-mcp-0.0.1-SNAPSHOT.jar"
],
"env": {
"DISCORD_TOKEN": "<DISCORD_TOKEN>",
"DISCORD_GUILD_ID": "<DISCORD_GUILD_ID>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"discord": {
"command": "java",
"args": [
"-jar",
"/absolute/path/to/discord-mcp-0.0.1-SNAPSHOT.jar"
],
"env": {
"DISCORD_TOKEN": "<DISCORD_TOKEN>",
"DISCORD_GUILD_ID": "<DISCORD_GUILD_ID>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"discord": {
"command": "java",
"args": [
"-jar",
"/absolute/path/to/discord-mcp-0.0.1-SNAPSHOT.jar"
],
"env": {
"DISCORD_TOKEN": "<DISCORD_TOKEN>",
"DISCORD_GUILD_ID": "<DISCORD_GUILD_ID>"
}
}
}
}需要的环境变量
DISCORD_TOKENDISCORD_GUILD_ID
把占位值换成你自己的密钥;不要把密钥提交到代码仓库。