Compliance tool that works with Claude Code or Cursor: how it works

    Your coding agent can read your controls, check its own work against them and open tasks for the gaps. Here is how that works with MCP, and where a human still signs off.

    Key points

    • A compliance tool that works with Claude Code or Cursor connects through MCP, so the agent can read your controls while it writes code.
    • The agent can assess a whole repository or just your current branch against those controls, and sort each one into addressed, partly addressed or not addressed.
    • Gaps become tracked tasks, and fixes can be recorded as evidence for your auditor.
    • The agent acts as you, so a person still reviews what it writes back before it counts.

    A compliance tool that works with Claude Code or Cursor connects through the Model Context Protocol (MCP), so your coding agent can read your security and compliance controls while it writes code. Instead of checking the product after it is built, the agent checks its own work against SOC 2, ISO 27001 or ISO 42001 requirements as it goes, and turns any gaps into tasks.

    This post explains how that works in practice, using the Keldyn MCP server as the example, and where a person still needs to sign off.

    Why put compliance checks inside the coding agent?

    More and more code is now written by agents like Claude Code and Cursor. The agent knows your codebase. It does not know your controls: which changes need approval, how secrets must be handled, what logging your auditor expects.

    That gap shows up later as audit findings, rework and long security questionnaires. Putting the controls where the code is written closes it at the cheapest point.

    MCP is an open standard that lets AI tools call external services. A compliance platform that exposes an MCP server gives the agent tools such as "list my controls" or "record this evidence", which it can call like any other tool.

    How do you connect Claude Code or Cursor?

    Both take a few minutes. The full steps are in the Keldyn MCP server docs.

    1. Claude Code: add the server with claude mcp add --transport http keldyn https://mcp.keldyn.ai/, run /mcp, choose keldyn and sign in.
    2. Cursor: in Settings, under Tools & MCP, add a custom MCP server with the URL https://mcp.keldyn.ai/.
    3. Sign in and choose a team. The connection uses OAuth 2.1. There is no API key or static token to store.

    From then on, every request runs as you, scoped to the team you picked.

    What can the agent do once it is connected?

    The useful part is the loop. Here is the workflow from our controls to code guide:

    1. Read the controls. The agent lists the controls for your use case and fetches the acceptance criteria for the ones that touch code.
    2. Check the code. It runs a review of the whole repository, or only your current branch, and sorts each control into addressed, partly addressed or not addressed, citing files and lines.
    3. Record what is done. For controls the code genuinely meets, it can set the status to complete with evidence that names the implementing files.
    4. Open tasks for the gaps. Each partly addressed control becomes a task with the gap, the fix and a priority, linked to the control.
    5. Work the backlog. The agent picks up a task, writes the fix with a test, and closes the task when the fix is verified.

    A good first prompt is simply: "List the controls for this use case, review my current branch against the code-relevant ones, and show me the plan before you write anything to Keldyn."

    What should still be checked by a person?

    The agent writes to your live compliance workspace as you. That is powerful and it needs care.

    The agent is good at A person should own
    Reading controls and mapping them to code Deciding a control is truly met
    Finding the files that implement a control Accepting a risk instead of fixing it
    Drafting tasks with a clear gap and fix Anything outside the code: hosting, policy, HR
    Writing fixes and tests Approving evidence before an audit

    Two rules we give every team:

    • Review before you approve. Ask the agent to show its plan before it writes anything back.
    • Do not mark infrastructure or policy controls complete from code alone. If a control depends on cloud settings or a signed policy, it should become a task, not a tick.

    How does this fit with checks on pull requests?

    Checks inside the agent catch problems while you work. A check on the pull request is the gate before merge.

    Keldyn's compliance gate reviews each pull request against the same code-level controls and posts a per-control verdict. When a merged fix turns a failing control into a pass, it records that as audit evidence. The two work together: the agent builds to the controls, and the gate confirms nothing slipped through.

    Where to start

    Pick one framework and one repository. Connect your agent, run a review of the current branch, and look at the gaps it finds. That first list tells you where you really stand, in your own code rather than in a spreadsheet.

    If you want to see it on your own codebase, book a demo.

    Frequently asked questions

    Is there a compliance tool that works with Claude Code or Cursor?

    Yes. Keldyn's MCP server connects to Claude Code, Cursor and other MCP clients, so the agent can read your frameworks and controls, check code against them and record evidence and tasks.

    Do I need an API key to connect Claude Code to Keldyn?

    No. The connection uses OAuth 2.1. You sign in through the browser, choose your team and approve access. Tokens refresh automatically.

    Can the agent mark controls as done on its own?

    It can update a control's status, but it runs as you and writes to your live workspace. Review what it proposes before you approve it, and only mark a control complete when the code meets its acceptance criteria.

    Does this replace an auditor?

    No. It keeps your code and your evidence aligned with your controls as you work. An independent auditor still tests and signs off.