discord-mcp
Contents of the docs

discord-mcp · Docs

Connect to Claude

Add discord-mcp as a custom connector in Claude or as a remote MCP server in Claude Code, and test it.

On this page

Requirements

  • discord-mcp is running and reachable from the internet via HTTPS, e.g. at https://discord.mcp.example.com/mcp.
  • Access is restricted (see Security).

Important

Custom connectors in Claude connect from Anthropic's servers, not from your machine. A URL that only works in your home network is not enough.

Claude (web, desktop, mobile)

  1. Settings → Connectors → Add custom connector.
  2. Name: e.g. Discord.
  3. URL: https://discord.mcp.example.com/mcp
  4. Save.

Claude connectors cannot send custom headers, so no bearer token either. Restrict the endpoint at the reverse proxy instead, e.g. with an IP allowlist containing Anthropic's outbound IP addresses.

With write mode enabled, set Claude's connector settings so that Claude has to ask before send_message. Otherwise Claude sends messages on your behalf without asking.

Claude Code

In Claude Code you can pass the bearer token directly:

claude mcp add --transport http discord https://discord.mcp.example.com/mcp \
  --header "Authorization: Bearer your-mcp-auth-token"

This requires DISCORD_MCP_AUTH_TOKEN to be set on the server.

Test

Ask Claude for example:

  • "Which Discord servers am I on?"
  • "Summarize the last 24 hours in #general."
  • "Did anyone send me a direct message?"

Claude should call get_servers, get_channels and read_messages or get_direct_messages for that.

Troubleshooting

Symptom Cause
Connector does not connect Server not publicly reachable, or the reverse proxy blocks Anthropic's IPs.
401 Unauthorized DISCORD_MCP_AUTH_TOKEN is set but the client sends no or a wrong token.
405 Method not allowed Expected for GET. The server is stateless and only accepts POST.
send_message is missing DISCORD_MCP_READ_ONLY is true.
Tool reports a login error Wrong credentials, missing TOTP secret or Discord wants a captcha (see Configuration).
First call takes long Expected: the first call runs the browser login, which can take up to two minutes.
Missing Access The account has no access to this channel or server.

After changing the tool set, disconnect and reconnect the connector in Claude once so it loads the new tool list.