Connector ID:
mcp-discord · Type: mcp_server · Catalog entry: src/gaia/connectors/catalog/mcp_servers.pyWhat you’ll need
The connector is an MCP server. GAIA startsmcp-discord through npx
(pinned to [email protected]) when an agent needs it, and the agents you
grant it to can list channels, read messages, and send messages in every
Discord server your bot has joined.
It needs one secret: a Discord bot token. It lives in your OS keyring,
and the server gets it through a $keyring reference when it starts.
Step 1 — Create a bot and copy its token
- Open the Discord Developer Portal → New Application.
- Under Bot, click Reset Token and copy it. Discord shows it only once.
- On the same page, turn on Message Content Intent. Without it the bot can’t log in.
- Under OAuth2 → URL Generator, tick the
botscope and the View Channels, Read Message History, Send Messages, and Add Reactions permissions. Open the generated URL and add the bot to your server. A bot sees only the servers it has been added to.
Step 2 — Configure GAIA
From the CLI:- Launch the Agent UI:
gaia chat --ui. - Settings (gear) → Connectors → click the Discord tile.
- Paste the token into the Discord Bot Token field and click Save.
$keyring
reference into ~/.gaia/mcp_servers.json. The token is never written to disk
in plaintext.
Step 3 — Use it
Grant and activate the connector for each agent that should use it. The grant lets the agent use the credential; activation makes the tools visible to it, and is off by default:discord_get_server_info to look up the channel IDs, then
discord_read_messages or discord_send.
Common issues
Used disallowed intents / login failed
Message Content Intent is off. Turn it on in the Developer Portal; you
don’t need a new token.
Missing Access when reading a channel
The bot’s role can’t see that channel. Give it View Channels and
Read Message History there.
npx: command not found
mcp-discord is started through npx. Install Node 18+ and make sure npx
is on your PATH.
Revoking access
- From GAIA: Settings → Connectors → Discord → Disconnect (or
gaia connectors disconnect mcp-discord). This deletes the token from the keyring, removes the entry frommcp_servers.json, and clears every per-agent grant. - From Discord: reset the token under Bot in the Developer Portal, or kick the bot from your server.