Appknox MCP服务器
先决条件
- Node.js 18岁或以上
- Appknox命令行界面 -请参阅 安装说明
- Appknox访问令牌 -从 Appknox仪表板 → 设置→ 开发人员设置
安装
npm install -g @appknox/mcp-server配置
认证
使用Appknox CLI配置您的访问令牌:
appknox init这将提示您输入访问令牌并将其保存到 ~/.config/appknox.json.
或者,设置 APPKNOX_ACCESS_TOKEN 如果您不想使用配置文件,请使用环境变量。
有关其他配置选项(API主机、区域、代理),请参阅 Appknox CLI文档.
Claude桌面设置
添加到您的Claude Desktop配置中:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json 视窗: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"appknox": {
"command": "npx",
"args": ["-y", "@appknox/mcp-server"]
}
}
}如果你还没跑 appknox init,您可以直接在配置中设置令牌:
{
"mcpServers": {
"appknox": {
"command": "npx",
"args": ["-y", "@appknox/mcp-server"],
"env": {
"APPKNOX_ACCESS_TOKEN": "your-token-here"
}
}
}
}环境变量
| 变量 | 描述 | 默认值 |
|---|---|---|
APPKNOX_ACCESS_TOKEN | 您的Appknox API访问令牌 | 从 ~/.config/appknox.json |
APPKNOX_CLI_PATH | Appknox CLI二进制文件的绝对路径 | /usr/local/bin/appknox |
LOG_LEVEL | 日志记录级别(debug, info, warn, error) | info |
如果Appknox CLI安装在非标准位置,请设置 APPKNOX_CLI_PATH:
{
"mcpServers": {
"appknox": {
"command": "npx",
"args": ["-y", "@appknox/mcp-server"],
"env": {
"APPKNOX_CLI_PATH": "/opt/homebrew/bin/appknox"
}
}
}
}更新后重新启动Claude Desktop。
可用工具
MCP服务器将Appknox CLI命令作为工具公开:
| 工具 | 说明 |
|---|---|
appknox_whoami | 显示当前经过身份验证的用户信息 |
appknox_organizations | 列出用户可访问的所有组织 |
appknox_projects | 按平台、包名或搜索查询列出具有可选筛选功能的项目 |
appknox_files | 列出特定项目的所有文件(应用程序版本)。需要 project_id |
appknox_analyses | 列出文件的安全分析结果(漏洞)。需要 file_id |
appknox_vulnerability | 获取特定漏洞的详细信息 |
appknox_owasp | 按ID获取OWASP类别详细信息 |
appknox_upload | 上传APK/IPA文件进行安全扫描。退货 file_id |
appknox_cicheck | 根据风险阈值检查漏洞(适用于CI/CD管道) |
appknox_sarif | 生成SARIF报告,以便与代码分析工具集成 |
appknox_reports_create | 为文件创建漏洞报告 |
appknox_reports_download | 以CSV格式下载漏洞报告。直接返回内容 |
appknox_dastcheck | 检查DAST(动态扫描)状态和结果 |
工具工作流程
大多数工具都需要来自其他工具的ID:
appknox_projects → project_id → appknox_files → file_id → appknox_analyses
→ appknox_reports_download
→ appknox_cicheck
→ appknox_sarif用法示例
基本查询
"Who am I logged in as?"
"List all my organizations"
"Show me all my projects"
"List projects with package name containing 'com.example'"处理项目和文件
"List all files for project ID 1234"
"Show me the latest scan results for project 'MyApp'"
"What vulnerabilities were found in file ID 56789?"上传和扫描
"Upload /Users/me/Downloads/myapp.apk for security scanning"
"Upload the app at /Users/me/Desktop/app.ipa and tell me the file ID"重要:文件路径必须是本地计算机上的绝对路径(例如。, /Users/username/Downloads/app.apk).拖放上传或沙盒路径不起作用。证券分析
"Show all critical and high vulnerabilities for file ID 12345"
"Check if file ID 12345 passes the security threshold for 'high' risk"
"Run a CI check on file 12345 with medium risk threshold"报告和文件
"Download the vulnerability report for file ID 12345"
"Generate a SARIF report for file 12345 with high risk threshold"
"Get details about vulnerability ID 67890"
"What is OWASP M1_2016?"CI/CD集成场景
"Upload /path/to/app.apk and check if it has any critical vulnerabilities"
"Scan the app and fail if there are any high-risk issues"
"Generate a SARIF report I can upload to GitHub Security"动态分析(DAST)
"Check the DAST scan status for file ID 12345"
"What are the dynamic scan results for file 12345 with medium risk threshold?"故障排除
未找到Appknox CLI:使用验证安装 which appknox 认证失败:检查您的令牌 echo $APPKNOX_ACCESS_TOKEN 调试记录:设置 LOG_LEVEL=debug 在您的环境中
发展
# Clone and build
git clone https://github.com/appknox/appknox-mcp.git
cd appknox-mcp
npm install
npm run build
# add to mcp config
"appknox": {
"command": "node",
"args": ["/abosolute/path/to/appknox-mcp/build/index.js"]
}看 贡献.md 关于贡献指南。
资源
许可证
麻省理工学院
