Discord CLI logo

Discord CLI

Operate Discord as your user account with JSON CLI commands, offline FTS5 search, message streaming, and MCP tools.

Install Discord CLI

Run the project’s own setup commands, in order.

Setup steps from the project

discord_cli installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Install
    curl -fsSL "https://raw.githubusercontent.com/quangdang46/discord_cli/main/install.sh?$(date +%s)" | bash
    
  2. 2. Install
    curl -fsSL "https://raw.githubusercontent.com/quangdang46/discord_cli/main/install.sh?$(date +%s)" | bash -s -- --easy-mode --verify
    
  3. 3. Install
    curl -fsSL "https://raw.githubusercontent.com/quangdang46/discord_cli/main/install.sh?$(date +%s)" | bash -s -- --version v0.1.0
    
  4. 4. Install
    irm "https://raw.githubusercontent.com/quangdang46/discord_cli/main/install.ps1" | iex
    
  5. 5. Install
    cargo install --path crates/discord-cli --locked
    
  6. 6. Install
    cargo build --release && cp target/release/discord /usr/local/bin/
    

Overview

discord_cli MCP server lets agents operate Discord through the authenticated user account, covering servers, channels, DMs, and group DMs without inviting a bot. Its Rust binary provides JSON or JSONL CLI output, an MCP mode with 43 tools, and a SQLite archive with FTS5 search. Use it for agent workflows that need to read, search, follow, or cautiously send Discord messages across spaces the account already belongs to. Account automation carries Discord ToS and termination risk, so destructive operations are gated and administrative commands require particular care.

Use cases

  • Read private Discord channels and DMs available to an authenticated user
  • Search synchronized messages through a local SQLite FTS5 archive
  • Stream new messages or keyword matches as JSONL for agent workflows
  • Send confirmed replies and reactions from the user account

Key features

  • User-account Discord access without a bot invitation
  • JSON and JSONL output with structured exit codes
  • SQLite archive with FTS5 full-text search
  • MCP mode with 43 agent-facing tools
  • Live gateway following and keyword watching
  • Confirmation gates for messages and destructive actions

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

5/5 checks healthy over the last 20d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars7Stargazers on the source repository.
Last commit10d agoMost recent push to the default branch.

How Discord CLI works

What discord_cli does

discord_cli connects to Discord as a user account rather than as an invited bot. It can discover the servers and direct-message channels available to that account, inspect channel history, send messages, add reactions, and perform other management operations across joined spaces. The project is delivered as a single Rust binary for Linux, macOS, and Windows.

The command-line interface is designed for automation: commands return machine-readable JSON or JSONL, diagnostics go to stderr, and exit codes distinguish success, usage errors, missing resources, and forbidden operations. The same binary can start an MCP server for agent clients.

How it works

Authentication can use a locally detected Discord or browser session, pasted credentials, or an optional QR flow. Once authenticated, the CLI accesses the user account’s guilds, channels, threads, DMs, and group DMs. It can persist messages in a local SQLite database and use SQLite FTS5 for offline full-text queries.

Reading and synchronization support bounded history retrieval. Follow modes can continue storing incoming messages, while tail and watch stream new activity as JSONL through the gateway. Network activity includes rate-limit backoff, bounded reads, and an invisible presence mode. Browser-oriented request details such as user-agent information, Discord client properties, and a per-install device identifier are used by the client.

Setup and configuration

Prebuilt binaries are available for Linux x86_64 and aarch64, macOS x86_64 and aarch64, and Windows x86_64, with SHA-256 checksums attached to GitHub releases. macOS and Linux users can install with the project script; Windows users can use the PowerShell installer. Building from source requires Rust 1.80 or newer:

bash
cargo install --path crates/discord-cli --locked

Authenticate once with discord auth --save, then verify access with discord status or discord whoami. The MCP mode starts with discord serve; a documented Claude Code example passes DISCORD_TOKEN and invokes that subcommand.

Tools and capabilities

  • Discover guilds, text channels, announcement channels, forum channels, DMs, and group DMs.
  • Read paginated or recent history, including windows around a message and time-based cutoffs.
  • Send messages, reply to messages, suppress link embeds, allow selected role mentions, and add reactions.
  • Synchronize channels into SQLite, search the archive with FTS5, and inspect archive statistics.
  • Follow live gateway activity with sync --follow, tail, or keyword-based watch.
  • Expose the CLI’s Discord operations through an MCP server with 43 tools.
  • Return consistent JSON envelopes or JSONL suitable for agent workflows.
  • Gate new messages and destructive operations with --confirm; support dry-run behavior where available.

Limitations and notes

Automating a Discord user account violates Discord’s Terms of Service and can lead to account termination. Use the tool only with accounts you control and keep activity within conservative limits. The highest-risk surface is administrative management of channels, roles, and emojis; channel deletion is irreversible and visible to other users. QR authentication uses Discord’s login API and is opt-in rather than automatic.

The tool only reaches servers, channels, threads, and private conversations that the authenticated account can access. Message sending is gated, and reads and synchronization are bounded to reduce excessive activity. Treat the account token and local archive as sensitive data.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Discord CLI

discord_cli is an MCP server that connects AI agents to Discord through your authenticated user account. Its main tools cover guild and channel discovery, reading messages, sending and replying, reactions, synchronization, offline SQLite FTS5 search, and live message watching across servers, DMs, and group DMs the account can access.

Install a prebuilt binary with the project’s macOS/Linux or Windows installer, or build it with Rust 1.80+ using `cargo install --path crates/discord-cli --locked`. Authenticate with `discord auth --save`, then start MCP mode with `discord serve`.

Yes, discord_cli can be used with Cursor through its MCP server mode. Start the binary with `discord serve` and configure it as an MCP server in the client, providing the Discord token as shown in the project’s MCP example.

Yes, discord_cli stores synchronized messages in a local SQLite archive and searches them with FTS5. Run a channel or broader synchronization first, then use the search commands to query archived content without requesting each result from Discord.

discord_cli carries account-termination risk because automating a user account violates Discord’s Terms of Service. Use it only with an account you control, keep activity restrained, and review confirmations carefully before sending messages or running channel, role, or emoji administration commands.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewDiscord CLI AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/discord-cli?style=directory)](https://allmcps.com/mcp/discord-cli)
HTML Embed
<a href="https://allmcps.com/mcp/discord-cli"><img src="https://allmcps.com/api/badge/discord-cli?style=directory" alt="Discord CLI on AllMCPs" /></a>