claude-code - 💡(How to fix) Fix [FEATURE] Discord plugin: support multiple bot tokens per machine for multi-session setups [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#56109Fetched 2026-05-05 05:57:58
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Timeline (top)
labeled ×3commented ×1

Fix Action

Fix / Workaround

Current workaround Only one session per machine gets Discord access Cross-machine: create a separate bot per machine, each with its own token

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing requests and this feature hasn't been requested yet
  • This is a single feature request (not multiple features)

Problem Statement

Problem The Discord plugin (discord@claude-plugins-official) stores a single bot token in ~/.claude/channels/discord/.env. This means only one Claude Code CLI session per machine can connect to Discord at a time.

When running multiple claude --channels plugin:discord@claude-plugins-official sessions on the same machine (e.g., one session per project, each paired to a different Discord channel), only the first session successfully connects to the Discord gateway. Subsequent sessions silently fail to receive messages.

Current workaround Only one session per machine gets Discord access Cross-machine: create a separate bot per machine, each with its own token

Proposed Solution

Suggested fix Support per-session or per-project bot token configuration. Possible approaches: Allow DISCORD_BOT_TOKEN in a project-level config (e.g., .mcp.json or project .env) Add a --discord-token CLI flag Support a ~/.claude/channels/discord/tokens/<session-id>.env pattern Allow the --channels flag to accept a config argument (e.g., --channels plugin:discord@claude-plugins-official:token=<token>)

Alternative Solutions

No response

Priority

High - Significant impact on productivity

Feature Category

MCP server integration

Use Case Example

I run separate Claude Code sessions for different projects (e.g., Obsidian vault management, research paper, app development). I set up a Discord server with one channel per project so I can interact with each session from my phone. This works across machines (each machine has its own .env with a different bot token), but not for multiple sessions on the same machine.

Additional Context

No response

extent analysis

TL;DR

Support per-session or per-project bot token configuration to allow multiple Claude Code CLI sessions to connect to Discord on the same machine.

Guidance

  • Consider adding a --discord-token CLI flag to pass a unique bot token for each session.
  • Allow configuration of DISCORD_BOT_TOKEN in a project-level config file (e.g., .mcp.json or project .env) to support multiple sessions.
  • Explore supporting a ~/.claude/channels/discord/tokens/<session-id>.env pattern to store unique bot tokens for each session.
  • Evaluate modifying the --channels flag to accept a config argument (e.g., --channels plugin:discord@claude-plugins-official:token=<token>) for flexible token management.

Example

claude --channels plugin:discord@claude-plugins-official --discord-token <unique-token-for-session>

Notes

The proposed solutions aim to address the limitation of a single bot token per machine. However, the implementation details and potential conflicts with existing configurations need to be carefully considered.

Recommendation

Apply a workaround by using a separate bot per machine or implementing one of the proposed solutions, such as adding a --discord-token CLI flag, to support multiple sessions on the same machine. This approach allows for more flexibility and scalability in managing Discord connections.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [FEATURE] Discord plugin: support multiple bot tokens per machine for multi-session setups [1 comments, 2 participants]