MCP Server

qtz-discovery-cli mcp serve starts a Model Context Protocol (MCP) server, exposing all scan commands as tools that AI assistants (Claude Desktop, Cursor, Windsurf, etc.) can call directly. Ask your AI to scan your codebase for quantum vulnerabilities without leaving your editor.

Usage

qtz-discovery-cli mcp serve [--addr ADDRESS] [--transport TYPE]
# stdio transport — default, for Claude Desktop / Cursor
qtz-discovery-cli mcp serve

# SSE transport — listen on localhost (default when --addr is set)
qtz-discovery-cli mcp serve --addr 127.0.0.1:8080

# Streamable HTTP transport — MCP 2025-03-26 spec
qtz-discovery-cli mcp serve --addr 0.0.0.0:8080 --transport streamable-http

Flags

FlagDefaultDescription
--addr Address to listen on for HTTP transport (e.g. 127.0.0.1:8080). When omitted, stdio is used.
--transport sse HTTP transport variant when --addr is set: sse or streamable-http. Ignored for stdio.
--cors false Add CORS headers to streamable-HTTP responses (required for browser-based clients such as Claude.ai web).
--tls-cert Path to TLS certificate file for HTTPS (streamable-http only).
--tls-key Path to TLS private key file for HTTPS (streamable-http only).
--base-url Base URL advertised to SSE clients (e.g. https://qtz.example.com) — use when running behind an HTTPS reverse proxy.

Transport endpoints

TransportEndpointNotes
stdiostdin / stdoutDefault. Use for Claude Desktop, Cursor, Windsurf.
sseGET /sse · POST /messageLegacy SSE transport.
streamable-http/mcpModern transport (MCP spec 2025-03-26).

Claude Desktop Configuration

Add the following to your Claude Desktop configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "qtz": {
      "command": "/path/to/qtz-discovery-cli",
      "args": ["mcp", "serve"],
      "env": {
        "QTZ_SERVER_URL": "https://your-portal-url",
        "QTZ_SERVER_ORG_ID": "your-org-id",
        "QTZ_SERVER_API_KEY": "your-api-key"
      }
    }
  }
}

Restart Claude Desktop after saving. You will see a qtz tool group appear in the tool picker.

Cursor / Windsurf Configuration

Add to your project's .cursor/mcp.json or .windsurf/mcp.json:

{
  "servers": {
    "qtz": {
      "type": "stdio",
      "command": "/path/to/qtz-discovery-cli",
      "args": ["mcp", "serve"]
    }
  }
}

Available MCP Tools

Tools marked experimental require --experimental when starting the server: qtz-discovery-cli mcp serve --experimental

ToolDescription
scan_source AI-driven SAST + SCA of a local directory or remote Git URL. Detects hardcoded keys, weak algorithms, and vulnerable library usage across all file types.
upload_findings Upload scan results (JSON) to the Quantizant portal for AI risk scoring and compliance reporting.
get_usage Fetch LLM token usage summary from the connected Quantizant service.
scan_network (experimental) Analyze TLS/SSH endpoints for cipher suite strength, certificate quality, and quantum-risk scoring.
scan_iac (experimental) Scan Terraform, CloudFormation, and Pulumi configurations for cryptographic resource declarations.
scan_infra (experimental) Inventory cloud KMS/HSM keys — AWS KMS, GCP KMS, Azure Key Vault, HashiCorp Vault.
scan_runtime (experimental) Inspect live processes, containers, and images for in-memory crypto assets. Supports eBPF tracing, OS trust store auditing, and registry inspection.

scan_source parameters

ParameterTypeDescription
pathstring (required)Local path or remote Git URL to scan.
sastbooleanEnable SAST regex-based scanning (default: true).
scabooleanEnable SCA dependency scanning (default: true).
llmbooleanEnable AI-driven deep analysis (requires server_url + api_key).
llm_qualitystringAnalysis depth: auto (default) | fast | deep | chain.
scan_budget_usdnumberMax USD for LLM analysis (0 = unlimited). System auto-selects depth per file within budget.
formatstringOutput format: json (default) | cyclonedx | sarif.
branchstringGit branch to scan for remote URLs (default: main).
min_severitystringMinimum severity to report: critical | high | medium | low | info.
server_urlstringqtz-discovery service URL for LLM proxy and upload.
org_idstringOrganization ID for server authentication.
api_keystringAPI key for server authentication.
resumebooleanResume a previously interrupted LLM scan (skips already-analyzed files).
llm_max_filesnumberMax source files sent to LLM per scan (0 = unlimited, default: 50).
llm_batch_sizenumberFile chunks per LLM server request (default: 10).
llm_chunk_windownumberLines per chunk for large-file splitting (default: 300).
llm_chunk_overlapnumberOverlap lines between adjacent chunks (default: 50, 0 = none).

scan_network parameters (experimental)

ParameterTypeDescription
targetsstring (required)Comma-separated list of host:port endpoints to scan.
timeoutstringConnection timeout per target (default: 10s).
insecurebooleanSkip TLS certificate verification.
formatstringOutput format: json (default) | cyclonedx.

scan_iac parameters (experimental)

ParameterTypeDescription
pathstring (required)Directory containing IaC files to scan.
terraformbooleanEnable Terraform scanning (default: true).
cloudformationbooleanEnable CloudFormation scanning (default: true).
pulumibooleanEnable Pulumi scanning (default: true).
formatstringOutput format: json (default) | cyclonedx.

scan_infra parameters (experimental)

ParameterTypeDescription
providerstring (required)Cloud/KMS provider: aws | gcp | azure | vault.
regionstringCloud region (AWS/Azure).
projectstringGCP project ID.
vault_addrstringHashiCorp Vault address.
vault_tokenstringHashiCorp Vault token (or set VAULT_TOKEN env var).
formatstringOutput format: json (default) | cyclonedx.

scan_runtime parameters (experimental)

ParameterTypeDescription
scan_typestring (required)Scan mode: network | truststore | image | registry | pid | container | ebpf.
pidnumberProcess PID (required for scan_type=pid).
memorybooleanAlso scan process memory for in-memory key material (use with scan_type=pid; requires privilege).
containerstringRunning container name or ID (required for scan_type=container).
imagestringContainer image ref to pull and scan, e.g. nginx:latest (required for scan_type=image).
registrystringRegistry image ref to inspect without pulling (required for scan_type=registry).
network_targetsstringComma-separated host:port endpoints to probe (scan_type=network only; default: auto-discover local listeners).
durationstringTracing window for scan_type=ebpf (default: 30s).
formatstringOutput format: json (default) | cyclonedx | sarif.

upload_findings parameters

ParameterTypeDescription
findings_jsonstring (required)JSON array of findings (as returned by any scan tool).
server_urlstring (required)qtz-discovery service base URL.
org_idstring (required)Organization ID.
api_keystring (required)API key for authentication.
targetstringScan target label (optional, for display in the portal).

get_usage parameters

ParameterTypeDescription
server_urlstring (required)qtz-discovery service base URL.
org_idstring (required)Organization ID.
api_keystring (required)API key for authentication.
periodstringBilling period in YYYY-MM format (default: current month).

Example AI Prompts

Once connected, you can use natural language to drive scans:

"Scan the current project directory for quantum-vulnerable cryptography and give me the top 5 critical findings."
"Check if api.example.com:443 is using any deprecated TLS ciphers or lacks a post-quantum key exchange."
"Scan the Terraform configs in ./infra for any cryptographic resources that use deprecated algorithms."

Portal Connection

Connect the MCP server to your Quantizant portal to enable AI risk scoring, the upload_findings tool, and LLM-enhanced source analysis. Set the following environment variables or add them to your config file:

# Environment variables
export QTZ_SERVER_URL=https://your-portal-url
export QTZ_SERVER_ORG_ID=your-org-id
export QTZ_SERVER_API_KEY=your-api-key
# Config file: ~/.qtz/config.yaml
server:
  url: https://your-portal-url
  org_id: your-org-id
  api_key: your-api-key

Config files are searched in order: .qtz-discovery.yaml (current directory), config.yaml (current directory), then ~/.qtz/config.yaml.

Security Considerations

  • The MCP server runs with the same filesystem permissions as the invoking user.
  • HTTP transport is not authenticated by default — only expose it on localhost or behind a reverse proxy with auth.
  • API keys are never logged or exposed in tool responses.
  • For team environments, prefer stdio transport through a per-user install rather than a shared HTTP server.