Skip to main content

MCP Server Overview

Comply exposes a Model Context Protocol (MCP) server so AI assistants can run compliance checks directly during a conversation.

What is the MCP server?

The MCP server wraps comply check as a tool that Claude Desktop, Cursor, and other MCP-compatible clients can call. When an AI assistant is reviewing code or helping with a pull request, it can invoke Comply to get structured feedback on the current diff.

The comply_check tool

The server exposes one tool:

Tool name: comply_check

Parameters:

ParameterTypeRequiredDescription
repo_pathstringYesAbsolute path to the git repository to check
config_pathstringNoPath to .comply.yml; defaults to <repo_path>/.comply.yml

Returns: JSON object with rule results

{
"results": [
{
"rule": "no-print-statements",
"status": "PASS",
"message": "No print() calls found in diff"
},
{
"rule": "has-test-coverage",
"status": "FAIL",
"message": "New functions added without corresponding tests"
}
],
"summary": {
"passed": 8,
"warned": 0,
"failed": 1,
"skipped": 0
},
"exit_code": 1
}

Starting the MCP server

comply mcp

The server listens on stdio (standard input/output), which is the transport used by Claude Desktop and Cursor.

Client setup

Next steps

Configure Claude Desktop or Cursor to use the Comply MCP server.