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)

  1. Open Settings → Connectors and choose Add custom connector.
  2. Name it BotGG and paste https://console.botgg.app/mcp as the URL, then Add.
  3. Click Connect: BotGG opens, you log in with Discord and approve (see the consent screen).

ChatGPT

  1. Open Settings → Apps & Connectors. Custom connectors need Developer mode (under Advanced settings) on your plan.
  2. Choose Create, name it BotGG, paste https://console.botgg.app/mcp as the MCP server URL and pick OAuth as the authentication.
  3. 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.

.cursor/mcp.json
{
  "mcpServers": {
    "botgg": { "url": "https://console.botgg.app/mcp" }
  }
}

Claude Code

Terminal
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

MCP client configuration (JSON)
{
  "mcpServers": {
    "botgg": {
      "type": "http",
      "url": "https://console.botgg.app/mcp",
      "headers": { "Authorization": "Bearer botgg_…" }
    }
  }
}

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.

  1. Log in with Discord (if you aren’t logged in to the console already).
  2. 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.
  3. 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.
  4. 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 error codes 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.
API key scopes
ScopeWhat it allows
guild:readRead server info — Server name, icon, member count, language and enabled features; roles, channels and basic member info (roles, nickname, join date).
bank:readRead Bank — Balances, a member’s transaction history and the leaderboard.
bank:writeChange balances — Add currency to or remove it from members. Every change is written to the Bank ledger.
levels:readRead Levels — A member’s level, XP and rank, and the XP leaderboard.
levels:writeChange 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:readRead invites — A member’s invite counts and rank, and the invites leaderboard.
invites:writeChange bonus invites — Add or remove bonus invites, like /invites add. Milestone rewards follow; every change is in the audit log.
shop:readRead Shop — Stores, items, members’ inventories and the purchase history.
shop:write SensitiveManage 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:readRead giveaways — Running and ended giveaways with entry counts, winners and the list of entrants.
giveaways:writeManage giveaways — Start giveaways, end them early and reroll winners. The bot posts and updates them in Discord.
flows:readRead Flows — The list of flows (name, on/off, trigger) and the status and result of runs.
flows:run SensitiveRun 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:readRead tickets — The ticket list and details (opener, panel, status, form answers) and the saved transcripts of closed tickets.
tickets:writeClose tickets — Close open tickets with a reason — the bot saves the transcript, logs it and notifies the opener like a staff close.
applications:readRead applications — Application forms and submissions, including the applicants’ answers, votes and decisions.
applications:writeDecide 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:readRead ban appeals — Ban appeals with their answers, the ban reason and the conversation (internal staff notes are never included).
appeals:write SensitiveDecide 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 SensitiveRead 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 SensitiveModerate 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

MCP limits
WhatLimit
Tool calls per connectionThe 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 token1 hour / 30 days, renewed on every refresh
Request size64 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

Common answers and fixes
AnswerWhat 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_DISABLEDTurn the feature on for the server in the console.
No or invalid credentials
HTTP/1.1 401 Unauthorized
WWW-Authenticate: Bearer resource_metadata="https://console.botgg.app/.well-known/oauth-protected-resource/mcp"
Missing permission
HTTP/1.1 403 Forbidden
WWW-Authenticate: Bearer resource_metadata="…", error="insufficient_scope", scope="bank:write"

Frequently asked questions

Can one connection manage several servers?

No. Each connection is bound to the one server you picked. Connect the app again and pick another server to use it there too.

Who can see and disconnect connected apps?

Every manager of the server, on the server’s Connected apps page in the console.

Does the assistant get my Discord account?

No. It gets a BotGG token limited to one server and the permissions you approved. Your Discord login stays with BotGG.

Ready to level up your server?

Add BotGG for free, then switch features on in the web console.