baton is a local authentication broker for AI agents and MCP tools. It lets an agent use your GitHub, cloud, or API credentials without putting the secret value into its chat or tool output.
Save a credential once, group it into a context such as work, then give an agent a lease: a temporary pass that can expire or be revoked. baton uses the credential for a command or HTTP request and hides known secrets in the result.
Try it
Requires Python 3.10+ and uv. Install the package from GitHub:
uv tool install git+https://github.com/DanDekker/baton.git
baton cred add gh-work --provider github --field token --context work
baton run work -- gh api /user
baton http work https://api.github.com/user
baton lease new work --ttl 600 --uses 20
baton setup # prints MCP config for an agent client
The bare --field token prompts privately. Commands run with a temporary HOME containing that context's CLI settings.
baton setup --client CLIENT connects Codex, Claude Code, Cursor, VS Code, Muse Code, or Hermes Agent. baton setup prints portable MCP config for other clients. Agents with command access can use baton run or baton http.
Cryptography at a glance
| Name | How baton uses it |
|---|---|
| AES-256-GCM-SIV; ChaCha20-Poly1305 fallback | Encrypts credentials in the local vault. |
| BLAKE3 | Derives separate keys, authenticates leases and vault records, and links audit entries. |
| Argon2id | Turns a passphrase into the vault key when passphrase mode is used. |
| HMAC-SHA-256 | Signs AWS requests using Signature Version 4. |
Learn more
- User guide — contexts, leases, providers, refresh, and MCP tools.
- Security and limits — what baton protects, how it stores secrets, and where its boundary ends.
The distribution is named baton-auth and also provides the baton-auth command. The Python import is baton_auth.
baton runs locally for one user on one machine. A temporary HOME keeps CLI configuration separate; it is not a full operating-system sandbox.
Metadata
Release files for baton-auth 0.1.3
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 |
|---|---|---|---|---|
| baton_auth-0.1.3.tar.gz | 153.7 kB | Without provenance | Details for baton_auth-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| baton_auth-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for baton_auth-0.1.3-py3-none-any.whl |
Total release size: 197.1 kB
Release files / baton_auth-0.1.3.tar.gz
| Download URL | baton_auth-0.1.3.tar.gz |
|---|---|
| Size | 153.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3e0400f3336762f67e89cab8f5505b102bc580a8ccaee24c5b846efe2c8d5bd3
|
|
BLAKE2b-256 checksum How to use checksums |
3db05cc3878114ae42175633d4315f8dda473a613d13099fd58355382ae2888a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / baton_auth-0.1.3-py3-none-any.whl
| Download URL | baton_auth-0.1.3-py3-none-any.whl |
|---|---|
| Size | 43.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
839ae00069bc4e0dfea10296dc74d86673d440a43dbbb39364842f0e458883dd
|
|
BLAKE2b-256 checksum How to use checksums |
24fea8c1a55c41c3d6aa4bc4a044a248f6bee84ff7cd551d0e340cbad400bd3d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for baton-auth 0.1.3
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.