Skip to main content
Glama
taigikeyboard

discord-mcp

README.md
# discord-mcp

Minimal MCP server for Discord forum and text channels.

## Setup

1. [Discord Developer Portal](https://discord.com/developers/applications) → Bot → copy token; enable **Message Content Intent** (required to read message text).
2. OAuth2 → URL Generator → scope `bot`; permissions: View Channels, Read Message History, Send Messages, Send Messages in Threads, Create Public Threads, Manage Threads. Open the URL to invite.
3. Register:

```sh
claude mcp add discord -e DISCORD_BOT_TOKEN=... -- uv --directory /path/to/discord-mcp run discord-mcp
```

Any MCP client works with the equivalent `command` / `args` / `env`.

Channel IDs: Discord → Settings → Advanced → Developer Mode → right-click channel → Copy ID.

## Tools

| Tool | Args |
|---|---|
| `list_tags` | `forum_id` |
| `list_posts` | `forum_id`, `include_archived=false`, `limit=50` |
| `read_post` | `thread_id`, `limit=50` |
| `read_channel` | `channel_id`, `limit=50`, `before` (message ID, page backwards); each message has `link`, `reply_to`, `bot` |
| `create_post` | `forum_id`, `title`, `content`, `tags=[]` |
| `reply_post` | `thread_id`, `content`, `reply_to` (message ID → Discord reply) |
| `set_tags` / `add_tags` / `remove_tags` | `thread_id`, `tags` |
| `close_post` | `thread_id`, `lock=false` |

`tags` accept names or IDs.

## Dev

```sh
uv sync --all-groups
uv run ruff format . && uv run ruff check . && uv run ty check src/ && uv run pytest
```

TDQS

B3.3/5.0

Scored across 10 tools

Disambiguation4/5

Most tools target clearly distinct actions (listing, reading, creating, replying, closing). The tag-related tools (set_tags, add_tags, remove_tags) have overlapping purposes, though their descriptions clarify the differences.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern using lowercase with underscores. Verbs like list, read, create, reply, set, add, remove, and close are uniformly paired with clear nouns.

Tool Count5/5

Ten tools is well-scoped for a Discord forum-focused server. Each tool addresses a necessary operation without excessive redundancy or missing core actions.

Completeness4/5

The tool set covers the main forum lifecycle: listing, reading, creating, replying, tag management, and closing. Minor gaps exist, such as editing/deleting posts or messages, but agents can work around these.