Skip to content

v0.4.2

Choose a tag to compare

@chris-dare chris-dare released this 21 Jun 14:37
147095f

Zero-infra quickstart + key management CLI

ApiKeyAuth no longer requires Postgres or Redis to get started. Pass a SQLite URL and the schema is created on first request — no migration step, no containers:

auth = ApiKeyAuth(database_url="sqlite+aiosqlite:///./keys.db")

Redis is optional in all configurations. When REDIS_URL is absent, rate limiting is disabled and logged; everything else works normally.

New: pontifex-mcp CLI

Migrations and key provisioning are now first-class CLI operations — no custom scripts needed.

pontifex-mcp db upgrade — runs the packaged Alembic migrations against Postgres. Safe to call on every deploy; concurrent runs are serialized via a Postgres advisory lock so a multi-replica rollout never races.

$ pontifex-mcp db upgrade
INFO  [alembic.runtime.migration] Running upgrade  -> 001, core schema
INFO  [alembic.runtime.migration] Running upgrade 001 -> 002, audit log indexes

pontifex-mcp keys create/list/revoke — full key lifecycle. The plaintext token is shown once at creation and never stored; only the SHA-256 hash is written to the database. Revocation invalidates the Redis cache immediately.

$ pontifex-mcp keys create --owner usr_01 --label "prod" --scopes payments:invoices:read
sk_live_...   ← copy now, shown once

Breaking change

The Postgres schema was renamed from core to pontifex_mcp_core (#92). Existing Postgres deployments need a one-time migration:

ALTER SCHEMA core RENAME TO pontifex_mcp_core;

Then run pontifex-mcp db upgrade to apply the remaining migrations.

Fixes

  • ApiKeyAuth with DATABASE_URL set no longer activates API-key auth on a JwtAuth server (#93)
  • keys revoke now invalidates the Redis cache immediately — revocation is not TTL-delayed (#97)
  • Scope validation requires 3-part domain:resource:action format; 2-part scopes are rejected at creation (#97)
  • keys create on Postgres without db upgrade gives a clean "schema not set up" error instead of raw SQL (#97)
  • Model server_default values aligned with migrations so raw INSERTs behave identically on SQLite and Postgres (#98)

Full Changelog: v0.4.1...v0.4.2