MCP Server¶
Bernard's MCP server lets AI tools such as Claude configure and moderate your servers with your API key.
Connecting¶
The server is at https://api.getbernard.io/mcp and uses the Streamable HTTP transport.
Claude Code¶
Run:
claude mcp add --transport http bernard https://api.getbernard.io/mcp \
--header 'Authorization: Bearer brn_live_...'
Codex CLI¶
Put your key in the BERNARD_API_KEY environment variable, then run:
codex mcp add bernard --url https://api.getbernard.io/mcp --bearer-token-env-var BERNARD_API_KEY
Cursor¶
Add this to ~/.cursor/mcp.json, or .cursor/mcp.json in a project, with your key in the BERNARD_API_KEY environment variable:
{
"mcpServers": {
"bernard": {
"url": "https://api.getbernard.io/mcp",
"headers": { "Authorization": "Bearer ${env:BERNARD_API_KEY}" }
}
}
}
GitHub Copilot¶
Add this to ~/.copilot/mcp-config.json, which Copilot in VS Code and Copilot CLI share, with your key in the BERNARD_API_KEY environment variable:
{
"mcpServers": {
"bernard": {
"type": "http",
"url": "https://api.getbernard.io/mcp",
"headers": { "Authorization": "Bearer ${BERNARD_API_KEY}" },
"tools": ["*"]
}
}
}
Other clients¶
Other clients take the same URL and header in their MCP config, though field names vary by client:
{
"mcpServers": {
"bernard": {
"type": "http",
"url": "https://api.getbernard.io/mcp",
"headers": { "Authorization": "Bearer brn_live_..." }
}
}
}
Requests without a key get 401.
The AI starts with list_my_guilds, which lists the servers your key may act on and whether Bernard is in each.
Scopes¶
Each tool works only if your key has its scope.
| Tools | Read scope | Write scope |
|---|---|---|
| Server settings, channels and roles | guild:config:read |
guild:config:write, plus guild:enforcement:write for enforcement changes |
| Member search | guild:members:read |
|
| AutoMod filters | guild:filters:read |
guild:filters:write, plus guild:enforcement:write for enforcement changes |
| Role configuration and capabilities | guild:roles:read |
guild:roles:write |
| OmniLogs routing | guild:events:read |
guild:events:write |
| Tickets | guild:tickets:read |
guild:tickets:write |
| Alt identities (Premium) | guild:alts:read |
guild:alts:write, plus guild:alts:admin to merge or delete |
| Analytics (Premium) | guild:analytics:read |
list_roles says whether each role still exists in Discord when the key also has guild:config:read.
Channels, roles, and members come from Bernard's stored copy, as for any key (see Discord Data).
Analytics¶
The analytics tools count a Premium server's moderation actions (by moderator and by hour of day), AutoMod actions, member joins and leaves, and honeypot catches, and list each moderator's activity.
They cover the last 30 days unless the AI asks for another window of up to 366 days.
Confirmations¶
Bernard asks you before it makes an enforcement change, adds a role, changes a role's vote score, grants a role a capability, moves an event's logs to another channel, replies to a ticket, resolves or closes one, removes alt accounts, unlinks or merges identities, or deletes anything.
If your client supports MCP elicitation, it asks you directly, and your answer overrides the AI's.
Otherwise the AI gets a preview to show you, and repeats the call only once you agree.
Untrusted Text¶
Text written by Discord members or other API callers, such as ticket entries, names, and filter patterns, reaches the AI marked as untrusted, and Bernard tells it never to follow instructions in that text.
Warning
Everything the AI reads with your key, including members' tickets and alt identities, goes to its provider, so connect only tools you trust with that data.