Discord Agent Proxy User Documentation
Discord Agent Proxy is a self-deployed service: it stores your own Discord account credentials, maintains a persistent connection with Discord, and exposes the capabilities of this account through MCP and REST API interfaces, allowing AI or programs to operate Discord on your behalf.
The container does not contain any AI models; it is only responsible for execution—initiated by your AI client (Claude, Cursor, etc.) or your own program.
AI Client ──MCP /mcp──┐
├─→ Discord Agent Proxy ──→ Discord
Your Program ──REST /api───┘ (stores your account credentials)
¶ ⚠️ Must Read Before Use
Automating operations on a personal account (self-bot) violates Discord's terms of service, and there is a risk of account suspension. This is an inherent premise of this service: you provide your own account credentials and assume the risk.
It is strongly recommended to use a dedicated secondary account, do not use your main account.
¶ Deploying the Service
Go to Console → Applications, find Discord Agent Proxy, and create an application. After creation, go to the configuration page, enter your Discord account credentials, and deploy.
Once deployment is complete, the configuration page will display two pieces of information:
| Item | Example | Purpose |
|---|---|---|
| MCP Access URL | https://discord-bot-xxxxxxxxxxxx.app.acedata.cloud/mcp |
Configure in AI client |
| Access Token | V0p7kAWY... |
For authentication, see below |
¶ How to Obtain Discord Account Credentials
- Log in to Discord in a computer browser (discord.com/app)
- Press
F12to open the developer tools, switch to the Network panel - Click on any channel in Discord and observe the request list
- Open any request sent to
discord.com/api, find theauthorizationfield in Request Headers - Copy its value
This string of credentials is equivalent to your account's login state, do not share it with anyone. If leaked, changing the password in Discord will immediately invalidate it.
¶ Authentication Method
All interfaces except /health require the access token to be included in the request headers:
Authorization: Bearer <your access token>
Note: This service only accepts header-based authentication and does not support appending tokens in the URL like
?token=xxx. Directly opening the interface address in a browser will return401 unauthorized, which is normal and does not indicate deployment failure. To confirm if the service is functioning properly, please visit/health(this interface does not require authentication).
¶ Check Service Status
curl https://discord-bot-xxxxxxxxxxxx.app.acedata.cloud/health
Normal response:
{ "status": "ok", "gateway_ready": true }
Where gateway_ready indicates whether the connection to Discord has been established:
true— Everything is normal, you can start callingfalse— The service has started but has not yet connected to Discord. After deployment, you need to wait a few seconds; if it remainsfalse, it is usually due to invalid or expired account credentials, please re-obtain and redeploy.
When gateway_ready is false, other interfaces will return 503.
¶ Using in AI Client (MCP)
Taking Claude Code as an example:
claude mcp add --transport http discord \
https://discord-bot-xxxxxxxxxxxx.app.acedata.cloud/mcp \
--header "Authorization: Bearer <your access token>"
Other MCP-supported clients (Cursor, Claude Desktop, etc.) typically use the following configuration:
{
"mcpServers": {
"discord": {
"type": "http",
"url": "https://discord-bot-xxxxxxxxxxxx.app.acedata.cloud/mcp",
"headers": {
"Authorization": "Bearer <your access token>"
}
}
}
}
Once configured, you can directly instruct the AI to operate Discord in natural language, for example:
Check if I have new messages in the "Project Discussion" channel, and if someone asks about the release date, help me reply that it will be this Friday.
¶ Available Tools
| MCP Tool | Function |
|---|---|
discord_whoami |
View which account is currently being proxied |
discord_list_guilds |
List all servers the account has joined |
discord_list_channels |
List channels under a specific server |
discord_create_text_channel |
Create a text channel |
discord_list_members |
List server members |
discord_send_message |
Send a message (can specify a reply to a specific message) |
discord_read_messages |
Read recent messages in a channel |
discord_edit_message |
Edit a message sent by yourself |
discord_delete_message |
Delete a message |
discord_search_messages |
Search messages in a channel |
discord_add_reaction |
Add a reaction to a message |
discord_pin_message |
Pin a message |
discord_create_dm |
Start a one-on-one chat, returns channel ID |
discord_send_dm |
Send a private message to a user |
¶ Using in Program (REST API)
All REST interfaces are mounted under /api, with the response body uniformly as {"data": ...}, and in case of an error as {"error": "..."}.
¶ View Current Account
curl https://discord-bot-xxxxxxxxxxxx.app.acedata.cloud/api/whoami \
-H "Authorization: Bearer <your access token>"
¶ Send Message
curl -X POST https://discord-bot-xxxxxxxxxxxx.app.acedata.cloud/api/messages \
-H "Authorization: Bearer <your access token>" \
-H "Content-Type: application/json" \
-d '{"channel_id": "1234567890", "content": "Hello"}'
The optional parameter reply_to is used to reply to a specific message:
{ "channel_id": "1234567890", "content": "Received", "reply_to": "9876543210" }
¶ Read Messages
curl "https://discord-bot-xxxxxxxxxxxx.app.acedata.cloud/api/channels/1234567890/messages?limit=20" \
-H "Authorization: Bearer <your access token>"
¶ Complete Interface List
| Method and Path | Parameters | Functionality |
|---|---|---|
GET /api/whoami |
— | Current account information of the proxy |
GET /api/guilds |
— | List of servers the account has joined |
GET /api/guilds/{guild_id}/channels |
— | List of channels under the server |
POST /api/guilds/{guild_id}/channels |
{name} |
Create a text channel |
GET /api/guilds/{guild_id}/members |
?limit= (default 100) |
List of server members |
POST /api/messages |
{channel_id, content, reply_to?} |
Send a message |
GET /api/channels/{channel_id}/messages |
?limit= (default 50, max 100) |
Read recent messages |
GET /api/channels/{channel_id}/messages/search |
?q= (required) &limit= (default 25) |
Search messages |
PATCH /api/channels/{channel_id}/messages/{message_id} |
{content} |
Edit a message |
DELETE /api/channels/{channel_id}/messages/{message_id} |
— | Delete a message |
POST /api/channels/{channel_id}/messages/{message_id}/reactions |
{emoji} |
Add a reaction |
POST /api/channels/{channel_id}/messages/{message_id}/pin |
— | Pin a message |
POST /api/dms |
{recipient_id} |
Start a private chat, returns channel ID |
POST /api/dms/send |
{recipient_id, content} |
Send a private message |
¶ How to Obtain Channel ID and User ID
In the Discord client, go to User Settings → Advanced Settings, and enable Developer Mode. Then right-click on any channel or user, and the option "Copy ID" will appear in the menu.
You can also directly call GET /api/guilds and GET /api/guilds/{guild_id}/channels to enumerate.
¶ Frequently Asked Questions
Returns 401 unauthorized
The access token is incorrect, or it was passed using ?token=. Please ensure the token is passed through the request header Authorization: Bearer <token> and matches what is displayed in the console.
Returns 503
The connection to Discord has not yet been established. First, access /health to check gateway_ready. If it remains false for a long time, it is likely that the account credentials have expired; please re-obtain and redeploy.
Returns 403 or 404
The account itself does not have the corresponding permissions (for example, not in the server, or no permission to speak in that channel), or the ID was entered incorrectly. These errors come from Discord, not from the proxy service.
Returns 429
Triggered Discord's rate limit; the retry_after field in the response provides the suggested wait time in seconds. Please reduce the call frequency.
Account banned after sending messages
As mentioned earlier, automating personal account operations violates Discord's Terms of Service. Please use a dedicated alternate account, control the operation frequency, and avoid mass messaging and other sensitive behaviors.