Tools Reference
Tools: Auth & API Configuration
These tools configure authentication and API-wide behaviour inside your generated backend project — the app your agent is building. They are unrelated to how your MCP client authenticates to the Zeeb gateway; for API keys and OAuth for the gateway itself, see Authentication.
All tools on this page accept a project_id argument to target a specific project.
zeeb_setup_auth
Wire JWT authentication endpoints into the generated project: login, refresh, logout, and me — plus an optional register endpoint.
zeeb_setup_auth(enable_registration?, url_prefix?, access_token_minutes?, refresh_token_days?, project_id) → str
Arguments:
| Name | Type | Description |
|---|---|---|
enable_registration | bool | Also expose a register endpoint (default: true) |
url_prefix | string | URL prefix for the auth routes (default: /auth) |
access_token_minutes | int? | Access token lifetime in minutes |
refresh_token_days | int? | Refresh token lifetime in days |
project_id | string | UUID of the target project |
Run zeeb_run_migrations afterwards to apply the auth tables.
Example prompt: "Add JWT login and registration to my project"
zeeb_setup_oauth
Configure an OAuth/OIDC login provider for the generated project. Credentials are read from environment variables (set them via zeeb_set_env) — they are never stored in code.
zeeb_setup_oauth(provider, client_id_env?, client_secret_env?, scopes?, redirect_uri?, project_id) → str
Arguments:
| Name | Type | Description |
|---|---|---|
provider | string | google, github, or azure |
client_id_env | string? | Env var holding the client ID |
client_secret_env | string? | Env var holding the client secret |
scopes | list[str]? | OAuth scopes to request |
redirect_uri | string? | Override the callback URL |
project_id | string | UUID of the target project |
Example prompt: "Let users sign in with Google"
zeeb_configure_throttling
Set up project-wide API rate limiting.
zeeb_configure_throttling(default_classes?, rates?, project_id) → str
Arguments:
| Name | Type | Description |
|---|---|---|
default_classes | list[str]? | AnonRateThrottle, UserRateThrottle, ScopedRateThrottle |
rates | dict? | Rates per scope, e.g. {"anon": "100/hour", "user": "1000/day"} |
project_id | string | UUID of the target project |
Per-viewset throttles can be set with the throttles argument of zeeb_create_viewset / zeeb_update_viewset.
Example prompt: "Rate-limit anonymous requests to 100 per hour"
zeeb_configure_versioning
Configure API versioning for the generated project.
zeeb_configure_versioning(scheme?, default_version?, allowed_versions?, project_id) → str
Arguments:
| Name | Type | Description |
|---|---|---|
scheme | string | url (default), header (X-API-Version), query, or accept |
default_version | string? | Version used when the client sends none |
allowed_versions | list[str]? | Whitelist of accepted versions |
project_id | string | UUID of the target project |
Example prompt: "Version my API as v1 and v2 via the URL"
Notes
- A custom user model (
zeeb_create_user_model, see Code Generation) must be created before the first migration — set it up early if you need one. - All configuration writes directly to the project workspace and is committed per your project's git settings.