Skip to content

Run your first Discord tools

This is the shortest verified path from a local install to a real Discord tool call. You will first prove the connection with a read-only request, then send one message to a test channel.

Before you begin

  • Keep the bot installed in your private test server.
  • Confirm that your restarted MCP client lists discord-mcp’s tools.
  • Have the bot token and test server ID available privately.
  1. Validate the token against Discord.

    doctor reads the current terminal environment, not the client config. Set the token only for this terminal and run the online checks:

    Terminal window
    read -rsp 'Discord bot token: ' DISCORD_TOKEN && printf '\n'
    export DISCORD_TOKEN
    discord-mcp doctor --online
    unset DISCORD_TOKEN
    Terminal window
    $env:DISCORD_TOKEN = Read-Host 'Discord bot token' -MaskInput
    discord-mcp doctor --online
    Remove-Item Env:DISCORD_TOKEN

    The first example requires Bash; the second requires PowerShell 7. If neither is available, skip this optional diagnostic rather than placing the token in a command or shell history.

    Find the token-online row with status OK and the message Discord accepted token in the report. Exit 1 can still mean the online token check passed with another warning; inspect every line. Fix failures on exit 2.

  2. Prove the client connection read-only.

    In the MCP client you restarted during Unit 2, ask:

    Use users_get_current and tell me the bot username and ID. Do not call any other tool.

    The tool needs no arguments. A successful result identifies the same bot you created in the Developer Portal.

  3. Discover the channel ID.

    Replace the example with your copied server ID:

    Use channels_list with guild_id 999000999000999000. Return the ID for general.

    The result includes channels[].id. Keep the ID for the next step.

  4. Send one test message.

    Use messages_send with channel_id 112233445566778899 and content hello from discord-mcp.

    A successful result contains message_id, channel_id, jump_url, and timestamp. Open jump_url to verify the message in Discord.

  • users_get_current returned the bot account I created.
  • channels_list returned the channel ID from my private test server.
  • messages_send returned message_id, channel_id, jump_url, and timestamp.
  • I opened jump_url and verified the test message in Discord.

Next, read How a tool call works or open the tool reference.