Skip to content

Step 6 of 7: Serve to agents over MCP

OPP Engine is an MCP server. An agent that has it gets a check tool and calls it before it sends, emails, posts or pastes data anywhere.

opp-engine serve acme.opp.yaml --mcp

That runs the server over stdio, which is how desktop MCP clients start it. You do not run it yourself; you add it to your client's configuration. Use absolute paths, and the full path to opp-engine if it is installed in a virtual environment (which opp-engine prints it).

Add it to your client

claude mcp add opp -- /path/to/.venv/bin/opp-engine serve /path/to/acme.opp.yaml --mcp

In claude_desktop_config.json (Settings, Developer, Edit config):

{
  "mcpServers": {
    "opp": {
      "command": "/path/to/.venv/bin/opp-engine",
      "args": ["serve", "/path/to/acme.opp.yaml", "--mcp"]
    }
  }
}

In .cursor/mcp.json in your project, or ~/.cursor/mcp.json for every project:

{
  "mcpServers": {
    "opp": {
      "command": "/path/to/.venv/bin/opp-engine",
      "args": ["serve", "/path/to/acme.opp.yaml", "--mcp"]
    }
  }
}

Command opp-engine, arguments serve /path/to/acme.opp.yaml --mcp, transport stdio.

Restart the client after you change its configuration.

The tools your agent gets

Tool What it does
check Content and where it is going, in; a decision, findings and safe_content, out
explain What the model records about a field, value format, term or class
list_classes The kinds of private and confidential data your organization tracks
list_destinations The services in your destination registry and how each processes content (step 7)

Tell the agent to use it

Add this to the agent's instructions or system prompt:

Before sending data outside the system it came from (to a model, a partner, a public place or another tool), call check with the exact content and its destination. Send safe_content instead of the original. If the verdict is block or review, do not send and say why. If decision.obligations is not empty, fulfil each one or do not send. Check answers and tool results the same way before passing them on.

An agent can skip the call, and text it reads can tell it to. MCP checking guides a cooperative agent. Where a rule must hold, also put the check in the path the content takes, as in step 7.

Check that it worked

Ask the agent: "Use the opp tool to check whether I may send 'Email [email protected] about our special discount' to an external AI." It calls check and reports the verdict and findings you saw in step 5.

Next: 7. Deploy as a service →