REST API v1 · Developers
MCP server: manage your Discord server from AI assistants
BotGG runs a remote Model Context Protocol server. Connect an AI assistant to it and the assistant can use the same endpoints as the REST API — with the same scopes, limits and checks — for the one server you authorized.
Developer docs
On this page
Connect a client
The server URL is https://console.botgg.app/mcp (MCP over Streamable HTTP). Clients sign in in one of two ways:
- Sign in with Discord (OAuth) — recommended. The client only needs the URL. It opens BotGG in your browser, you log in with Discord, pick one server and the permissions, and approve. Nothing to copy, and you can disconnect the app at any time.
- API key. For clients without OAuth support: create a key in the console (see authentication) and send it as
Authorization: Bearer botgg_….
Claude (claude.ai and Claude Desktop)
- Open Settings → Connectors and choose Add custom connector.
- Name it
BotGGand pastehttps://console.botgg.app/mcpas the URL, then Add. - Click Connect: BotGG opens, you log in with Discord and approve (see the consent screen).
ChatGPT
- Open Settings → Apps & Connectors. Custom connectors need Developer mode (under Advanced settings) on your plan.
- Choose Create, name it
BotGG, pastehttps://console.botgg.app/mcpas the MCP server URL and pick OAuth as the authentication. - Create the connector and sign in when ChatGPT opens BotGG.
Cursor
Add the server to ~/.cursor/mcp.json (or the project’s .cursor/mcp.json). Cursor shows Needs login next to it — click it to sign in with Discord in the browser.
{
"mcpServers": {
"botgg": { "url": "https://console.botgg.app/mcp" }
}
}Claude Code
claude mcp add --transport http botgg https://console.botgg.app/mcp
# then run /mcp inside Claude Code and choose "Authenticate"Any client with an API key
{
"mcpServers": {
"botgg": {
"type": "http",
"url": "https://console.botgg.app/mcp",
"headers": { "Authorization": "Bearer botgg_…" }
}
}
}The consent screen
When a client signs in, BotGG shows who is asking and where you will be sent back afterwards. Apps register themselves, so their name is not verified — only approve a connection you started yourself.
- Log in with Discord (if you aren’t logged in to the console already).
- Choose one server. Only servers where you have Manage Server are listed, and BotGG must be added to the one you pick. A connection always belongs to exactly one server.
- Choose permissions. They are the same scopes as for API keys. Sensitive ones (acting on members, moderation data) start unchecked; selecting one needs an extra confirmation.
- Approve or deny. The app receives a short-lived access token (1 hour) and a refresh token that changes on every use.
Every connection is listed in the console under Server → Connected apps with its permissions, who connected it and when it was last used. Any manager of the server can disconnect it there; the app loses access immediately. If the person who connected the app loses Manage Server, its access ends automatically on the next call.
Tools
There is one tool per REST API endpoint — for example bank.getBalance becomes the tool bank_get_balance. Inputs are the endpoint’s path, query and body fields; the server ID is never an input, it comes from the connection. The tool list always matches the API reference, and a client only sees the tools whose scope its connection has.
- Read-only tools are marked as such; tools that change or remove data are marked destructive, and the assistant is told to confirm the exact action with you first.
- Every call runs through the same pipeline as the REST API: scope and feature checks, validation, error codes and the plan’s rate limit for the connection (an API key shares one budget between REST and MCP).
- Errors come back as tool results with the same
errorcodes as the REST API, so the assistant can explain or fix them. - Changes made through MCP are written to the server’s audit log with the app’s name.
| Scope | What it allows |
|---|---|
guild:read | Read server info — Server name, icon, member count, language and enabled features; roles, channels and basic member info (roles, nickname, join date). |
bank:read | Read Bank — Balances, a member’s transaction history and the leaderboard. |
bank:write | Change balances — Add currency to or remove it from members. Every change is written to the Bank ledger. |
levels:read | Read Levels — A member’s level, XP and rank, and the XP leaderboard. |
levels:write | Change XP — Add, remove or set members’ XP. Reward roles and level-up announcements work as with /levels commands; every change is in the audit log. |
invites:read | Read invites — A member’s invite counts and rank, and the invites leaderboard. |
invites:write | Change bonus invites — Add or remove bonus invites, like /invites add. Milestone rewards follow; every change is in the audit log. |
shop:read | Read Shop — Stores, items, members’ inventories and the purchase history. |
shop:write Sensitive | Manage Shop — Buy items for members (charged from their Bank balance, roles are given), grant items for free, refund purchases, restock and turn items on or off. |
giveaways:read | Read giveaways — Running and ended giveaways with entry counts, winners and the list of entrants. |
giveaways:write | Manage giveaways — Start giveaways, end them early and reroll winners. The bot posts and updates them in Discord. |
flows:read | Read Flows — The list of flows (name, on/off, trigger) and the status and result of runs. |
flows:run Sensitive | Run Flows — Run enabled flows that start with a Manual or Webhook trigger, with your own input. The flow does whatever its steps do; runs count toward the plan’s daily limit. |
tickets:read | Read tickets — The ticket list and details (opener, panel, status, form answers) and the saved transcripts of closed tickets. |
tickets:write | Close tickets — Close open tickets with a reason — the bot saves the transcript, logs it and notifies the opener like a staff close. |
applications:read | Read applications — Application forms and submissions, including the applicants’ answers, votes and decisions. |
applications:write | Decide applications — Accept or deny open applications. The bot gives / removes the form’s roles, DMs the applicant and updates the review like a staff decision. |
appeals:read | Read ban appeals — Ban appeals with their answers, the ban reason and the conversation (internal staff notes are never included). |
appeals:write Sensitive | Decide ban appeals — Approve (unban) or reject open ban appeals with a reason; the bot unbans and DMs like a staff decision. Approving an appeal unbans the member. |
moderation:read Sensitive | Read moderation cases — Moderation cases (warnings, timeouts, kicks, bans…) with reasons, evidence links and moderators, and the status of API actions. Exposes members’ moderation history. |
moderation:write Sensitive | Moderate members — Warn, time out, kick, ban and unban members as the key’s creator: only while they still have the matching Discord permission, only members below their and the bot’s highest role, with a reason, at most 10 actions a minute. Anyone holding this key can punish members in your name. Keep it secret and revoke it when unused. |
Limits
| What | Limit |
|---|---|
| Tool calls per connection | The plan’s API rate limit per minute: Free 60, Pro 600 |
| Other MCP requests (listing tools, handshakes) | 300 per minute per connection |
| Access token / refresh token | 1 hour / 30 days, renewed on every refresh |
| Request size | 64 KB per MCP message; 8 KB per tool body, like the REST API |
Safety
- Confirmation of destructive actions is done by your AI app, based on the tool markings — BotGG cannot see your chat. Keep confirmations turned on in your client.
- Write calls over MCP don’t use an
Idempotency-Key, so an assistant shouldn’t blindly repeat a failed write — check the result first. For automated, retried writes use the REST API. - Tokens are bound to this server URL and to one Discord server; BotGG stores only their hashes. A reused refresh token disconnects the app as a precaution — just connect it again.
Troubleshooting
| Answer | What to do |
|---|---|
401 with error="invalid_token" | The token expired, was revoked or the app was disconnected — sign in again from the client. |
403 with error="insufficient_scope" | The connection lacks the permission in scope. Reconnect and tick it on the consent screen. |
403 “Origin not allowed” | Browser-based clients must be on an allowed origin; desktop and server clients send no Origin. |
Tool result BANK_DISABLED / FEATURE_DISABLED | Turn the feature on for the server in the console. |
HTTP/1.1 401 Unauthorized
WWW-Authenticate: Bearer resource_metadata="https://console.botgg.app/.well-known/oauth-protected-resource/mcp"HTTP/1.1 403 Forbidden
WWW-Authenticate: Bearer resource_metadata="…", error="insufficient_scope", scope="bank:write"