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:

NameTypeDescription
enable_registrationboolAlso expose a register endpoint (default: true)
url_prefixstringURL prefix for the auth routes (default: /auth)
access_token_minutesint?Access token lifetime in minutes
refresh_token_daysint?Refresh token lifetime in days
project_idstringUUID 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:

NameTypeDescription
providerstringgoogle, github, or azure
client_id_envstring?Env var holding the client ID
client_secret_envstring?Env var holding the client secret
scopeslist[str]?OAuth scopes to request
redirect_uristring?Override the callback URL
project_idstringUUID 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:

NameTypeDescription
default_classeslist[str]?AnonRateThrottle, UserRateThrottle, ScopedRateThrottle
ratesdict?Rates per scope, e.g. {"anon": "100/hour", "user": "1000/day"}
project_idstringUUID 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:

NameTypeDescription
schemestringurl (default), header (X-API-Version), query, or accept
default_versionstring?Version used when the client sends none
allowed_versionslist[str]?Whitelist of accepted versions
project_idstringUUID 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.