How Stashbase works
Your agent runs in a sandbox. The proxy adds real credentials only to requests your profile allows.
Every request passes the proxy
The agent holds placeholders. The proxy decides which requests get the real value.
- deny_hostsapi.github.com is not denied
- Destinationapi.github.com is allowed for GH_TOKEN
- Credential ruleGET /repos/*/*/issues* matches an allow rule
The proxy swaps the placeholder for the real token and forwards the request.
audit log action: injected
The profile is the policy
One TOML file in your repository sets what the agent can reach, touch, and use.
egress_hosts = ["api.anthropic.com", "registry.npmjs.org"]deny_hosts = ["api.stashbase.dev"] [filesystem]deny_read = [".env", "~/.aws"]deny_write = [".git"] [sandbox]backend = "docker" [secrets]project = "web-api"environment = "agents" [secrets.GH_TOKEN]from = "GITHUB_TOKEN" [[secrets.GH_TOKEN.rules]]effect = "allow"hosts = ["api.github.com"]methods = ["GET", "POST"]paths = ["/repos/*/*/issues*"]The sandbox keeps the agent on that path
The sandbox stops the agent from going around the proxy.
Native
Default- Runs on
- macOS (Seatbelt), Linux (systemd-run or bubblewrap)
- Files
- Deny list from the profile, enforced by the OS sandbox.
- Network
- Traffic goes through the Agent Proxy, with direct-network containment where supported.
- Setup
- Nothing beyond the CLI
Docker
Stronger isolation- Runs on
- macOS, Linux, and Windows via Docker Desktop
- Files
- Only the working directory is visible. Denied paths inside it fail with Permission denied.
- Network
- A firewall allows only the Agent Proxy. DNS is disabled.
- Setup
- Docker. If it is not running, the run fails instead of falling back.
Choose where credentials are injected
Same profile, two places to inject credentials. The agent stays on your machine.
Not in the request path. If the profile uses a Stashbase project, the local proxy fetches the values from it and holds them for the session.
- The Agent Proxy runs on your machine for the length of the session.
- It resolves credentials from a local file, a Stashbase project, or both.
- Works without a Stashbase account when the profile uses only a local file.
stashbase agent run --profile coding -- claudeControl the tools, not just the credentials
For HTTP MCP servers, the profile decides which tools the agent sees and can call.
[mcp_servers.linear]
url = "https://mcp.linear.app/mcp"
binding = "LINEAR_API_KEY"
allow_tools = ["search_issues", "get_issue"]
deny_tools = ["delete_issue"]Server returns
- search_issues
- get_issue
- create_issue
- delete_issue
Agent sees
- search_issues
- get_issue
Rejected by the proxy, even when a client calls it directly.
Stdio MCP servers do not pass through the proxy and are not covered.
HTTP MCP serversDesktop quickstart
Try it yourself
Open this page on macOS or Linux to install the CLI and try the local policy.
Try it on your next agent session.
Local sandboxing, the local proxy, and profiles are free. Create a workspace when you want shared credentials by project and environment.
No credit card required