ai-scanner-mcp
MCP server for ai-scanner - let AI agents scan codebases for LLM usage, AI frameworks, and exposed secrets.
工具
| 工具 | 说明 |
|---|---|
scan_directory | 全扫描——LLM SDK、AI框架、暴露的令牌和具有严重级别的硬编码秘密 |
check_secrets | 安全检查——仅对暴露的凭据进行通过/失败扫描。非常适合预提交检查 |
ai_inventory | AI堆栈概述-使用哪些SDK、框架、模型和API端点(无秘密检测) |
设置
克劳德代码
claude mcp add ai-scanner npx ai-scanner-mcp克劳德桌面版
添加到您的 claude_desktop_config.json:
{
"mcpServers": {
"ai-scanner": {
"command": "npx",
"args": ["ai-scanner-mcp"]
}
}
}配置文件位置:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - 窗户:
%APPDATA%\Claude\claude_desktop_config.json
光标
添加 .cursor/mcp.json 在您的项目中:
{
"mcpServers": {
"ai-scanner": {
"command": "npx",
"args": ["ai-scanner-mcp"]
}
}
}帆板运动
添加 ~/.windsurf/mcp.json:
{
"mcpServers": {
"ai-scanner": {
"command": "npx",
"args": ["ai-scanner-mcp"]
}
}
}示例用法
连接后,您可以询问您的AI代理:
- *“扫描此项目以查找任何暴露的API密钥”*
- *“在我提交之前,检查是否有任何硬编码的秘密”*
- *“这个代码库使用哪些AI SDK和框架?”*
- *“在./src上运行安全扫描,并告诉我推送是否安全”*
- *“给我一份这个项目的人工智能清单”*
工具详细信息
scan_directory
所有检测类别的全扫描。参数:
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
directory | 字符串 | *必需的* | 扫描路径 |
ai_only | 布尔值 | false | 跳过通用机密(Stripe、GitHub等) |
scan_env | 布尔值 | false | 包含.env文件 |
include_endpoints | 布尔值 | true | 检测LLM API端点URL |
include_models | 布尔值 | true | 检测模型名称引用 |
check_secrets
以安全为重点的通过/失败检查。参数:
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
directory | 字符串 | *必需的* | 扫描路径 |
ai_only | 布尔值 | false | 仅检查AI令牌 |
scan_env | 布尔值 | false | 包含.env文件 |
ai_库存
AI堆栈感知(无秘密检测)。参数:
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
directory | 字符串 | *必需的* | 扫描路径 |
探测范围
- AI代币(20+) --OpenAI、Anthropic、谷歌、AWS、HuggingFace、Groq、Replicate等
- 一般秘密(59) --Stripe、Twilio、GitHub、Slack、Discord、数据库URI、私钥、JWT
- LLM软件开发工具包(23) --OpenAI、Anthropic、谷歌Gemini、LiteLLM、AWS Bedrock等
- 人工智能框架(24) --LangChain、LlamaIdex、CrewAI、AutoGen、DSPy、Vercel AI SDK等
- 总共145种检测模式
