42Crunch as a MCP server for API security

What middleBrick covers

  • Trigger scans from AI editors using the MCP protocol
  • Enforce read-only, black-box API probing
  • Support Bearer, API key, Basic, and cookie auth
  • Map findings to OWASP API Top 10 (2023)
  • Parse OpenAPI 3.x and Swagger 2.0 with ref resolution
  • Provide editor-native access without code changes

MCP server overview

The MCP server exposes middleBrick scanning as a language-agnostic tool within AI coding assistants such as Claude and Cursor. It allows a developer to trigger scans, pass targets and authentication, and receive structured findings without leaving the editor. The server follows the MCP protocol contract for sessions and resources, enabling calls that start a scan, poll status, and fetch results in JSON. It does not alter the underlying scanner; it forwards inputs and streams back detections aligned to OWASP API Top 10 (2023).

Authentication and scope controls

Authenticated scans are supported via Bearer tokens, API keys, Basic auth, and cookies. Before credentials are accepted, a domain verification gate checks a DNS TXT record or an HTTP well-known file to confirm ownership of the domain. The server forwards only a restricted allowlist of headers, including Authorization, X-API-Key, Cookie, and X-Custom-*, and redacts sensitive values from logs. Read-only methods are enforced, and destructive payloads are never sent. This approach maps findings to PCI-DSS 4.0 controls around authentication and session management while supporting audit evidence for SOC 2 Type II.

Scan initiation and result handling

You can initiate a scan with a single call that provides a URL, scan profile such as Quick or Deep, and optional authentication. The server returns a scan ID, then streams incremental updates as probes complete. Results include a risk grade from A to F, prioritized findings, and remediation guidance tied to OWASP API Top 10 categories. The server exposes resources for OpenAPI documents, enabling it to parse OpenAPI 3.0, 3.1, and Swagger 2.0 with recursive $ref resolution and to cross-reference spec definitions against runtime behavior for undefined security schemes and deprecated operations.

Detection coverage and limitations

The server handles 12 detection categories, including authentication bypass, BOLA and BFLA, property over-exposure, input validation, rate limiting, data exposure, encryption posture, SSRF indicators, inventory issues, unsafe consumption patterns, and LLM/AI security probes across tiered scan depths. It surfaces findings relevant to regulatory frameworks through alignment, avoiding claims of certification or guarantees. It does not perform intrusive injection tests, does not fix or block issues, and does not detect business logic flaws or blind SSRF, which remain out of scope.

Integration and operational considerations

Integrations include a CLI, GitHub Action, and web dashboard, and the MCP server fits into this ecosystem by providing editor-native access. Continuous monitoring options such as scheduled rescans, diff detection, and email alerts are available in higher tiers and rely on HMAC-SHA256 signed webhooks with auto-disable after repeated failures. Enterprise deployments can leverage SSO, audit logs, and dedicated support. The server does not store or train on customer data; scan data is deletable on demand and purged within 30 days of cancellation.

Frequently Asked Questions

How does the MCP server authenticate scans?
It supports Bearer, API key, Basic auth, and cookies, validated through a domain ownership gate before credentials are used.
Can the server fix issues it finds?
No, the server detects and reports with remediation guidance. It does not patch, block, or remediate.
What scan depth options are available?
Quick, Standard, and Deep, which control the intensity and breadth of LLM/AI security probes.
Does scanning require code access or agents?
No, it is a black-box scanner that requires no agents, SDKs, or code access.
How are webhook notifications secured?
Webhooks are HMAC-SHA256 signed and auto-disabled after five consecutive failures.