# Earl

A secure CLI proxy that sits between AI agents and external APIs, running human-written HCL request templates so a model never sees the URL, auth header, or secret it is calling.

Earl is a proxy for AI agents that call external services: operations are defined as HCL template files committed to a repository, and when an agent calls a tool, Earl loads the matching template, reads the required secret from the OS keychain, fills in the template's parameters with the values the agent supplied, and executes the request. The model only ever sees a tool name and description, never the template body, so an instruction injected into an API response has no request text to land in.

Secrets stay in the OS keychain rather than in tool arguments, descriptions, or output. Earl can run as an MCP server reachable over stdio or HTTP, and supports external secret stores such as 1Password, Vault, AWS, GCP, and Azure, a policy engine with JWT authentication and access control for HTTP deployments, and hardening features such as SSRF protection and an egress allowlist.

It is written in Rust and configured through HCL files, and is used from agents such as Claude Code and Cursor through their MCP configuration.

Website: https://mathematic-inc.github.io/earl/
