A Tailscale command line and MCP server for agents and the people who supervise them.
Status: 0.x pre-release, read-only. tailkeeper reads the Tailscale API (32 tools, two of them for alpha features, which MCP lists only with --enable-alpha) and this node's Tailscale state (15 tools). It cannot change a tailnet: apart from the credential's own token request, the only API request it sends other than GET is POST .../acl/validate, to which acl_test, acl_validate and doctor --probe send a test, the live policy, a proposed policy or a synthetic document for validation, which Tailscale documents as never changing the policy, and nothing else; the API client refuses any other. Write tools arrive in milestone M2, behind an approval gate. Until 1.0, a minor release may change the CLI or the MCP tool list (see CHANGELOG.md).
Personal mode protects against misuse through tool calls, not against code that runs as you. tailkeeper runs as your user, so an agent with an unsandboxed shell can rewrite its configuration and audit log. Run your agent in a sandbox that cannot write tailkeeper's configuration directory. Hardened mode, which moves tailkeeper to its own service account, is on the roadmap.
This build also has one credential-free build-info tool.
To identify the installed Tailkeeper build without loading configuration or credentials,
run tailkeeper self info --json. The MCP equivalent is tailkeeper_info; it uses no credential per call, although
an MCP session can load its configured providers when it starts.
It distinguishes this binary from local version, which reports Tailscale versions.
Empty assessment schema/capability lists mean that assessment is not implemented.
See security coverage for evidence and deployment limits.
Tailkeeper lets you inspect your Tailscale network from the command line or an MCP client. For example, after setup, ask your assistant to list your tailnet's devices. Tailkeeper only reads: apart from the credential's token request, its only request other than GET asks Tailscale to validate a policy, which changes nothing (see the status line above). Review the privacy limits above and below before connecting an agent.
-
Install. With Go 1.27.4 or later, run:
go install github.com/abm9111/tailkeeper/cmd/tailkeeper@latest
Ensure Go's binary directory is on your
PATH:GOBINif set, otherwiseGOPATH/bin. That binary is built on your machine, so the release checks under Verify a release do not cover it; for a binary you can verify, download an archive as described under Install. -
Check the install. Run
tailkeeper versionandtailkeeper scopes. A Go-installed binary reportstailkeeper dev;scopeslists the read permissions each tool needs. Neither command needs a Tailscale credential. -
Connect Tailscale. Create an OAuth client with read scopes, then follow Configure to set up a secret-manager wrapper and run
tailkeeper doctor. -
Connect your assistant. Follow Use for Claude Code, Cursor, VS Code, or Codex, then ask it to list your devices. Device names and some other network details are not masked; see What it does differently and
SECURITY.mdbefore sharing output.
- One registry, two surfaces. Every tool is an MCP tool and a CLI command with the same parameters, validation and output. MCP lists the alpha tools only with
--enable-alpha. - Allowlisted output. Responses are decoded into tailkeeper's own types. Key material, invite links, webhook secrets and login URLs are never returned, and the fields that hold devices' public endpoints are dropped. Webhook and log-stream URLs are cut to scheme and host plus a hash of the path, wherever they appear, the audit log's target names and properties, details, errors and value previews and a log stream's last delivery error included; in those previews, a string, number, object or array under a key that names a credential (token, secret, password, API key and the like) is removed, and
true,falseandnullstay, whether the key sits in a JSON document, in a string that holds one, or in a policy file's HuJSON (comments, also before the first brace and after the last, a byte order mark and trailing commas; text that is neither JSON nor HuJSON, such as a truncated or doubled document, a document with other text before or after it ({"token":"X"} x) orkey=valuepairs, stays as written). That cut is best effort:SECURITY.mdlists the shapes it leaves whole.audit_log'stargetfilter reads the target as shown, so it cannot confirm a guess at a path. A tripwire withholds any result that still contains a Tailscale key or a JWT. - Untrusted text is marked. Every string is escaped before it is shown; only the policy text of
acl_getkeeps its line feeds and tabs, and the CLI prints it behind line numbers, after a notice that it is untrusted, as it does Tailscale's reasons inacl test. Names, tags and messages come from the tailnet: they are also capped, have Tailscale key and JWT shapes replaced, are flagged in output schemas (x-tailkeeper-untrusted) and are called out to the model. - Least privilege. One read credential with read scopes only.
tailkeeper doctorfails when the credential shows a write scope and warns for an API access token. tailkeeper never readsTS_*orTAILSCALE_*variables. - Personal data masked by default. Login names, display names, email addresses and users' tailnet IDs come back cut to their first character (
a…@example.com); the owner name Tailscale gives tagged devices,tagged-devices, names no person and stays whole. In all other text from the tailnet, and in the error messages of tool calls, email addresses are masked the same way and public IP addresses are cut to their /24 or /48 network. Set"personalData": "show"in the configuration to see them whole. Masking reduces what a model sees by default; it does not hide everything:- Device names and hostnames are not masked as personal names are (every other tool needs them, and they often contain a first name); an email address or a public IP address written inside one is masked like any other text, so look a device up by its node ID.
- Configuration a diagnosis needs stays whole: DNS resolvers and answers, routes, a webhook's or log stream's host, OAuth redirect URIs, the policy file's external link, and local preferences other than the operator and nickname.
docs/tools.mdlists these fields per tool. - Free text is masked by pattern, as a best effort: a name written in it, or an address in an unusual form that
SECURITY.mdlists under Known limits as not read, is not found. - Masking reads email addresses written with
@, its JSON escape and%40, as a character reference (@) or full-width, and IP addresses in their usual written forms and in hexadecimal, octal, zero-padded and full-width ones (a bare number is an address only as a URL host); the forms it does not recognise are listed under Known limits inSECURITY.md. The name of a synced group (group:engineering@example.com) is left whole wherever masking runs, in the policy, in free text and in error messages. - The policy file (
acl_get) masks email addresses only: host names, tags, groups, SSH users, addresses and comments stay whole (with a privacy key, a[p:the policy holds is shown with its bracket spelled out, so a marker on the page is one tailkeeper appended), and the whole policy, your access topology, goes to the model provider whenever an agent reads it. While masking is on,acl_getleaves out the policy's ETag and gives the size and SHA-256 of the policy as shown, every page joined: those of the file itself would confirm a guessed address. - With a privacy key configured, every masked name and address in a result ends in a pseudonym such as
[p:k7x2m9qd4a], the same in every call. Filters take that pseudonym. The error messages of tool calls, and the reasonsacl_testreturns, are masked without pseudonyms: they echo what the caller typed, and a pseudonym beside a guess would confirm it. While masking is on, filters that would confirm a guess are refused (filter_refused): a typed login indevices_list'suser(tagged-devicesis accepted), ahostnameindevices_listthat masking would change (an email address, a public IP address, or text that looks like one; use the node ID for such a device), a~searchor an address inaudit_log'sactor, anything but an exact ID in itstarget, and a typed login inacl_test'ssrcor in a destination, an SSH destination included (name the user by the pseudonymusers_listshows).audit_log's old and new values come back as keyed digests, or not at all without the key. Whatacl_testis given comes back as typed (an SSH user, a destination, a protocol), masked without a pseudonym. An SSH user is an account name, so it is not held to that rule; when the source is a pseudonym, each distinct SSH user of the call takes one validation token, which keeps guesses at a hidden local part toacl.validatePerMinutea minute. A file the operator names is the operator's own document: its logins are accepted, sent to Tailscale and shown masked without pseudonyms.
- Audited reads. A hash-chained JSONL log records which tool ran, for whom, and how much it returned, never the values. Nothing is deleted from it:
tailkeeper audit rotateverifies the log, keeps it beside the new one as an archive until you delete it, and starts the new log with an entry that records where the archive ends.tailkeeper audit verifychecks the log and every archive it continues.tailkeeper doctorsuggests a rotation once the log passes 64 MiB. Rotation is not available on Windows yet.tailkeeper audit verifychecks that the lines present chain correctly. It cannot tell that lines were removed from the end of the log, that the log was deleted and started again, or that an archive was deleted (it says so, warns, and exits 0). A read whose line cannot be written (the lock held for more than 2 seconds, an unreadable log, a full disk) is not recorded, and tailkeeper warns on standard error. tailkeeper does not log its own start-ups or configuration changes, so settingaudit.readstononeleaves no trace in the log.
Download the archive for your platform (macOS and Linux on amd64 and arm64, Windows on amd64) from the latest release, verify it (next section), then put tailkeeper on your PATH, for example in ~/.local/bin.
The planned universal macOS MCP bundle and its verification and host-acceptance status are described in docs/install/mcpb.md. Supported-host installation remains pending; the direct-binary instructions here remain available.
On Windows the archive is a .zip, and the Windows build differs: it has no exec provider (start tailkeeper under your secret manager's run command and use the env provider), it does not check the owner or permissions of the configuration and credential files (tailkeeper doctor warns), and it cannot rotate the audit log. The audit log has no lock between processes there, so two tailkeeper processes writing at the same moment can break its chain. docs/windows.md lists every difference and the tests that do not run on Windows.
With Go 1.27.4 or later, go install github.com/abm9111/tailkeeper/cmd/tailkeeper@latest also works; that binary reports tailkeeper dev instead of its version, and it is built on your machine rather than by the release workflow, so the checks below do not apply to it.
From a clone, make install runs the gate (make verify), then installs the binary as ~/.local/bin/tailkeeper (set BINDIR to change the directory). It refuses uncommitted changes, so tailkeeper version always names a commit. Point MCP hosts at the installed binary, not at bin/tailkeeper: make build rewrites bin/ on whatever branch is checked out.
Every release is built by .github/workflows/release.yml from a signed tag. checksums.txt lists the SHA-256 of every archive and SBOM. A cosign keyless signature over it (checksums.txt.sigstore.json) proves that file came from that workflow, and a GitHub build-provenance attestation covers each file it lists; a second attestation step covers checksums.txt itself, which cannot list its own hash. Download the archive, checksums.txt and checksums.txt.sigstore.json, then run these lines in order and stop at the first one that fails (a shell does not stop for you when you paste them, so a later line can succeed after an earlier one failed):
VERSION=v0.6.0
ARCHIVE=tailkeeper_${VERSION#v}_darwin_arm64.tar.gz # the archive you downloaded
IDENTITY="https://github.com/abm9111/tailkeeper/.github/workflows/release.yml@refs/tags/$VERSION"
cosign verify-blob checksums.txt \
--bundle checksums.txt.sigstore.json \
--certificate-identity "$IDENTITY" \
--certificate-oidc-issuer https://token.actions.githubusercontent.com
line="$(awk -v f="$ARCHIVE" '$2 == f' checksums.txt)" # the line of checksums.txt that names your archive
if [ -n "$line" ]; then printf '%s\n' "$line" | shasum -a 256 -c -; else echo "no line for $ARCHIVE in checksums.txt" >&2; false; fi # Linux: sha256sum -c -
gh attestation verify "$ARCHIVE" --repo abm9111/tailkeeper --cert-identity "$IDENTITY"
gh attestation verify checksums.txt --repo abm9111/tailkeeper --cert-identity "$IDENTITY"
All of these must succeed. cosign (version 3; the release is signed with 3.1.3) must print Verified OK. The checksum step must say <archive>: OK. FAILED means the archive is not the one the release built. no line for <archive> in checksums.txt means checksums.txt has no line named exactly like your archive, because you renamed it or downloaded another file, and the step exits 1. Do not use the archive in either case. The step looks for the line itself because the sha256sum that macOS ships prints nothing and exits 0 when it is given no checksum line; use shasum -a 256 -c - on macOS and sha256sum -c - on Linux. gh attestation verify must exit 0; on a terminal it also prints Verification succeeded! and names abm9111/tailkeeper as the build repository, and when its output is piped it prints nothing, so read the exit status. The signature ties checksums.txt to the workflow, the checksum ties your archive to checksums.txt, and the attestation ties your archive to the workflow on its own. On Windows, Get-FileHash -Algorithm SHA256 <archive> prints the hash to compare with the archive's line in checksums.txt.
Each archive has a CycloneDX SBOM beside it (<archive>.sbom.cdx.json), listed in checksums.txt like the archive. Do not run a binary whose checks fail; report it as described in SECURITY.md.
You can also rebuild a release rather than trust the workflow's build. Releases are built with GoReleaser, at the version the repository pins (the command below), and the Go toolchain named in go.mod; a binary rebuilt from a git clone at the tag, in the same shell as above, is byte-identical to the one inside the archive. The release workflow rebuilds every binary on a second architecture and compares them before it publishes.
git clone --branch "$VERSION" https://github.com/abm9111/tailkeeper.git
cd tailkeeper
GOTOOLCHAIN="$(awk '$1 == "toolchain" { print $2 }' go.mod)" \
go run github.com/goreleaser/goreleaser/v2@v2.18.2 build --clean
tar -xzOf /path/to/"$ARCHIVE" tailkeeper | cmp - dist/tailkeeper_darwin_arm64*/tailkeeper && echo identical
- In the Tailscale admin console, create an OAuth client with read scopes only.
tailkeeper scopesprints the scopes, and which tools need each (also indocs/scopes.md). - Write the configuration, mode 0600, to
~/Library/Application Support/tailkeeper/config.hujsonon macOS or~/.config/tailkeeper/config.hujsonon Linux (other locations are listed under Configuration reference):
docs/recipes/ shows wrappers for two secret managers, a GitHub Actions check of a policy change, and a scheduled policy check. A wrapper is any program that puts the two variables (and TAILKEEPER_PRIVACY_KEY, below) in the environment of the command it runs, without printing them.
tailkeeper refuses a key it does not know, a key written twice and a key whose letter case differs, so a typo is an error, not a setting that does nothing.
- Run
tailkeeper doctor. It checks the configuration's permissions, the credential's scopes and expiry, the privacy key, the localtailscaleCLI, the advisory catalog built into the binary (a warning within 14 days of its expiry, when it is not valid yet or when approved rules have a review that is not fresh, and a failure after the expiry) and the intent set a scan would use, and the audit log.
credentials.read.provider says where the read credential comes from. Every provider reads the same variables: TAILKEEPER_READ_CLIENT_ID and TAILKEEPER_READ_CLIENT_SECRET for an OAuth client (recommended), or TAILKEEPER_READ_API_KEY for an API access token (doctor warns: such a token carries its owner's full permissions); never both. A value may be file:/absolute/path, which is read and trimmed (a relative path, file:secrets/key, is refused with an error that asks for an absolute one, as the file provider's path and the oidc provider's tokenFile already are; a reference with spaces, a tab or a line end before or after it, file:/path, is refused with an error that asks for them to be removed, because read as it stands it would be a token that spells a path; a plain value is trimmed); in this unreleased foundations change, that file uses the checked private-file reader, refuses symlinks/replacement and is limited to 1 MiB. On Unix use mode 0600 in a directory owned by you or root and not writable by others. Shared-readable container mounts accepted by 0.6.0 must migrate to private regular files or an exec provider. Windows owner/ACL limits are described in SECURITY.md. TAILKEEPER_PRIVACY_KEY sits beside them. tailkeeper never reads TS_* or TAILSCALE_* variables.
| Provider | Fields | Where the secret comes from |
|---|---|---|
env |
none | tailkeeper's own environment. The simplest, but the variables then reach every process that environment starts; on a workstation prefer exec or file. |
file |
path, absolute |
a file of NAME=value lines (# comments and blank lines ignored, surrounding quotes trimmed). On macOS and Linux it must be a regular file with no group or other access (mode 0600), owned by you or root, in a directory owned by you or root that no group or other user can write; otherwise config_unsafe. |
exec |
command: an argument list whose first element is an absolute path (not cleaned: /usr/bin/../bin/x is accepted and runs as written) |
a wrapper that sets the variables, then runs the rest of its arguments (the example above, and docs/recipes/). tailkeeper re-runs itself under it, so the secret never reaches your shell. Not available on Windows: start tailkeeper under the wrapper yourself and use env. |
oidc |
clientId (required), audience (default api.tailscale.com/<clientId>), tokenFile (absolute path) |
no stored secret: a workload identity token, read from tokenFile, else from GitHub Actions (ACTIONS_ID_TOKEN_REQUEST_URL and ACTIONS_ID_TOKEN_REQUEST_TOKEN; the job needs permissions: id-token: write), else from TAILKEEPER_OIDC_TOKEN, and exchanged for a Tailscale token. With no stored secret there is no privacy key, so masked values carry no pseudonyms. |
A field a provider does not use is ignored, not refused: a command beside a file provider's path never runs. Only env refuses other fields.
// env: the variables are in the environment of whatever starts tailkeeper
{"contexts": {"home": {"tailnetId": "T1234CNTRL", "credentials": {"read": {"provider": "env"}}}}}// file
{"contexts": {"home": {"tailnetId": "T1234CNTRL", "credentials": {"read": {"provider": "file", "path": "/path/to/read.env"}}}}}// oidc, for example in a GitHub Actions job
{"contexts": {"ci": {"tailnetId": "T1234CNTRL", "credentials": {"read": {"provider": "oidc", "clientId": "kFED1CNTRL"}}}}}The oidc identity of a GitHub Actions job is a read-all-policy credential, because masking happens in tailkeeper: a job that holds it reads the policy, the devices and their posture attributes whole. The recipe in docs/recipes/github-actions.md runs the job that holds it in a named GitHub environment, with id-token: write on that job only. Every step of that job, including the pinned actions/checkout and sigstore/cosign-installer and the downloaded binary, can request the OIDC token; the SHA pins and the environment's reviewer are the controls. With a required reviewer on the environment and the federated credential's subject bound to that environment, only an approved run gets the identity; without the binding, a job that names no environment gets a token with no approval, and without a reviewer, anyone who can push a branch to the repository can edit the workflow and use it. Under pull_request the workflow that runs is the pull request's own, so add the workflow file to CODEOWNERS beside the policy and invariants files and require code-owner review on the default branch. A pull request from a fork gets no OIDC token. The tailnet ID and the client ID are environment secrets of tailkeeper-policy, not repository secrets, so only an approved job receives them and no log shows them. On a public repository the log of a run on a branch of the repository is public, and it carries text taken from the live policy (annotations and a step summary), masked for personal data but not for tag names, host names or the shape of a rule.
Put TAILKEEPER_PRIVACY_KEY, 64 hexadecimal characters (openssl rand -hex 32), where the read credential is kept: the environment for the env provider, the wrapper's secret store for exec, the credential file for file. The oidc provider stores no secret, so it has no privacy key, and masked values there carry no pseudonym. tailkeeper derives two keys from it and never shows it. Pseudonyms appear in results only: the error messages of tool calls are masked without them, because an error echoes what the caller typed. Without it, masking still works, but masked values carry no pseudonym, a pseudonym filter fails with privacy_key_unavailable (exit 5), and audit_log leaves out its digests. Replacing the key changes every pseudonym. tailkeeper doctor reports whether it is loaded. A key that is simply not there is a choice and is not warned about; a variable set to nothing, a file: that holds nothing, or (in a file provider's credential file) a line that names TAILKEEPER_PRIVACY_KEY without being a plain NAME=value line for it, such as one with an export prefix, one behind the UTF-8 byte order mark some editors put at the start of a file, or one with quotes around the name, is a key that looks set and did not load. That, and a key that is set but malformed or unreadable, is said on standard error: once when the MCP server starts, and by each tool command before it runs. The warning names the error code, the variable or the line number and never a value.
| Key | Values |
|---|---|
contexts.<name> |
one per tailnet; the name starts with a lower-case letter or digit, continues with lower-case letters, digits, _ and -, and has at most 32 characters |
contexts.<name>.tailnetId |
the tailnet ID from the admin console's General settings (never -) |
contexts.<name>.credentials.read |
a provider block, above |
contexts.<name>.credentials.read.provider |
env, file, exec or oidc |
contexts.<name>.credentials.read.command |
exec: the wrapper and its arguments. tailkeeper checks that the list is not empty and that its first element is an absolute path, and nothing else; it runs the list followed by its own binary and arguments. A last element --, which ends the wrapper's own options so that it takes the rest as the command to run, is the convention of the two wrapper recipes in docs/recipes/ (1password.md and proton-pass.md): their test checks it, tailkeeper does not check it in your configuration |
contexts.<name>.credentials.read.path |
file: the absolute path of the credential file |
contexts.<name>.credentials.read.clientId |
oidc: the federated identity's client ID (not a credential; the GitHub Actions recipe keeps it in an environment secret anyway, so that no log shows it) |
contexts.<name>.credentials.read.audience |
oidc: the token's audience; api.tailscale.com/<clientId> when left out |
contexts.<name>.credentials.read.tokenFile |
oidc: the absolute path of a file that holds the identity token |
defaultContext |
the context to use when none is named |
local.tailscaleBinary |
absolute path of the tailscale CLI; otherwise the first of its usual install locations that exists |
local.socket |
absolute path of tailscaled's socket, passed to the CLI as --socket |
local.dnsQueryAllowlist |
names, or suffixes written with a leading dot, that tailkeeper local dns-query may resolve besides the tailnet's MagicDNS suffix |
mcp.profile |
reads (the default), core or full (the same tools in 0.x) |
mcp.enableAlpha |
true also advertises the tools for alpha Tailscale features |
audit.reads |
metadata (the default: which tool ran, for whom, how much it returned) or none. The security assessment records every source it reads, before and after, in the audit log, so with none it refuses to run and says to set metadata |
acl.invariantsFile |
absolute path of the invariants file (a HuJSON object with tests and sshTests and nothing else) that acl_validate and acl validate add to every validation, the live policy's included; unset by default (--invariants FILE replaces it for one command, --no-invariants leaves it out). It must be a regular file that you own, in a directory you own, and writable by no one else (on Windows only the regular file is checked). A path that is set and cannot be read fails every call that uses it: config_invalid for a file that is missing or unreadable, config_unsafe for the wrong owner or mode, both exit 6. A 0.5.0 binary refuses this key, so set it in a context only 0.6.0 uses |
acl.validatePerMinute |
a whole number from 1 to 120 (default 30): how many policy validation requests one tailkeeper process decides to send per minute (a retry of a request takes no token). A 0.5.0 binary refuses this key |
personalData |
mask (the default) or show |
The context is chosen by --context NAME (before the command, or after mcp), then TAILKEEPER_CONTEXT, then defaultContext, then the only context there is. A system configuration, /etc/tailkeeper/config.hujson (Windows: %ProgramData%\tailkeeper\config.hujson), wins outright over yours; doctor says which file it read. Your configuration lives at ~/Library/Application Support/tailkeeper/config.hujson (macOS), $XDG_CONFIG_HOME/tailkeeper/config.hujson, by default ~/.config/tailkeeper/config.hujson (Linux), or %AppData%\tailkeeper\config.hujson (Windows). The audit log is ~/Library/Logs/tailkeeper/audit.jsonl (macOS), $XDG_STATE_HOME/tailkeeper/audit.jsonl, by default ~/.local/state/tailkeeper/audit.jsonl (Linux), or %LocalAppData%\tailkeeper\audit.jsonl (Windows).
tailkeeper sends its API requests only to api.tailscale.com, over HTTPS. It honours HTTPS_PROXY and NO_PROXY as Go programs do; a proxy sees the host name and the encrypted connection, not the requests. The local tools run the tailscale command line instead, and the oidc provider, inside GitHub Actions, also asks the job's token endpoint for an identity token.
tailkeeper devices list --stale-days 30
tailkeeper devices routes web-1
tailkeeper local status --peers
tailkeeper acl get # the policy file, a page at a time
tailkeeper acl test tag:ci --accept tag:prod:22 # exits 9 if tag:ci cannot reach tag:prod on port 22
tailkeeper --json keys list
tailkeeper security scan fleet # judge the fleet by the shipped advisories; exits 8 on a finding, else 1
tailkeeper security explain --invariants FILE # was the live policy witnessed to do what each expectation says; exits 8 if one is unmet
tailkeeper security scan fleet|local [--threshold low|medium|high|critical] [--invariants FILE | --no-invariants] [--format text|json|markdown|github] [--json] [--quiet] (MCP: security_scan) reads the device list (fleet) and this node's own facts, and judges each device by the advisories built into the binary: affected, potentially affected, unknown (with a reason) or not affected. It lists at most 100 findings, affected first, with the total and truncated set honestly, and no way to page to the rest. It has no argument for a catalog, a path, a URL or an expectation over MCP, and sends nothing but a GET of the device list. complete and exit 0 hold only relative to the shipped catalog, the few rules built into the binary (counted in catalog.rules): they say nothing about advisories it does not hold and are not a statement that the fleet is safe. A scan is complete only if every requested coverage is: versions, features and the catalog (intent is requested only when an intent set is given; with none, the report says in a row of its own that it was not requested). With the advisories shipped today four rules (TS-2026-014 to TS-2026-017) are still pending, and their unknown findings keep the catalog row partial, so a scan with them cannot exit 0 until the owner approves them; any other gap (a source that failed, a stale review) does the same, and the report names it. Devices are shown by at most the first four characters of their node ID (half of a short one, none of a one-character one: part of an ID is always withheld) and, with a privacy key, a pseudonym; never whole. It records every source it reads in the audit log, so audit.reads must not be none. See the advisory contracts.
The intent of a scan is the owner's expectations of the policy, kept in the same file as the invariants of acl validate: a HuJSON object with tests and sshTests in the policy's own syntax. Without a flag, the command line and MCP use the file acl.invariantsFile names, read exactly as acl validate reads it (a private file of your own, at most 4 MiB; a path that is set and cannot be read is config_invalid, exit 6, never a silent none: an intent that was quietly not requested would turn a partial scan into a complete one). --invariants FILE replaces it for one run and --no-invariants removes it (both together are a usage error, as in acl validate); the file a command line names is the operator's own, and MCP has no argument for either. The file is decoded by the checked loader acl validate uses and adapted into typed expectations (src, proto, srcPostureAttrs, accept and deny of a test; src, dst, accept, deny and check of an SSH test); the deprecated user (for src, in a test) and allow (for accept) are read as the policy engine reads them, so a file acl validate takes is taken; an entry with any other field, a field of another shape or no source is refused, by kind and by place (unsupported_field in entry 2 of tests (line 9, column 3)), never by its words, and a file with problems is refused the same way before any source is read. Nothing judges an expectation yet, so a scan that was given an intent set is requested for it, its intent row is partial (intent not evaluated) and the scan is partial, never complete and never exit 0; the result names the set by intent.digest, intent.revision (the first twelve digits of the digest) and intent.expectations (the digest follows the rule of the other digests of a policy: a keyed digest of the file while personal data is masked and a privacy key is loaded, the plain sha256: hash with personalData: show, and none, with no revision, while masked with no key, since an unkeyed hash of a file that holds logins would confirm a guessed file), and repeats none of its text (a source, a destination, a login) in any format, error or audit line.
--format markdown lays the same report out for a job's step summary or a comment (--format text|json|github are the others; --format json is --json, and --json with another format is a usage error). The verdict is in bold, then the facts and the findings as lists, with the status, the counts, the cut and the exit code of the text and of the JSON. Every string that comes from the tailnet (in a scan, the start of a device's ID) is escaped so that it cannot start a link, an image, an HTML tag, an autolink, a heading, a list item, a table cell or a code span. The masking, the sanitizer and the credential tripwire apply as for the other formats. A scan of two synthetic devices, one of them on an old client (shortened):
tailkeeper security explain [--invariants FILE] [--only ID[,ID…]] [--format text|json|markdown|github] [--json] [--quiet] is the owner's question about the same intent: for each expectation of the file (network-N for the Nth of tests, ssh-N for the Nth of sshTests), whether the live policy was witnessed to do what it says. It is a command-line command only: no MCP tool, argument, resource or prompt reaches it, and it is not in the generated tool reference. Every met and unmet is Tailscale's own validation of the live policy (a copy of its text with its tests taken out, the expectations as tests and a canary beside them, sent to POST .../acl/validate, which changes nothing) and counts only when the canary came back and the live policy was unchanged afterwards; a missing canary, a policy that moved (a failure included), a line nobody can pair, an audit record that cannot be written or a limit of tailkeeper's own leaves a pair unknown, never met or unmet. At most two validation requests are made, each once with no retry, and 64 pairs judged, only for the source and destinations an expectation lists; nothing is enumerated. With no intent set nothing is asked and no credential is needed. The report adds, as candidates and never as causes, the rules of acls, grants and ssh whose selectors match an expectation as text (each at its line and column), the cases the test language cannot express (device posture, app capabilities, via, an autogroup source, rules that were not read), which keep an expectation at met_with_limits, and, under the heading "if SOURCE were compromised, the live policy would let it reach:", an assumption about a compromised source: only the pairs the witnesses show the policy allows. It never says that a service listens, a credential works or an exploit succeeds, and an SSH verdict says nothing of network reachability. Exit 0 only when every selected expectation is met; 8 when any is unmet; otherwise 1 (anything unknown, limited or not evaluated, or no intent set at all). Logins are masked as in acl test, the policy's text and the file's path are never shown, and the audit line records the intent's source, the start of its digest and the counts, no text. See the explanations.
**fleet scan: partial; 1 affected, 0 potentially affected, 8 unknown, 1 not affected (10 findings, 10 listed)**
Facts:
- threshold low: 1 affected and 0 potentially affected at or above it
- coverage catalog: partial - pending rules: 4; unknown findings: 8 (review\_pending 8)
- coverage intent: not\_requested - intent not requested: no intent set is configured
Findings:
- error: CVE-2022-41925 · nOLD… · affected · severity low · Advisory evaluation of reported evidence. · verify: Update Tailscale using the vendor guidance; this rule covers only the reviewed stable-version range.
- notice: TS-2026-014 · nNEW… · unknown · severity unknown · reason review\_pending · This advisory rule is pending review; it neither confirms nor clears this device.
- notice: CVE-2022-41925 · nNEW… · not\_affected · severity low · Advisory evaluation of reported evidence.
Register the MCP server with Claude Code (use absolute paths: MCP hosts start servers with a minimal PATH):
claude mcp add -s user tailkeeper -- "$HOME/.local/bin/tailkeeper" mcp
Other MCP hosts start the same stdio server. Give them the absolute path of the installed binary (/path/to/tailkeeper below stands for it, for example ~/.local/bin/tailkeeper written out in full), because hosts start servers with a minimal PATH. File locations change between host versions; check the host's own documentation if one of these is not where it says.
-
Claude Desktop:
~/Library/Application Support/Claude/claude_desktop_config.json(macOS) or%APPDATA%\Claude\claude_desktop_config.json(Windows):{"mcpServers": {"tailkeeper": {"command": "/path/to/tailkeeper", "args": ["mcp"]}}} -
Cursor:
~/.cursor/mcp.json, with the samemcpServersobject. -
VS Code:
.vscode/mcp.jsonin a workspace, or the user-levelmcp.json:{"servers": {"tailkeeper": {"type": "stdio", "command": "/path/to/tailkeeper", "args": ["mcp"]}}} -
Codex CLI:
~/.codex/config.toml:[mcp_servers.tailkeeper] command = "/path/to/tailkeeper" args = ["mcp"]
tailkeeper mcp takes --profile reads|core|full (default: mcp.profile from the configuration, else reads) and --enable-alpha (also advertise the tools for alpha Tailscale features; the configuration's mcp.enableAlpha does the same). In 0.x every tool reads, so the three profiles list the same tools; core and full gain the write tools in M2.
| Code | Meaning |
|---|---|
| 0 | Success. |
| 1 | An error with no code of its own below: Tailscale's API returned an error (not found, rate limited, a feature your plan lacks, and so on) or could not be reached, the local tailscale command failed, a result was withheld, or an internal error. acl validate also exits 1 when its status is unknown (the answer is not one tailkeeper recognises, or the invariants gave no clear answer: never a pass, and not exit 9 even when a test of the policy also failed), and so does acl test (a line could not be paired, a half of the call did not run, or an SSH check user had no line: never a pass, and not exit 9 even when an assertion also failed). security explain exits 1 when anything it was asked about is unknown, met_with_limits or not_evaluated, or there is no intent set (and 0 only when every selected expectation is met). security scan also exits 1 for a scan that is not complete and found nothing at its threshold (it exits 0 only for a complete scan with nothing at it; while any shipped rule is pending, its unknown findings keep the scan partial, and so does an intent set, which nothing judges yet). |
| 2 | Usage or validation error: an unknown command or flag, a bad parameter, or a filter refused while masking is on (filter_refused). acl validate exits 2 for a text that is invalid, rejected by Tailscale or has a test that does not resolve, acl test for a source or destination that Tailscale cannot resolve (unresolved), and acl diff for a side that is not a policy. |
| 5 | The read credential is unavailable or was rejected, a scope is missing, or the privacy key is unavailable. |
| 6 | The configuration is missing, invalid or unsafe. |
| 7 | The audit log is unavailable or damaged (audit verify found a break). |
| 8 | A check you asked for found something (findings_present): doctor found a failing check, a policy command's --fail-on named a kind that its result has, security explain found an expectation unmet, or security scan found an affected or potentially affected finding at or above its threshold, whether or not the scan is complete. That is a deliberate exception for these two commands: 8 outranks 1 here, where the policy commands put 1 first, because most real scans are partial and 1 over 8 would hide their findings, and an unmet expectation is the answer even when others are unknown. |
| 9 | acl test ran, and at least one destination or SSH user did not behave as asked (an --accept it cannot reach, or a --deny it can); or acl validate ran, and a test of the policy or of the invariants failed. That is a failed assertion. |
The design reserves 3, 4, 10 and 11 (denied, precondition failed, approval required, outcome unknown) for the write tools; nothing returns them yet.
These three paths cannot be exercised on a tailnet, so a live run does not cover them:
- a pass with new warnings when the tailnet has none
- Tailscale's 429, not provoked
- a console save on a scratch tailnet
On 24 Oct 2026 the owner ran make live LIVE_UNAVAILABLE=log_streaming_get,user_invites_list,oauth_apps_list from the release branch against their own tailnet. These are its closing lines, copied as printed; they hold counts, tool names and fixed words, and no value from the tailnet:
self-check: 9 checks, all held
tools allowed to be unavailable (make live LIVE_UNAVAILABLE=…): 3: log_streaming_get, oauth_apps_list, user_invites_list
acl_validate: invariants not run: no test is known to hold on the live policy, and an empty file proves nothing
GitOps oracle: not requested
doctor: 0 failing checks
user_invites_list unavailable not_found 192 bytes 0 personal paths 0 personal values examined
oauth_apps_list unavailable not_found 192 bytes 0 personal paths 0 personal values examined
log_streaming_get unavailable scope_missing 275 bytes 0 personal paths 0 personal values examined
summary: 46 tools: 37 ok, 3 unavailable, 6 none, 0 fail
none, so nothing was called for: device_invite_get, oauth_app_get, posture_integration_get, service_get, user_invite_get, webhook_get
mcp: 44 tools advertised
The three tools listed as unavailable were not exercised: user_invites_list and oauth_apps_list answered not_found on that tailnet, and log_streaming_get answered scope_missing. The six tools of the none line were not called either: each reads one item, and the list it is named from was empty. The invariants check and the GitOps oracle did not run, as the lines say. The headless MCP check in CLAUDE.md, which runs the binary make install writes, is not part of this record.
docs/tools.md: every tool, its CLI command, scopes, parameters and untrusted fields, and a map from each read operation in Tailscale's OpenAPI document to the tools that call it, or the reason none does (generated;make docs-checkkeeps it current). The map is checked against two pinned files, not against a copy of the document:internal/api/openapi/operations.txtlists the document's operations, andfingerprint.txtlists, for every read operation and the validate call, their parameters, the content types of their request bodies and the fields of their responses (for the validate call, its error responses too). A weekly job compares the pins with the live document. To move the pin, download the document, rungo test ./internal/api/openapi -run 'TestOperationsMatchTheDocument|TestLiveDocumentMatchesThePin' -updatewithTAILKEEPER_OPENAPI_LIVEset to its path, review the diff, and commit both files.docs/design.md: the design and roadmap.docs/threat-model.md: what tailkeeper protects, against whom, and what it does not stop.docs/acl.md: how an agent checks a policy, and what the owner does after a pass.docs/scopes.md: every OAuth scope and the tools that need it (generated;tailkeeper scopesprints it). The third column is the tools that read part of a result with that scope, and the fourth is the tools that use it optionally.tailkeeper scopes --jsonnames those inoptionalTools.docs/dependencies.md: every package the binary links (generated;make deps-checkfails on any change until it is reviewed).docs/recipes/: credential wrappers for two secret managers, a GitHub Actions check of a policy change, and a scheduled policy check.CHANGELOG.md: what each release changed.SECURITY.md: how to report a vulnerability.CONTRIBUTING.md: how to work on the code.AGENTS.md: the rules for agents working in this repository.CLAUDE.mdimports it and adds the Claude-specific MCP smoke test.
Apache-2.0. tailkeeper is an independent project, not affiliated with, endorsed by or sponsored by Tailscale Inc. "Tailscale" is a trademark of Tailscale Inc.
{ "contexts": { "home": { "tailnetId": "T1234CNTRL", // the tailnet ID from the admin console's General settings "credentials": { "read": { // An absolute path to a wrapper that sets TAILKEEPER_READ_CLIENT_ID and // TAILKEEPER_READ_CLIENT_SECRET, then runs the rest of its arguments. // tailkeeper re-runs itself under it, so the secret never reaches your shell. "provider": "exec", "command": ["/usr/local/bin/read-secrets", "--"] } } } } }