members_ban
Permanently ban a user from a Discord guild, preventing rejoin until unbanned. Optionally delete their recent messages. Requires explicit confirmation for this destructive action.
Instructions
Purpose: Ban a user from a guild. DESTRUCTIVE - user can't rejoin until unbanned.
When to use:
Permanent removal of a malicious user.
When NOT to use:
Soft-removal → use
members_kick.Multiple users → use
members_bulk_ban.
Optional delete_message_seconds (0..604800) deletes that user's recent messages.
Returns: {banned, user_id, guild_id}. Idempotent - re-banning is a no-op.
Security: gated by ConfirmRequired. Pass __confirm:true AND set MCP_DRY_RUN=false to actually ban.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_id | Yes | Member to ban | |
| guild_id | Yes | Guild to ban from | |
| __confirm | No | Set true to authorize this destructive operation. Also requires the server to run with MCP_DRY_RUN=false; otherwise a DRY_RUN_PREVIEW is returned. | |
| audit_reason | No | Reason recorded in audit log (X-Audit-Log-Reason header) | |
| delete_message_seconds | No | Delete the user's messages from the last N seconds (0..604800 = up to 7 days) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||