auth-guide
auth-guide is a reference authentication provider for mcp-guide version 2.0.0 and later, used only when running the MCP in https mode.
This implementation is a local account and bearer-token service supporting Guide authentication decisions, and an HTTPS management API with an administration CLI. Persistent account data uses an encrypted SQLite database. This reference implementation does not support mTLS.
auth-guide requires Python 3.12 or later.
Local TLS authority
The library provides a provider-owned local certificate authority for the reference service. Initialise it once before any other certificate operation; the CA and server private keys remain in the platform secret store, while public certificate lifecycle metadata is kept under the configuration directory, ~/.config/mcp-guide/auth/ by default. The administration CLI provides the supported initialisation and trust-management commands.
System trust changes are explicit privileged operations. Debian-family systems use update-ca-certificates; Red Hat-family systems use update-ca-trust and the p11-kit anchor directory. The latter is supported by its platform facade, but native Red Hat validation remains an operator/CI responsibility. macOS uses the System Keychain with an SSL-only trust setting. Linux systems that use Java-style trust stores such as Amazon Corretto require manual integration of the generated CA certificate.
Platform secret store
Provider-owned secret values are held outside configuration and database files. The runtime asks keyring for the sensible backend on the current operating system: normally macOS Keychain on macOS and Freedesktop Secret Service on Linux. Linux deployments need a running D-Bus session and a Secret-Service-compatible keyring, such as GNOME Keyring.
Operators can configure a compatible non-default backend using the standard keyring configuration mechanism. That choice is part of the host's security boundary; auth-guide neither substitutes a fallback nor attempts to classify the configured backend's storage security.
Running the local provider
The local HTTPS provider is operated with auth-guide server. First create any optional configuration scaffold, initialise the local certificate authority, and create the first administrator. init displays the initial password and bearer token once, so run it from a terminal and store those credentials safely.
$ auth-guide config init
$ auth-guide ca init
$ auth-guide init admin@example.com
Start the provider as a detached local process, then inspect its structured JSON status:
$ auth-guide server start
$ auth-guide server status
server start waits for HTTPS readiness for up to 30 seconds. It does not create or migrate a certificate authority, encrypted account database, or platform-secret-store key; complete the explicit setup above first. Use --listen (or -L) only with server start or server foreground to override the configured listener for that invocation.
For development or external supervision, run the service in the foreground:
$ auth-guide server foreground --listen https://localhost:8443
The lifecycle commands use state files that reside in the configuration directory. server restart rebuilds the running service in place after rereading its TOML configuration, while retaining its PID.
server stop requests graceful shutdown and never escalates to SIGKILL automatically.
$ auth-guide server restart
$ auth-guide server stop
API reference
This reference implementation exposes a bearer-authentication decision endpoint and a separate HTTPS management API. Alternative providers can implement the same contracts without using this database, CLI, or internal code.
Authentication and management endpoints require an Authorization: Bearer <token> header and return JSON. UUID values are strings; timestamps are ISO 8601 strings. An Account response contains id, email, grants, created_at, expires_at, full_name, and must_change_password. A Token response contains id, account_id, label, scopes, and created_at. Successful deletion returns 204 No Content.
GET /openapi.json does not require bearer authentication and returns the machine-readable OpenAPI description of the authentication and management endpoints. Interactive API documentation is disabled.
Guide authentication decision
| Method | Path | Request | Response |
|---|---|---|---|
POST |
/v1/authenticate |
No body | 200 {"account_id": "UUID", "scopes": ["admin"]}; scopes is empty for a non-administrator. |
Management API
Management operations use the same bearer authentication. Account operations that target another account require the appropriate account-management grant; token operations for another account require tokens:manage.
| Method | Path | Request parameters or JSON body | Response |
|---|---|---|---|
GET |
/v1/accounts/me |
None | 200 Account |
PATCH |
/v1/accounts/me |
JSON: optional email, full_name |
200 Account |
POST |
/v1/accounts/me/password |
JSON: password (minimum 12 characters) |
200 Account |
POST |
/v1/accounts/me/close |
None | 200 Account with an immediate expiry |
GET |
/v1/accounts |
Optional query: email |
200 Account[], or one Account when email is supplied |
POST |
/v1/accounts |
JSON: email, password, grants; optional full_name, timezone-aware expires_at |
201 Account |
GET |
/v1/accounts/{account_id} |
Path: account_id |
200 Account |
PATCH |
/v1/accounts/{account_id} |
Path: account_id; JSON: one complete grants list or add_grants/remove_grants, optional reactivate |
200 Account |
DELETE |
/v1/accounts/{account_id} |
Path: account_id |
204 |
PATCH |
/v1/accounts?email={email} |
Query: email; JSON: as for the UUID-targeted PATCH |
200 Account |
POST |
/v1/accounts/password?email={email} |
Query: email; JSON: password (minimum 12 characters) |
200 Account |
DELETE |
/v1/accounts?email={email} |
Query: email |
204 |
POST |
/v1/accounts/{account_id}/password |
Path: account_id; JSON: password (minimum 12 characters) |
200 Account |
GET |
/v1/tokens |
Optional query: exactly one of account_id, account_email |
200 Token[] |
POST |
/v1/tokens |
JSON: label, scopes; optional exactly one of account_id, account_email |
201 Token plus once-only token bearer string |
PATCH |
/v1/tokens/{token_id} |
Path: token_id; JSON: label |
200 Token |
DELETE |
/v1/tokens/{token_id} |
Path: token_id |
204 |
CLI reference
The administration CLI is an HTTPS API client, not a direct database interface. Supply an operator bearer through AUTH_GUIDE_TOKEN or --token; use --address/-A to select the provider address.
| Commands | Management operation |
|---|---|
account list, account show ACCOUNT, account me |
List accounts, retrieve an account by UUID or email, or retrieve the authenticated account. |
account create EMAIL, account delete ACCOUNT |
Create or permanently delete an account; creation prompts for the initial password. |
account update, account reactivate ACCOUNT, account password, account reset-password ACCOUNT, account close |
Update the authenticated profile, reactivate an account, replace a password, or close the authenticated account. Password commands use hidden prompts. |
grant list ACCOUNT, grant set ACCOUNT, grant add ACCOUNT GRANT, grant remove ACCOUNT GRANT |
Read, replace, add, or remove an account's grants. Replacing with no grants requires --clear. |
token create LABEL, token list, token relabel TOKEN_ID LABEL, token revoke TOKEN_ID |
Create, list, relabel, or revoke bearer tokens. Token creation displays the new bearer value once. |
Run auth-guide --help or auth-guide COMMAND --help for command-specific options, including configuration, certificate-authority, and server lifecycle commands.
License
MIT. See LICENSE.
Metadata
Release files for auth-guide 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| auth_guide-0.5.0.tar.gz | 50.9 kB | Without provenance | Details for auth_guide-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| auth_guide-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for auth_guide-0.5.0-py3-none-any.whl |
Total release size: 113.2 kB
Release files / auth_guide-0.5.0.tar.gz
| Download URL | auth_guide-0.5.0.tar.gz |
|---|---|
| Size | 50.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3fc798a792e9307b4b937278025ba455a7844c7382ae5f8f5038e5f7147c4356
|
|
BLAKE2b-256 checksum How to use checksums |
40d4be55c111fd559882a125f436a0271041b868a3af4411771256188a4d50d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / auth_guide-0.5.0-py3-none-any.whl
| Download URL | auth_guide-0.5.0-py3-none-any.whl |
|---|---|
| Size | 62.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7d13fc5b41c85468878c277748aaaca1a6045dedd65ba536ab907fcdf42bc72d
|
|
BLAKE2b-256 checksum How to use checksums |
ada12459a7396d7f0a9c6d59e9f01dc54a1335380e6efd8eb0403d33b23da43b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for auth-guide 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.