agy-discord-mcp
Provides tools for replying to messages, sending messages with file attachments, adding reactions, fetching channel history, downloading attachments, and managing a pending message queue, enabling the agy CLI to interact with Discord.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@agy-discord-mcpsend a message to #general saying 'Hello everyone!'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
agy-discord-mcp
Discord bridge and MCP tools for the agy (Antigravity) CLI. It connects a Discord bot to agy in two ways:
botrelay — inbound Discord messages are sent toagy --printand agy's reply is posted back (text only).mcpmode — exposes Discord tools (reply, send_message with file attachments, react, fetch history, download attachments, …) to an interactive agy session over stdio, so agy can talk to Discord itself — including posting generated images.
It is a sibling of codex-discord-mcp, ported to agy. Because agy --print writes a clean response straight to stdout (no JSON to parse) and agy saves generated images as real files on disk, the bridge is a little simpler than the Codex original.
Requirements
Node.js >= 20
The
agy(Antigravity) CLI installed and authenticated (check withagy --version)A Discord bot token (with the Message Content intent enabled)
Related MCP server: discord-mcp-agent
Install
npm install
npm run build
npm link # optional: exposes the `agy-discord-mcp` command globallyConfigure
Store your Discord bot token (written to ~/.agy/discord/.env, mode 600):
agy-discord-mcp configure <bot-token>
# or interactively:
agy-discord-mcp initInvite the bot and check local status:
agy-discord-mcp invite-url <discord-client-id>
agy-discord-mcp doctorAccess control
Inbound access is allowlist/pairing based and managed only from the CLI — never from Discord messages:
agy-discord-mcp access show
agy-discord-mcp access policy <pairing|allowlist|disabled>
agy-discord-mcp access allow-user <discord-user-id>
agy-discord-mcp access allow-channel <channel-id> [--no-mention] [--allow-user <id>...]
agy-discord-mcp access pair <code> # approve a DM pairing codeUnder the default pairing policy, the first DM from an unknown user returns a one-time code; run access pair <code> on the host to approve them.
bot relay mode
agy-discord-mcp botEach allowed message becomes agy --print "<prompt>" run in AGY_WORKDIR, and the trimmed stdout is posted back. Set AGY_RESUME_BY_CHANNEL=true to keep a per-channel agy conversation (resumed via --conversation <id>, detected from agy's conversations directory).
agy is launched through its wrapper, which auto-injects
--dangerously-skip-permissions— every tool call is auto-approved. Treat Discord input as untrusted: run in an isolated workspace, setAGY_SANDBOX=1, or acknowledge the risk withAGY_DISCORD_ASSUME_YES=true.
mcp mode (agy drives Discord)
Register the MCP server by merging a mcpServers block into ~/.gemini/settings.json (or ~/.gemini/antigravity-cli/settings.json). Generate it with:
agy-discord-mcp print-config # node + absolute path form
agy-discord-mcp print-config --npx # npx formExample (agy-mcp-config.example.json):
{
"mcpServers": {
"discord": {
"command": "node",
"args": ["/path/to/agy-discord-mcp/dist/cli.js", "mcp"],
"timeout": 60000,
"trust": true
}
}
}Then run agy normally; it can call the Discord tools below. Inbound Discord messages are queued — poll with list_pending_messages, reply, then mark_message_handled.
Sending images / files
agy writes generated images as real files (its native generate_image tool, or the agy-image skill, save to a path you choose — default ~/agy_images). Pass that absolute path in the files array of reply/send_message. Files must live under an allowed attachment root (see AGY_DISCORD_ATTACHMENT_ROOTS); the agy image dir and the bridge inbox are always allowed.
Tools
tool | purpose |
| post text + optional file attachments |
| add an emoji reaction |
| edit a message the bot sent |
| recent channel history (Discord bot search is unavailable) |
| save a message's attachments to the inbox |
| newest images under the agy image dir |
| inbound message queue |
| state dir, queue counts, Discord login status |
Environment
var | default | purpose |
| — | bot token (usually stored in the state |
|
| state directory |
|
| agy executable |
| cwd | working directory for relay runs |
| — |
|
|
| pass |
|
| resume a per-channel conversation |
|
| relay run budget (also sets agy's |
| — | extra agy args (shell-style string or JSON array) |
|
| where agy stores conversation |
| cwd + | allowed upload roots (os-delimiter separated) |
|
| agy image output dir (always attachable) |
|
| suppress the unsafe-mode warning |
Development
npm run typecheck
npm test
npm run build
npm run dev:bot # tsx src/cli.ts bot
npm run dev:mcp # tsx src/cli.ts mcpLicense
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Openclaw-Metis/agy-discord-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server