A well-governed AI agent should not need to discover its limits by hitting them. If an agent is about to propose a command that will be blocked by policy, it is better for the agent – and for the organization – if the agent can ask first, adjust its plan, and take the right action from the start. That is the role of the MCP server in Ethosure.

What MCP is
MCP stands for Model Context Protocol – an emerging open standard for how AI agents communicate with external tools and services. It allows an agent to call a tool (like a database query or a code check) and receive structured data in response, all without leaving the agent’s session.
In the context of Ethosure, the MCP server is the agent-facing query surface for the compiled policy system. Agents can query it before taking an action to understand what is allowed, what the policy says, and what repair guidance is available for known issues. It is like being able to ask a knowledgeable compliance officer a question and get a precise, structured answer before you act.
What the MCP server is not
MCP is not a bypass. The MCP server is advisory – it provides context and guidance. Blocking enforcement stays in the Git hooks and agent hooks. Even if an agent ignores the MCP server entirely and proceeds directly to an action, the hook will still enforce the policy. Think of it this way: the MCP server is the pre-flight checklist; the hooks are the runway barrier. An agent can skip the pre-flight, but it still cannot take off if the barrier is down.
The tool surface
The MCP server exposes a rich set of tools that agents can call:
Policy and command checks:
- `policy_check_command`: check a proposed shell command before running it and get back a decision with policy context.
- `policy_check_edit`: check a proposed file edit before applying it.
- `cerun_check`: preflight a command through the managed shell wrapper and get back the exact safe command to use.
Lint and analysis:
- `managed_lint`: run managed lint capture for specific tools.
- `lint_advice`: map a linter diagnostic to the relevant ETHOS policy, principle, and repair guidance.
SARIF interpretation:
- `sarif_remediation_advice`: turn a SARIF result into structured repair guidance with skill context and a next-step lint request.
- `sarif_risk_summary`: summarize a SARIF run into a triage view.
- `sarif_trend_analysis`: compare two SARIF runs to identify new, fixed, and persisting findings.
Code intelligence:
- `code_intel_search`: hybrid search over stored SARIF, remediation outcomes, and indexed code.
- `code_intel_answer`: retrieve cited evidence for a repository question.
- `semantic_search`: find relevant code chunks by symbol or semantic query before broad file reads.
Policy explanation:
- `policy_explain`: explain a compiled policy and its ETHOS principle grounding.
- `skill_lookup`: return the generated repair playbook for a specific skill ID.
- `skill_recommend`: rank relevant skills for a given task or file before the agent starts editing.
All MCP responses come from the same compiled policy bundle used by the hooks. There is no separate reasoning layer – the MCP server reads the same compiled rules, the same evidence maps, and the same skill metadata that the enforcement path uses. This means an agent that queries MCP and then proceeds gets consistent guidance: the pre-flight check and the runway barrier agree on the rules.
The practical workflow
A well-instrumented AI agent using Ethosure follows a pattern like this:
- Before running a shell command: call `policy_check_command`. If the response indicates a block, adjust the approach before the hook fires.
- Before editing a file: call `policy_check_edit`. Understand whether the edit touches protected paths or violates coding standards.
- When encountering a linter error: call `lint_advice` to get ETHOS-grounded repair guidance instead of improvising.
- When reviewing SARIF output from CI: call `sarif_remediation_advice` to get a structured repair packet for each finding.
- When starting a new task: call `skill_recommend` to get the relevant playbooks before editing.
This MCP-first workflow produces a measurable benefit: agents that query policy before improvising make fewer wasted tool calls, propose fewer changes that get blocked, and require fewer iterations to reach a clean commit. The coding ethos documentation describes this as part of the code-intelligence design goal: letting agents “find the right code, understand prior failures, and choose the enforced repair path before they run broad shell commands or repeat failed edits.”
Advisory does not mean optional for governance
From a governance perspective, the advisory nature of MCP has a useful property: it separates the guidance layer from the enforcement layer without weakening either one. Enforcement is always provided by the hooks, whether or not the agent consulted MCP. MCP makes the system easier to work with and reduces wasted effort; it does not create a path to bypass enforcement.
The MCP server also generates its own trace evidence. Queries to MCP, responses, and skill lookups are recorded in the code-intelligence store – contributing to the pattern of evidence that allows an organization to understand how agents are interacting with the policy system, not just what they were allowed or blocked from doing.