Show HN: Sani – let AI agents use your tools without holding your secrets A developer publishing as sianachi released Sani, a self-hosted broker that sits between AI coding agents such as Claude Code and Codex and the credentials those agents need, so the agent holds only a Sani agent key while tokens and OAuth state stay encrypted in Sani's database on a host the agent cannot read. Each request shows the connection, tool and exact arguments and requires a person to approve it in a browser before Sani dispatches it, and shell commands needing a secret run in a throwaway Docker container with only the named secrets. A demo mode, enabled with SANI_DEMO=1 and available in Docker from v1.0.0-rc.6, provides a credential-free `demo` connection that cannot reach the network so users can see the approval flow before connecting a real platform. Sani is a small self-hosted broker that sits between AI coding agents and the credentials they need. The agent never holds a token. It asks Sani to do something, a person approves that exact request in a browser, and Sani does it with the credential it keeps on its own server. The agent gets back a screened result. You can use it two ways, together or separately: - MCP tool calls. Connect an authenticated MCP server such as GitHub or Linear. The agent requests one of the tools you enabled and Sani makes the call with the stored token or OAuth sign-in. - Shell commands. Store a secret such as GH TOKEN . The agent requests a command, for example gh pr list --repo acme/site , and Sani runs it in a throwaway Docker container with only the secrets that command named. This covers CLIs and plain HTTP APIs that have no MCP server. See Run commands in the sandbox run-commands-in-the-sandbox . It works with any client that speaks MCP over HTTP, including Claude Code and Codex. Demo mode adds a built-in connection named demo . It stores no credential and cannot reach the network or other systems, so you can see the approval flow before you connect a real platform. It is off unless you set SANI DEMO=1 . Real connections are unchanged. SANI DEMO=1 npx github:sianachi/sani Docker works the same way with -e SANI DEMO=1 , from v1.0.0-rc.6 on. See Run Sani run-sani . 1. Sani prints a sign-in address and, on the first run, your operator password. 2. Open http://127.0.0.1:8765 http://127.0.0.1:8765 and sign in. Use that host for the approval link as well: localhost is a different site to the browser. The console shows demo mode and the demo connection, with lookup ticket enabled. 3. Create an agent token. Sani shows it once. 4. Request a demo lookup. Sani does not run it until you approve: export SANI AGENT KEY='sani ...' curl -sS http://127.0.0.1:8765/mcp \ -H "Authorization: Bearer $SANI AGENT KEY" \ -H 'Content-Type: application/json' \ -H 'Accept: application/json, text/event-stream' \ -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"request action","arguments":{"connection":"demo","tool":"lookup ticket","args":{"id":"1001"}}}}' 1. Open the approvalUrl from the JSON, approve the request, then read the screened result use the id from the same JSON : curl -sS http://127.0.0.1:8765/mcp \ -H "Authorization: Bearer $SANI AGENT KEY" \ -H 'Content-Type: application/json' \ -H 'Accept: application/json, text/event-stream' \ -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"get request","arguments":{"id":"PASTE REQUEST ID"}}}' From a clone, SANI AGENT KEY='sani ...' scripts/try-demo.sh sends that request and waits until you approve. docs/demo https://github.com/sianachi/sani/blob/main/docs/demo has a walkthrough script and a recording. Giving an agent a GitHub or Linear token means the token lives in its shell, its config files and its context, and every tool call it makes is one you did not see. Sani changes three things: - The credential stays out of reach. Tokens and OAuth state are encrypted in Sani's database, on a host the agent cannot read. The agent holds only a Sani agent key, which can request actions but cannot approve them. - A person approves each call. Every request shows the connection, the tool and the exact arguments. Nothing is sent until you approve it, and an approval is spent on one dispatch. - Commands run away from the agent. A command that needs a secret runs in a locked-down container on Sani's host, so the secret never reaches the agent's shell, files or context. - Only the tools you enable exist. Sani lists a platform's tools and you switch on the ones you want. If the platform later changes a tool's definition, Sani switches it off until you review it again. agent Claude Code, Codex you browser platform MCP server | | | |-- request action -------------- | | |<- approval link, request id ----| | | |-- review and approve | | Sani --|------- tools/call ------ | | Sani <-|------- result -----------| |-- get request ----------------- | | |<- screened result --------------| | 1. You add a connection : a name, the platform's Streamable HTTP MCP endpoint, and either a bearer token or an OAuth issuer. 2. Sani discovers the platform's tools. You enable the ones agents may request. 3. You create an agent key for each client. It is shown once and stored only as a hash. 4. The agent calls request action . Sani checks the arguments against the tool's JSON Schema, stores the request and returns an approval link. 5. You open the link, sign in, and approve or decline. 6. On approval Sani re-reads the tool from the platform, confirms it still matches what you enabled, and sends the call once with the stored credential. 7. Sani screens the reply for stored credentials and keeps the text and structured data. The agent fetches it with get request . A shell command follows the same path: the agent calls request command , you approve the exact command line, and Sani runs it once in the sandbox and returns the exit code and screened output. Sani is itself an MCP server at