discord-tools
Discord tools for coding agents: chats, messages, search, inbox, people and servers, history, files, sends, threads and roles.
[!WARNING]
These tools act from your own Discord account, through the web client's
API and with your account's token. Discord's terms forbid automating a user
account ("self-bots"), and an account can be terminated for it, read-only
use included. Use them only on an account whose loss you accept, and only
for what you would do yourself, at your own pace. The token is your account:
whoever holds it reads and writes as you, past your password and your second
factor.
| Harness | Delivery | Pinned by |
|---|
| OpenCode V2 | native plugin (npm package, with skills) | the version in the package |
| OpenCode V1 | native plugin (npm package, no skills) | the version in the package |
| Claude Code | plugin: MCP server and skills | the release tag, as the ref |
| Codex | plugin: MCP server and skills | the release tag, as the ref |
| Grok Build | plugin: MCP server and skills | the release tag, as @ref |
| Antigravity | plugin: MCP server and skills | the release tag's tree URL |
| Hermes Agent | native plugin (Python, calls the command line) | the release commit, as the SHA |
| other MCP host | MCP server from npm | the version in the package |
The tools need Node.js 24 or later.
Plugin installs pinned by a release tag run on macOS (arm64, x64) and Linux
(x64, arm64, glibc); npm installs run wherever wreq-js has a binding.
docs/conventions.md describes how the tools are named
and how they behave.
Install
Install from a release, never from the default branch: a release is a tag whose
commit carries the built dist/, and the default branch does not. In the
commands below, <version> is a release's version (1.2.3) and <sha> is the
commit its tag names:
gh api repos/craft-agent/discord-tools/commits/v<version> --jq .sha
OpenCode
OpenCode V2 takes the package and its options in opencode.json:
{
"plugins": [{ "package": "@craftsamo/discord-tools@<version>", "options": { "read_only": false } }],
"permissions": [{ "action": "discord_*", "resource": "*", "effect": "ask" }]
}
OpenCode V1 takes the package as a string, or as a pair with its options:
{
"plugin": [["@craftsamo/discord-tools@<version>", { "read_only": false }]],
"permission": { "discord_*": "ask" }
}
OpenCode allows any action no rule names, so the plugin's request is granted
silently unless a rule says ask. Read tools never ask, so the discord_* glob
is safe.
V1 registers no skills. Unpack the package and copy its skills/* folders into
~/.config/opencode/skills/:
npm pack @craftsamo/discord-tools@<version>
tar -xzf craftsamo-discord-tools-<version>.tgz
mkdir -p ~/.config/opencode/skills
cp -r package/skills/* ~/.config/opencode/skills/
rm -rf package craftsamo-discord-tools-<version>.tgz
Claude Code
claude plugin marketplace add craft-agent/plugins
claude plugin install discord-tools@craft-agent
craft-agent/plugins lists every
craft-agent package at its latest release. To pin this package to a release
instead, add its own marketplace at the tag, and do not install it from both:
claude plugin marketplace add craft-agent/discord-tools#v<version>
claude plugin install discord-tools@discord-tools
If you added this repository as the craft-agent marketplace before, remove
it first: claude plugin marketplace remove craft-agent.
Codex
codex plugin marketplace add craft-agent/plugins
codex plugin add discord-tools@craft-agent
craft-agent/plugins lists every
craft-agent package at its latest release. To pin this package to a release
instead, add its own marketplace at the tag, and do not install it from both:
codex plugin marketplace add craft-agent/discord-tools --ref v<version>
codex plugin add discord-tools@discord-tools
If you added this repository as the craft-agent marketplace before, remove
it first: codex plugin marketplace remove craft-agent.
Codex turns - into _ in server names, so it shows the tools as
mcp__discord_tools__discord_*. It starts the MCP server in the plugin's
install directory and passes no roots, so the server takes each call's directory
from what Codex sends with the call: its sandbox state, which the server asks
for, else the one workspace it names.