Optional MCP companion
Use a version-pinned local companion for MCP secret custody, reveal and sign-out.
Once native remote MCP is enabled and qualified in your deployment, use your client's direct connection and browser OAuth for ordinary work. Follow the native client setup guide. The NeatLogs CLI is needed only when you choose the optional local custody companion for credential-producing actions.
Follow the installation instructions and connection fields in Home → Connect MCP → Choose your client → Advanced → View local companion setup. Setup supplies a version-pinned npx command when a compatible published version is configured. Once the updated backend is deployed, production requires a compatible stable published pin; a missing pin or prerelease candidate leaves the optional companion unavailable. Follow its availability message instead of using a developer test package. The published neatlogs-cli@0.2.2 includes login, proxy, reveal and logout, but package availability does not establish that your regional deployment or client journey is qualified. Node.js 22 or 24 and a supported local credential vault are required for this path.
The CLI has separate modes: ordinary terminal commands use the Public API; mcp proxy carries structured MCP messages between the AI host and /mcp/user. It does not translate every AI request into a terminal product command.
The following shapes use 0.2.2 as an example pin. Replace the public connection placeholders and scope list with the approved values supplied by setup; replace the version only if setup supplies a different qualified stable pin. These templates need those substitutions before use.
npx -y neatlogs-cli@0.2.2 mcp login \
--endpoint "ENDPOINT_FROM_SETUP" --issuer "ISSUER_FROM_SETUP" \
--client-id "COMPANION_CLIENT_ID_FROM_SETUP" --scope SCOPES_FROM_SETUP
# Choose one client; it starts the local proxy.
codex mcp add neatlogs-custody -- \
npx -y neatlogs-cli@0.2.2 mcp proxy \
--endpoint "ENDPOINT_FROM_SETUP" --issuer "ISSUER_FROM_SETUP" \
--client-id "COMPANION_CLIENT_ID_FROM_SETUP"
claude mcp add --transport stdio --scope user neatlogs-custody -- \
npx -y neatlogs-cli@0.2.2 mcp proxy \
--endpoint "ENDPOINT_FROM_SETUP" --issuer "ISSUER_FROM_SETUP" \
--client-id "COMPANION_CLIENT_ID_FROM_SETUP"
# Human-only step: replace the ID with the companion's invocation/local receipt ID.
npx -y neatlogs-cli@0.2.2 mcp reveal "INVOCATION_ID" \
--endpoint "ENDPOINT_FROM_SETUP" --issuer "ISSUER_FROM_SETUP" \
--client-id "COMPANION_CLIENT_ID_FROM_SETUP"
npx -y neatlogs-cli@0.2.2 mcp logout \
--endpoint "ENDPOINT_FROM_SETUP" --issuer "ISSUER_FROM_SETUP" \
--client-id "COMPANION_CLIENT_ID_FROM_SETUP"npx avoids a global NeatLogs CLI installation. Inspect existing client entries before adding the same name; preserve any tool restrictions and approvals. Use the operating-system credential vault, and never paste revealed secrets into an AI conversation.
The companion's endpoint, issuer and application client ID define its credential binding. Ordinary CLI auth login, native remote-client OAuth and companion mcp login use separate bindings. Do not interchange their tokens. The companion defaults to read scopes; request only the registration-approved scopes shown by setup and review consent. Scopes do not add account roles or bypass confirmation.
The command tables below describe the companion command tree. Existing mcp connect/list/status manage outbound/custom product connections and do not sign an AI host into NeatLogs user MCP.
neatlogs mcp login
Authorize the registered regional MCP resource and store its credentials in the selected native vault.
Usage: neatlogs mcp login [options]
Arguments
None.
Options
| Option | Requirement | Description | Default |
|---|---|---|---|
--endpoint <url> | Required option | — | — |
--issuer <url> | Required option | — | — |
--client-id <id> | Required option | registered MCP client with loopback redirects enabled | — |
--scope <scope...> | Optional option | requested OAuth scopes | ["context:read","organization:read","billing:read","profile:read","observability:read","evaluation:read","configuration:read","sharing:read","access:read","offline_access"] |
--allow-file-custody | Optional option | allow protected-file credentials if keyring is unavailable | — |
neatlogs mcp proxy
Run the stdio MCP bridge launched by an AI client. This mode requires piped protocol input.
Usage: neatlogs mcp proxy [options]
Arguments
None.
Options
| Option | Requirement | Description | Default |
|---|---|---|---|
--endpoint <url> | Required option | registered regional /mcp/user resource | — |
--issuer <url> | Required option | — | — |
--client-id <id> | Required option | — | — |
--allow-file-custody | Optional option | explicitly use private files instead of the native keyring | — |
neatlogs mcp logout
Revoke the OAuth credential bound to the same endpoint, issuer and application client ID used for sign-in, then remove its local credential. Ordinary auth logout manages normal CLI profiles and is not a substitute for this MCP binding.
Usage: neatlogs mcp logout [options]
Arguments
None.
Options
| Option | Requirement | Description | Default |
|---|---|---|---|
--endpoint <url> | Required option | registered regional /mcp/user resource | — |
--issuer <url> | Required option | — | — |
--client-id <id> | Required option | — | — |
--allow-file-custody | Optional option | explicitly permit the binding's protected-file credential store | — |
A successful result distinguishes server revocation accepted or not required from local credential removal. not_required means there was no stored credential requiring a revocation request; it does not prove that grants on other devices were revoked. Server/network failure reports an error and retains the local credential; it does not falsely report a completed sign-out. Server acceptance is not independent proof of every downstream session's state.
Logout does not remove the AI host's MCP configuration, custody/result history or accepted jobs. Remove or disable the host entry separately if you no longer want it to connect. A logout is not cancellation or rollback of an accepted operation.
neatlogs mcp reveal <invocation-id>
Explicitly access an eligible locally held secret result from a human terminal.
Usage: neatlogs mcp reveal [options] <invocation-id>
Arguments
| Argument | Requirement | Description | Default |
|---|---|---|---|
invocation-id | Required argument | — | — |
Options
| Option | Requirement | Description | Default |
|---|---|---|---|
--endpoint <url> | Required option | — | — |
--issuer <url> | Required option | — | — |
--client-id <id> | Required option | — | — |
--allow-file-custody | Optional option | use the explicitly selected private-file store | — |
Custody and recovery
Prefer the native operating-system credential vault. --allow-file-custody is an explicit fallback, not the default setup. The proxy never sends a revealed secret to the model. mcp reveal is a separate human terminal action; do not run it in an AI transcript or retain its output in acceptance evidence.
After an uncertain response, use the original invocation or declared durable recovery path. Reconnecting a proxy does not authorize repeating a mutation or starting a new job. See the user setup guide and catalog reference.
