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, then let an agent use it directly or through a context or expiring lease. baton runs the command or HTTP request with the credential and hides known secrets in the result.
Try it
Requires Python 3.10+ and uv. Install baton-auth from PyPI:
uv tool install baton-auth
baton import # import existing local logins (gh, aws, npm, ...)
# or prompt privately for a single service:
baton add github
baton run -- gh api /user
baton http https://api.github.com/user
baton setup --auto # connect installed MCP clients
baton add SERVICE prompts privately for required fields (or reads from piped stdin). Commands run in your working directory with a temporary HOME containing only that context's CLI settings.
baton setup --auto configures detected MCP clients (cursor, claude-desktop, windsurf, zed, vscode, muse-code, hermes-agent), or pass --client CLIENT (codex, claude-code, agents-md, ...). baton setup prints portable MCP config JSON. 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.5
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.5.tar.gz | 168.0 kB | Without provenance | Details for baton_auth-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| baton_auth-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for baton_auth-0.1.5-py3-none-any.whl |
Total release size: 219.9 kB
Release files / baton_auth-0.1.5.tar.gz
| Download URL | baton_auth-0.1.5.tar.gz |
|---|---|
| Size | 168.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9454c87a34d8bc3441ed5d079b88786e880b6b811c309425577759886280811e
|
|
BLAKE2b-256 checksum How to use checksums |
8947a3163692e09f20227fb37d94bb60068da1214704818cbf41b0f9e7da17de
|
| 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.5-py3-none-any.whl
| Download URL | baton_auth-0.1.5-py3-none-any.whl |
|---|---|
| Size | 51.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d173d6a903b3a500e8e8969c3edbad825296660aeb0767af241992770c0ab88b
|
|
BLAKE2b-256 checksum How to use checksums |
b1c66d8e74db6756bd3e7be4777f54ed6ac1ebeb6b544a09d255457f6d3fa538
|
| 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.5
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.