mcpField
A
Argus - Repository Analysis and Security Assessment Tool

Argus - Repository Analysis and Security Assessment Tool

本地服务
github.com/athapong开发工具288 周前更新

关于 Argus - Repository Analysis and Security Assessment Tool

Argus 是用于分析 GitLab 仓库、代码质量和安全性的 MCP 服务,支持多种编程语言。它结合 Git 分支与历史分析、语言专项检查及 Trivy 扫描。

主要功能

  1. 01自动检测编程语言
  2. 02多语言代码质量检查
  3. 03Trivy 漏洞扫描
  4. 04分支与提交历史分析
  5. 05Git 差异比较
  6. 06仓库结构分析

适用场景

  1. 01检查 GitLab 仓库代码质量
  2. 02扫描仓库中的漏洞
  3. 03比较不同分支的更改
  4. 04查看仓库历史与结构

MCP 相关

Argus 向 MCP 客户端提供仓库分析、代码质量检查、Git 操作和安全扫描能力。

配置

本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。

mcp.json · 通用配置
{
"mcpServers": {
"argus": {
"command": "uvx",
"args": [
"git+https://github.com/athapong/argus"
]
}
}
}
启动命令uvx 'git+https://github.com/athapong/argus'

本地服务需要在你的电脑上安装运行环境(如 Node.js 18+)。各客户端的配置文件位置不同,请参考客户端文档。

安装包
pypigit+https://github.com/athapong/argus

工具

还没有获取到工具列表

本地服务需要在你的电脑上运行后才能读取工具,维护者暂未提供工具列表。

详细介绍

Argus - 代码仓库分析与安全评估工具

一款功能强大的模型上下文协议(MCP)工具,可分析代码仓库、执行安全扫描,并评估多种编程语言的代码质量。

功能

  • 多语言支持

    • Go:gocyclo、golangci-lint 分析
    • Java:PMD 静态分析
    • Python:Pylint、Bandit 安全检查
    • JavaScript/TypeScript:ESLint 分析
    • 自动检测语言
  • 安全扫描

    • 集成 Trivy 漏洞扫描器
    • 全面的安全报告
    • 支持多个分支
  • Git 操作

    • 分支枚举与管理
    • 提交历史分析
    • 差异比较
    • 仓库结构可视化

安装

前置条件
  • Python 3.8+
  • Git
  • libmagic(系统依赖)
系统依赖
macOS
brew install libmagic
Linux(Ubuntu/Debian)
sudo apt-get update
sudo apt-get install -y libmagic1
通过 uv 安装
uvx argus

用法

基本 MCP 命令
# Analyze repository structure
analyze_repository_structure(
    repo_url="https://gitlab.com/user/repo",
    gitlab_credentials={"api_key": "your-token"},  # Optional
    branch="main"  # Optional
)

# Perform code quality analysis
analyze_code_quality(
    repo_url="https://gitlab.com/user/repo",
    language="python"  # Optional, will auto-detect if not specified
)

# Security scan
security_scan_repository(
    repo_url="https://gitlab.com/user/repo",
    scan_type="trivy"
)

# Compare changes
compare_git_changes(
    repo_url="https://gitlab.com/user/repo",
    source="feature-branch",
    target="main"
)

# Security scan repository
security_scan_repository(
    repo_url="https://gitlab.com/user/repo",
    scan_type="trivy"
)

### MCP Configuration

```json
{
    "command": "uvx",
    "args": [
        "--from",
        "git+https://github.com/athapong/argus",
        "argus"
    ],
    "alwaysAllow": [
        "get_commit_history",
        "enumerate_branches",
        "compare_git_changes",
        "analyze_code_quality",
        "security_scan_repository"  
    ],
    "timeout": 300
}

支持的分析工具

语言工具安装
Gogocyclo, golangci-lintgo install github.com/fzipp/gocyclo/cmd/gocyclo@latest
JavaPMDmacOS:brew install pmd,Linux:自动安装
PythonPylint, Bandit通过依赖自动安装
JavaScriptESLintnpm install -g eslint

环境变量

  • SKIP_SYSTEM_CHECK:设置为任意值即可跳过系统依赖检查
  • PATH:安装工具时会自动更新

错误处理

该工具会提供详细的错误消息,并在出现问题时优雅地回退:

  • 依赖安装失败时会显示警告,而非错误
  • 自动检测失败时,会回退到指定的语言
  • 工具执行错误会记录在响应结构中

许可证

MIT 许可证

参与贡献

  1. Fork 此仓库
  2. 创建功能分支
  3. 提交更改
  4. 推送到该分支
  5. 创建新的 Pull Request

评论

支持 Markdown

第一次接触 MCP?

从协议是什么,到在客户端里装上第一个服务,这几条回答覆盖了大多数入门问题。

一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。