← Blog’a dön

← Back to blog

MCP AI Code Scanner: insecure LLM integration patterns

,
{“@context”: “https://schema.org”, “@type”: “FAQPage”, “mainEntity”: [{“@type”: “Question”, “name”: “How is this different from Secret Scanner?”, “acceptedAnswer”: {“@type”: “Answer”, “text”: “Secret Scanner finds credentials; AI Code Scanner finds LLM integration anti-patterns. They complement each other.”}}, {“@type”: “Question”, “name”: “False positives?”, “acceptedAnswer”: {“@type”: “Answer”, “text”: “It uses heuristic patterns designed for low false positives — still review findings manually.”}}, {“@type”: “Question”, “name”: “Do I need an API key?”, “acceptedAnswer”: {“@type”: “Answer”, “text”: “No — scans run locally on the filesystem.”}}]}

MCP guide · AI Code Scanner

MCP AI Code Scanner: insecure LLM integration patterns
@guardbee/mcp-ai-code-scanner

@guardbee/mcp-ai-code-scanner scans your codebase for common LLM/AI integration security patterns. Where the secret scanner hunts credentials, this package hunts patterns: trust in model output, agent tool privileges, and PII sent to third-party LLMs.

What does it do?

It flags risks like OpenAI dangerouslyAllowBrowser, AI keys in NEXT_PUBLIC_ bundles, eval(llmOutput), shelling model output, unvalidated JSON.parse, unbounded agent loops, and raw user input in system prompts — each finding includes a recommendation.

Who is it for?

  • Product teams shipping LLM features
  • Security reviews focused on OWASP LLM Top 10 themes
  • Teams adding an AI-security gate with SARIF in CI
  • Developers who want this check inside Claude or Cursor

What it is not

  • Full AST/semantic SAST replacement (heuristic text patterns)
  • Credential leak scanning (use Secret Scanner)
  • Runtime exploit verification

Features

FeatureDescription
10 patterns / 5 categoriesclient-exposure, output-handling, excessive-agency, data-privacy, prompt-injection
RecommendationsWhy it’s risky and what to do
SARIF 2.1.0GitHub Code Scanning-ready output
guardbee.ymlfail-on, max-files, exclude rules
Local scanNo Guardbee API key

MCP tools

ToolDescription
scan_textScan a text/code snippet
scan_fileSingle file
scan_directoryDirectory (skips node_modules, .git, dist)
list_patternsList supported patterns

Install with npm

Global install (handy for Claude Desktop / Cursor):

bash
npm install -g @guardbee/mcp-ai-code-scanner

or via npx (recommended with -y in config):

bash
npx -y @guardbee/mcp-ai-code-scanner

npm: @guardbee/mcp-ai-code-scanner

CLI: npx @guardbee/mcp-ai-code-scanner scan ./src --fail-on=high --format=sarif > results.sarif. Opt out of telemetry with GUARDBEE_TELEMETRY=0.

Claude Desktop configuration

Config file paths:

  • macOS~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows%APPDATA%\Claude\claude_desktop_config.json
  • Linux~/.config/Claude/claude_desktop_config.json

Merge this block, then restart Claude Desktop:

claude_desktop_config.json
{
  "mcpServers": {
    "guardbee-ai-code-scanner": {
      "command": "npx",
      "args": [
        "-y",
        "@guardbee/mcp-ai-code-scanner"
      ]
    }
  }
}

Cursor and other MCP clients

In Cursor, add the same command / args / env under Settings → MCP. stdio MCP servers use the same contract as Claude Desktop.

Example prompts in Claude

  1. “Scan this project for AI security patterns: /Users/me/my-app/src”
  2. “Does this React component render LLM output unsafely?”
  3. “Which patterns do you support? list_patterns”

Related links

See surface risk with Guardbee

MCP servers speed up security work in chat. Start a 14-day free trial for brand scans and BeeAI.

Start free MCP servers

Frequently asked questions

Vs Secret Scanner?

Secret Scanner finds credentials; AI Code Scanner finds LLM integration anti-patterns. Complementary.

False positives?

Heuristic — designed for low FP, still review findings manually.

API key?

No — fully local/filesystem.

Paylaş

Share

Sitenizin risk skorunu görün — 14 gün ücretsiz deneme.

See your site’s risk score — 14-day free trial.