Zero-Knowledge Proxy
Credentials are injected at the HTTP transport layer. The AI agent's context window never contains a credential string, even temporarily.
Straylight-AI is a self-hosted Docker container that keeps your API keys completely out of AI agent context windows. Claude Code and Cursor make real API calls — your credentials never appear in prompts, logs, or responses.
npx straylight-ai
Every time an AI coding assistant reads your .env file, accesses shell history,
or processes log output, your API keys enter its context window. From there, they can be
echoed in responses, logged to disk, or exfiltrated through prompt injection attacks.
Prompt injection via crafted API responses causes AI coding assistants to echo stored credentials in subsequent tool outputs, bypassing context isolation.
CVSS 8.1 HighAI agent log capture during automated test runs exposes environment variable values including cloud provider credentials, database passwords, and payment API keys.
CVSS 9.3 CriticalAI agents routinely read .env files when asked to debug configuration issues, run tests, or understand project setup. This is standard behavior — and a massive security gap.
Commands like curl -H "Authorization: Bearer sk-..." sit in shell history files. When an AI agent reads history for context, those tokens become part of its working memory.
Straylight-AI solves this at the transport layer. Credentials never enter the agent's context window — not even for a millisecond.
Straylight-AI sits between your AI agent and the external world. The agent asks for API calls using service names — never credential strings. Straylight fetches the credential from the encrypted vault and injects it directly into the HTTP request.
Claude Code calls the MCP api_call tool with service name and parameters. No credential string is passed.
api_call("github", "GET /user")
Straylight retrieves the GitHub PAT from OpenBao vault and injects it as an HTTP Authorization header. The credential stays internal.
Authorization: Bearer ghp_••••••••
The agent receives the API response data. The credential is sanitized from output before it reaches the context window. Zero exposure.
{"login": "alice", "id": 12345...}
Built specifically for developers using AI coding assistants, not adapted from enterprise secrets managers. Every feature addresses a real credential leak vector.
Credentials are injected at the HTTP transport layer. The AI agent's context window never contains a credential string, even temporarily.
OpenBao (open-source Vault fork) provides enterprise-grade encrypted storage. Auto-init, auto-unseal, AppRole authentication — fully automated.
Four MCP tools (api_call, exec, check, services) expose capabilities to Claude Code, Cursor, and any MCP-compatible client.
Two-layer detection combining regex pattern matching and live value matching strips any credential from API responses before reaching the agent.
Pre-configured templates for GitHub, Stripe, OpenAI, Anthropic, AWS, GCP, Azure, PostgreSQL, MySQL, MongoDB, Redis, SSH, and more.
PreToolUse hooks block credential-leaking commands. PostToolUse hooks sanitize output. Double defense against accidental exposure.
Pre-built templates handle authentication for every major cloud provider, API platform, and database. Add custom services with any auth method in under a minute.
npx straylight-ai pulls the Docker image, initializes the vault,
starts the MCP server, and registers it with Claude Code. Everything automated.
Run npx straylight-ai. Requires Docker to be running. That is the only prerequisite.
Open http://localhost:9470 and use the wizard to add a GitHub PAT, Stripe key, or any other service credential.
Tell Claude Code to check your GitHub notifications or create a Stripe payment link. It works — without ever seeing your key.
Every layer of Straylight-AI is designed with the assumption that the AI agent is potentially compromised. Multiple independent controls prevent credential exfiltration.
All credentials stored in OpenBao are encrypted with AES-256-GCM before being written to disk. The encryption key is never stored alongside the data. Auto-unseal uses a separate derived key.
Straylight's MCP server uses AppRole auth to retrieve secrets from the vault. The RoleID and SecretID are separated — neither alone can authenticate. Tokens are short-lived and auto-renewed.
Credentials are added to HTTP requests at the network transport layer, after the MCP tool call completes its parameter parsing. The credential value is never in a Go string that the MCP layer handles.
Two-phase scanning: first regex patterns detect common credential formats (Bearer tokens, API key prefixes, connection strings). Then live value matching checks for the actual stored credential values.
PreToolUse hooks intercept and block tool calls that would expose credentials: reading .env files, printing environment variables, accessing shell history. PostToolUse hooks sanitize any output that slips through.
Existing solutions were built for human operators, not AI agents. Straylight-AI is purpose-built for the agent threat model.
| Feature | Straylight-AI Our pick | AgentSecrets | Akeyless | 1Password Agentic | .env Files |
|---|---|---|---|---|---|
| Zero-knowledge proxy | ✓ | ✗ | ✗ | ✗ | ✗ |
| Self-hosted | ✓ | ✗ | ✓ | ✗ | ✓ |
| MCP integration | ✓ | ⟳ | ✗ | ✗ | ✗ |
| Vault backend | ✓ | ✗ | ✓ | ✓ | ✗ |
| Output sanitization | ✓ | ✗ | ✗ | ✗ | ✗ |
| Claude Code hooks | ✓ | ✗ | ✗ | ✗ | ✗ |
| One-command install | ✓ | ✓ | ✗ | ✗ | ✓ |
| Open source | ✓ MIT | ✗ | ✗ | ✗ | ✓ |
| Free to use | ✓ Always | ⟳ Freemium | ⟳ Freemium | ✗ Paid | ✓ |
| Service templates | 16 built-in | 8 built-in | Custom only | Custom only | None |
⟳ = Partial support. Comparison based on publicly available documentation as of Q1 2026.
One command installs and configures everything. Your AI agent will be making secure API calls before your next coffee.