- read the policies in force for your project, and follow them as it works
- check the code it has just written against those policies, before showing it to you
- look up a project’s findings, posture, and merge gate
- export a project’s bill of materials
- record a triage decision you’ve asked it to make, if you allow it
How It Fits Together
Three parts are involved:
The client sends each tool call to the MCP server over HTTPS, with your API key.
You don’t call the tools yourself. You ask the agent something in plain language, such as “is this project blocked?”, and the agent decides which Earnie tool to call. Using Earnie Through MCP lists every tool.
The Connection and the Repository Setup
Connecting a client to the MCP server gives the agent its tools. If you set up with the Earnie CLI, you also get two things written into your repository:- A managed policy block — your project’s policies, written as plain rules into the file your agent reads for instructions, such as
CLAUDE.mdorAGENTS.md. - Review hooks — for Claude Code, Cursor, and Codex, an automatic review of the agent’s changed files at the end of each turn. Each review is a Self-check.
Supported Clients
Before You Start
You need:- An Earnie deployment your machine can reach. Each deployment has its own address, and its MCP server is at that address followed by
/mcp/v1. - A project that has been scanned, so there’s something for the agent to ask about. See Your First Scan.
- Policies attached to that project, if you want the agent to follow rules and review its code. See Setting Policies.
- An API key created with the Coding agent (MCP) preset. Creating one needs the Admin or Operator role. See Creating a Key.
- A supported AI client, installed on your machine.
- The Earnie CLI (optional, but recommended for working in a repository). See Installing.
What the agent can do depends on the key. The Coding agent (MCP) preset
lets the agent read projects, policies, findings, and scans, and submit
scans. It can’t change triage decisions unless you turn on Allow agents to
triage findings when you create the key.