Skip to main content
Glama

cqc

cqc is a small command-line toolkit of AI-reliability checks, and every check is also an MCP tool. It grades an LLM stack from real call logs, decides whether source code compiles by asking a real compiler, spots deploy drift against GitHub releases, dry-runs browser plans, audits GitHub Actions workflows for fail-open settings, and holds drafts until a person approves them. It is Python standard library only, runs on Python 3.9 or newer, and the same six tools work from the terminal or from any MCP client. The principle behind it: checks beat prompts.

Install

pipx install git+https://github.com/gitchrisqueen/cqc

For development:

git clone https://github.com/gitchrisqueen/cqc
cd cqc
pip install -e ".[dev]"
python -m pytest -q

Related MCP server: mcp-security-suite

Usage

$ cqc --help
cqc: applied AI, forward-deployed engineer

USAGE     cqc <command>
COMMANDS
  mcp      connect my skills as tools
  call     run one skill, read its report
  about    who I am
  hire     remote, Jacksonville FL

Connect to the tools over MCP. cqc mcp connect skills starts the server as a subprocess, runs the handshake, and lists what it found:

$ cqc mcp connect skills
● connecting to my skills over MCP
  connected. 6 tools found:
  llm_audit     grade an LLM stack, A to F
  real_check    a real check, not a guess
  drift_watch   live vs released mismatch
  browser_flow  web automation, dry-run modes
  ci_pipeline   Actions that fail closed
  human_gate    drafts; a person publishes

Run one tool and read its report. cqc call goes through the same MCP client path:

$ cqc call llm_audit --sample
llm_audit: read-only, sample data
spend efficiency  B  ████░
reliability       C  ███░░
observability     B  ████░
governance        C  ███░░
leverage          A  █████
next: put a real check behind the model
$ cqc call llm_audit --logs calls.jsonl
llm_audit: read-only, your logs
spend efficiency  A  █████
reliability       A  █████
observability, governance, leverage: not graded from logs alone
skipped 1 malformed lines
$ cqc call real_check --file bad.py
compiler exit code: 1
verdict: does not compile
bad.py:1: SyntaxError: invalid syntax
$ cqc call browser_flow --plan plan.json
1. open https://example.com
2. type #email
   would write: #email
3. read h1
dry run: 3 steps, 1 would write
$ cqc call ci_pipeline
.github/workflows/ci.yml:1: no top-level permissions: key (the default token scope applies)
.github/workflows/ci.yml:6: uses: actions/checkout@v4 is not pinned to a 40-hex commit SHA
verdict: 2 findings
$ cqc call human_gate --draft post.md
draft 5891b5b5 pending approval
$ cqc call human_gate --publish 5891b5b5
refused: draft 5891b5b5 is pending
$ cqc call human_gate --approve 5891b5b5
draft 5891b5b5 approved
$ cqc call human_gate --publish 5891b5b5
published 5891b5b5 (local record only)

drift_watch needs the network. This is the report format (the numbers here are an illustration, not a live run):

$ cqc call drift_watch --repo OWNER/NAME --live-version v1.2.0 --max-hours 3
live: v1.2.0
latest: v1.4.0
missing releases: 2
oldest missing: 5.0 hours
verdict: drift (older than 3 hours)

Every tool exits 0 when it finds nothing wrong, 1 when its verdict is a failure, and 2 when it is called wrongly. cqc about and cqc hire print who I am and how to reach me.

The six tools

Tool

What it does

Where the idea comes from

llm_audit

Grades an LLM stack A to F. --sample prints an example report. --logs FILE.jsonl grades reliability (error rate) and spend efficiency (share of cost spent on errored or retried calls) from a JSON-lines log.

The one-week LLM audit offer: christopherqueenconsulting.com/ai-ops-audit

real_check

Decides whether one source file compiles (.c, .cc, .cpp, .cxx, .java, .py) using a real compiler. Never runs the program.

The compile gate in cpcc_task_automation (docs/compiler-gate.md)

drift_watch

Compares the version you say is live with the latest GitHub releases and reports how long the oldest missing release has been waiting.

The hourly deploy-drift check in linkedin_engagement_manager

browser_flow

Validates a JSON plan of browser steps and prints what it would do.

Browser automation with dry-run defaults

ci_pipeline

Scans GitHub Actions workflows as text for unpinned actions, a missing top-level permissions:, pull_request_target, and curl | sh installs.

Workflows that fail closed, like gitchrisqueen

human_gate

A local approval gate. Drafts wait as pending until a person approves them.

Drafts, then a person publishes

What each tool does and does not do

  • llm_audit is read-only. From logs it grades only two areas: reliability and spend efficiency. Observability, governance and leverage are not graded from logs alone, and the report says so. --sample shows the report format with fixed example grades, not a result about your stack. Log lines take optional keys model, status (ok or error), retries, cost_usd and latency_ms. Malformed lines are skipped and counted.

  • real_check answers one question: does this file compile? It uses g++ -fsyntax-only for C and C++ (gcc for .c when present), javac into a temporary directory for Java, and Python's compile() for .py. It never executes the program. If the compiler is missing, times out after 10 seconds, or the extension is unsupported, the verdict is cannot verify, which exits 0 and is not reported as a failure. It checks syntax and types, not behavior: a file that compiles can still be wrong.

  • drift_watch reads the 20 most recent releases from the GitHub API. It sends GITHUB_TOKEN as a Bearer header when set and never prints it. It validates OWNER/NAME, and refuses redirects to other hosts. It compares release tags to the version you pass; it does not inspect what is actually running.

  • browser_flow plans as a dry run only. It validates each step (open, click, type, read) and prints what would happen, including which steps would write. It does not open a browser. --execute is accepted and refused with exit code 2.

  • ci_pipeline is a text scan, not a YAML parser. It reads .github/workflows/*.yml and *.yaml and reports file:line: message. It checks four things and nothing else, and it never touches the network.

  • human_gate keeps state under .cqc/drafts/ in the current directory. --draft FILE stores a copy (the ID is the first 8 hex characters of its SHA-256), --list shows status, --approve ID approves, --publish ID succeeds only for an approved draft. Publishing is a local record only: nothing is sent anywhere. IDs are validated as 8 hex characters before the filesystem is touched.

How it works

cqc mcp serve is an MCP server over stdio: newline-delimited JSON-RPC 2.0, protocol version 2024-11-05. It answers initialize, ping, tools/list and tools/call, accepts the notifications/initialized notification without replying, and returns error -32601 for anything else. Its server name is cqc-skills. A tools/call result is {"content": [{"type": "text", "text": ...}], "isError": false}; isError is true when the tool's verdict is a failure.

cqc mcp connect skills and cqc call are a small MCP client. They start cqc mcp serve as a subprocess with the current Python interpreter, perform initialize, send notifications/initialized, and then call tools/list or tools/call. The tool list you see in the terminal is what the server reports, not a copy kept in the client. If the server fails to start or the handshake fails, the client prints connection failed: <reason> to stderr and exits 1.

Use it from an MCP client

Add cqc mcp serve as the command of a stdio server. In clients that use the common mcpServers JSON format:

{
  "mcpServers": {
    "cqc-skills": {
      "command": "cqc",
      "args": ["mcp", "serve"]
    }
  }
}

If you installed into a virtual environment, use the full path to its cqc script as the command.

Development

pip install -e ".[dev]"
python -m pytest -q

The tests run offline. Cases that need g++ or javac are skipped with a reason when those compilers are not installed, and the cannot verify path is tested separately. CI runs the same suite on every push and pull request.

License

MIT. See LICENSE.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables enterprise MCP security auditing through 12 deterministic no-LLM tools for evidence-gated claims, skill/prompt supply-chain audits, token profiling, and server auth-mode checks.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables supervised, crash-resilient autonomous AI pair programming through nine MCP tools that checkpoint task progress in an atomic local DAG ledger, keep the machine awake during long runs, summarize repositories within a token budget, count tokens and costs across models, and rotate accounts before quota runs out. All state stays in a sandboxed project-local directory with zero telemetry, so long multi-step agent sessions survive crashes, context limits, and premature stopping.
      9 npm
      1
      Apache 2.0