mcpField
A

AI Scanner

Local
github.com/Aakashbhardwaj27Security1Updated 32w ago

About AI Scanner

AI Scanner exposes codebase scans through an MCP server for AI agents. It detects AI SDK and framework usage, inventories models and endpoints, and checks for exposed tokens and hardcoded secrets.

Key features

  1. 01Scan code for AI SDKs and frameworks
  2. 02Detect exposed tokens and hardcoded secrets
  3. 03Run pass/fail secret checks
  4. 04Inventory models and API endpoints
  5. 05Include or exclude .env files

Use cases

  1. 01Check a codebase for exposed API credentials
  2. 02Run a secret check before committing
  3. 03Identify AI frameworks and SDKs in a project
  4. 04Review model references and API endpoints

MCP support

Exposes scan_directory, check_secrets, and ai_inventory tools to MCP clients for scanning a specified directory.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"aakashbhardwaj27-ai-scanner": {
"command": "npx",
"args": [
"-y",
"ai-scanner-mcp"
]
}
}
}
Run commandnpx -y ai-scanner-mcp

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmai-scanner-mcp1.0.3

Tools

3

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
ai_onlybooleanNoIf true, only scan for AI-specific patterns (skip generic secrets like Stripe, GitHub tokens, etc.)
scan_envbooleanNoIf true, include .env files in the scan (skipped by default)
directorystringYesAbsolute or relative path to the directory to scan
include_modelsbooleanNoIf true, detect model name references (gpt-4, claude, etc.)
include_endpointsbooleanNoIf true, detect LLM API endpoint URLs

Details

From the project README

ai-scanner logo

ai-scanner-mcp

MCP server for ai-scanner - let AI agents scan codebases for LLM usage, AI frameworks, and exposed secrets.

License: MIT Node.js MCP

An MCP server that exposes ai-scanner as tools for AI agents. Works with Claude Code, Claude Desktop, Cursor, Windsurf, and any MCP-compatible client.

Tools

ToolDescription
scan_directoryFull scan — LLM SDKs, AI frameworks, exposed tokens, and hardcoded secrets with severity levels
check_secretsSecurity check — pass/fail scan for exposed credentials only. Perfect for pre-commit checks
ai_inventoryAI stack overview — which SDKs, frameworks, models, and API endpoints are used (no secret detection)

Setup

Claude Code
claude mcp add ai-scanner npx ai-scanner-mcp
Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "ai-scanner": {
      "command": "npx",
      "args": ["ai-scanner-mcp"]
    }
  }
}

Config file location:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
Cursor

Add to .cursor/mcp.json in your project:

{
  "mcpServers": {
    "ai-scanner": {
      "command": "npx",
      "args": ["ai-scanner-mcp"]
    }
  }
}
Windsurf

Add to ~/.windsurf/mcp.json:

{
  "mcpServers": {
    "ai-scanner": {
      "command": "npx",
      "args": ["ai-scanner-mcp"]
    }
  }
}

Example Usage

Once connected, you can ask your AI agent:

  • "Scan this project for any exposed API keys"
  • "Check if there are any hardcoded secrets before I commit"
  • "What AI SDKs and frameworks does this codebase use?"
  • "Run a security scan on ./src and tell me if it's safe to push"
  • "Give me an AI inventory of this project"

Tool Details

scan_directory

Full scan with all detection categories. Parameters:

ParameterTypeDefaultDescription
directorystringrequiredPath to scan
ai_onlybooleanfalseSkip generic secrets (Stripe, GitHub, etc.)
scan_envbooleanfalseInclude .env files
include_endpointsbooleantrueDetect LLM API endpoint URLs
include_modelsbooleantrueDetect model name references
check_secrets

Security-focused pass/fail check. Parameters:

ParameterTypeDefaultDescription
directorystringrequiredPath to scan
ai_onlybooleanfalseOnly check AI tokens
scan_envbooleanfalseInclude .env files
ai_inventory

AI stack awareness (no secret detection). Parameters:

ParameterTypeDefaultDescription
directorystringrequiredPath to scan

Detection Coverage

  • AI Tokens (20+) — OpenAI, Anthropic, Google, AWS, HuggingFace, Groq, Replicate, and more
  • Generic Secrets (59) — Stripe, Twilio, GitHub, Slack, Discord, database URIs, private keys, JWTs
  • LLM SDKs (23) — OpenAI, Anthropic, Google Gemini, LiteLLM, AWS Bedrock, and more
  • AI Frameworks (24) — LangChain, LlamaIndex, CrewAI, AutoGen, DSPy, Vercel AI SDK, and more
  • 145 total detection patterns

License

MIT

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.