# discord_cli [Health: Active]

**Category:** 💬 Communication  
**Repository:** https://github.com/quangdang46/discord_cli  
**GitHub Stars:** 7  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/discord-cli

## Description
Discord CLI + MCP server that runs as your own user account — read, send, search, and manage any server/DM you belong to, no bot invite. Agent-native JSON/JSONL output, SQLite + FTS5 offline archive, stealth-aware headers, single Rust binary.

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/quangdang46/discord_cli), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
curl -fsSL "https://raw.githubusercontent.com/quangdang46/discord_cli/main/install.sh?$(date +%s)" | bash
```

2. Install:

```sh
curl -fsSL "https://raw.githubusercontent.com/quangdang46/discord_cli/main/install.sh?$(date +%s)" | bash -s -- --easy-mode --verify
```

3. Install:

```sh
curl -fsSL "https://raw.githubusercontent.com/quangdang46/discord_cli/main/install.sh?$(date +%s)" | bash -s -- --version v0.1.0
```

4. Install:

```sh
irm "https://raw.githubusercontent.com/quangdang46/discord_cli/main/install.ps1" | iex
```

5. Install:

```sh
cargo install --path crates/discord-cli --locked
```

6. Install:

```sh
cargo build --release && cp target/release/discord /usr/local/bin/
```

## Documentation

## 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.

_Full upstream README: https://allmcps.com/mcp/discord-cli/readme_

