What You'll Set Up
By the end of this guide, your AI agent will be able to manage your Discord server on your behalf. It can read and send messages, organize channels, manage member roles, search conversations, and keep your community running smoothly — all through a simple conversation.
This integration is especially useful for community managers, support teams, and anyone running a Discord server who wants to automate routine tasks. Instead of manually moderating, posting updates, and assigning roles, your agent handles it for you.
Before You Begin
Make sure you have:
- A Discord account — Sign up at discord.com
- A Discord server you manage — You'll need permission to add a bot
- A Pipeworks workspace — Sign up at pipeworks.ai if you haven't already
Discord bot tokens are free. You just need to create an application in the Discord Developer Portal and add the bot to your server.
Steps
Create a Discord application
Go to the Discord Developer Portal and click New Application. Give it a name (e.g., "Pipeworks Agent") and click Create.
Create a bot and copy the token
In your new application, click Bot in the left sidebar. Click Reset Token to generate a new bot token. Copy the token immediately — you won't be able to see it again.
Keep your bot token secret. Anyone with this token can control your bot. If it's ever exposed, reset it immediately in the Developer Portal.
Set bot permissions and invite it to your server
Go to OAuth2 in the left sidebar, then click URL Generator. Under Scopes, select bot. Under Bot Permissions, select the permissions your agent needs — at minimum: Read Messages/View Channels, Send Messages, Manage Messages, Manage Channels, and Manage Roles.
Copy the generated URL and open it in your browser. Select your server from the dropdown and click Authorize.
Open your Pipeworks console
Log into your Pipeworks workspace and go to the Integrations page. Find Discord in the list and click on it.
Enter your bot token
Paste your Discord bot token into the Bot Token field and click Connect.
Pipeworks encrypts your credentials with AES-256-GCM before storing them. The plaintext is never saved to disk and is only decrypted when your integration container starts.
Start the integration
Click Start to launch the Discord integration container. This takes a few seconds. Once the status shows Running, your agent is ready to manage your server.
Test the connection
Use the Test button in your Pipeworks console to verify the connection. This sends a simple request to confirm your bot token is working and the bot can see your server.
What Your Agent Can Do
Once connected, your AI agent has access to 26 tools for managing your Discord server:
- Server info — List servers the bot belongs to and get detailed server information
- Channel management — List, view, create, and delete channels including text, voice, category, and forum types
- Messaging — Read, send, edit, search, and delete messages across channels
- Threads — List active threads and create new threads from messages or channels
- Member management — List server members, view member details, and look up user profiles
- Role management — List all roles, assign roles to members, and remove roles
- Reactions — Add and remove emoji reactions, view who reacted to a message
- Pins — View, pin, and unpin important messages in any channel
Connecting from Your AI Agent
Add the Pipeworks tools endpoint to your agent's configuration. Here's an example for Claude Desktop:
{'{'}
"mcpServers": {'{'}
"pipeworks-discord": {'{'}
"command": "npx",
"args": ["-y", "mcp-remote", "https://app.pipeworks.ai/tools/discord"]
{'}'}
{'}'}
{'}'}
Claude Desktop will prompt you to sign in through Pipeworks when you first connect. No access key needed.
Troubleshooting
Connection test fails? Double-check that you copied the full bot token from the Discord Developer Portal. If you navigated away after generating it, you'll need to reset the token to get a new one.
Bot can't see your server? Make sure you completed the OAuth2 invite flow in Step 3 and selected the correct server. You can verify the bot is in your server by checking the member list in Discord.
Getting "Missing Permissions" errors? The bot can only perform actions its role allows. Go to your Discord server's Server Settings > Roles, find your bot's role, and make sure it has the permissions your agent needs. The bot's role must also be higher in the role list than any roles it tries to assign or remove.
Agent can't find tools? Verify your Pipeworks session is authenticated and that the integration status shows "Running" in your Pipeworks console.