AI Scanner

io.github.Aakashbhardwaj27由 GitHub 账号 Aakashbhardwaj27 发布v1.0.6更新于 Oct 24, 2026

Scan codebases for LLM/AI SDK usage, exposed API tokens, and hardcoded secrets.

已验证STDIO仅桌面开发者工具安全与监控

概览

AI 生成的概览

本地 MCP 服务器,让助手扫描代码库中的 LLM/AI SDK 使用情况、暴露的 API 令牌和硬编码密钥。

可以做什么
  • 对指定目录执行完整扫描,检测 LLM SDK、AI 框架、暴露的令牌和硬编码密钥并给出严重级别
  • 执行仅针对凭据泄露的通过/失败安全检查,适合提交前检查
  • 生成 AI 技术栈清单,列出所用 SDK、框架、模型和 API 端点,不做密钥检测
  • 可通过仅 AI 模式、是否包含 .env 文件、端点与模型检测等选项调整扫描范围
适用场景
适合在提交或推送代码前让助手审计项目、检查是否有泄露的 API 密钥等凭据,或了解代码库使用了哪些 AI SDK、框架和模型。
运行要求
通过 npx 从 npm 包 ai-scanner-mcp 作为本地进程运行,需要 Node.js 以及 Claude Code、Claude Desktop、Cursor 或 Windsurf 等本地 MCP 客户端。未声明需要账号、API 密钥或环境变量。
安装前请注意
启用相应选项时扫描会读取 .env 等含凭据的文件,扫描结果可能在对话中暴露密钥内容;将扫描输出发送到别处前请先确认内容。扫描为只读操作,但会覆盖你指定的路径。

安装

在 SourceWeft 中

  1. 打开 控制台中的 AI Scanner,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

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

bash
claude mcp add ai-scanner npx ai-scanner-mcp

Claude Desktop

Add to your claude_desktop_config.json:

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:

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

Windsurf

Add to ~/.windsurf/mcp.json:

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

来源:README.md,提交 d1be69e

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.0.6最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分