Back to MCP directory
publicPublicdnsLocal runtime

ghas-mcp-server

这是一个GitHub高级安全(GHAS)的MCP服务器项目,用于通过MCP协议调用GitHub仓库的安全扫描功能,包括依赖项警报、秘密扫描警报和代码扫描警报。支持通过GitHub CLI或个人访问令牌进行认证,并提供了VS Code扩展的安装方式。

article

README

🚀 ghas-mcp-server 项目文档

ghas-mcp-server 是一个 MCP(Multi-Platform Controller)服务器,主要用于与 GitHub Advanced Security (GHAS) API 进行交互。它能帮助开发者更好地管理和处理与 GitHub 仓库安全相关的事务,提升项目的安全性。

🚀 快速开始

本项目是用于与 GitHub Advanced Security (GHAS) API 交互的 MCP 服务器,支持获取和管理依赖项安全警告、检测敏感信息泄露以及扫描代码潜在安全漏洞等功能。以下是快速启动项目的步骤。

✨ 主要特性

  • dependabot alerts:获取和管理依赖项相关的安全警告。
  • secret scanning alerts:检测和处理仓库中的敏感信息泄露。
  • code scanning alerts:扫描代码以发现潜在的安全漏洞。

📦 安装指南

使用 npm 安装依赖

npm install

编译项目

npm run build

📚 详细文档

配置示例

使用 GitHub CLI 登录

{
    "mcp": {
        "inputs": []
    },
    "servers": {
        "ghas-mcp-server": {
            "command": "npx",
            "args": [
                "@rajbos/ghas-mpc-server"
            ],
            "env": {
                "GITHUB_PERSONAL_ACCESS_TOKEN_USE_GHCLI": "true"
            }
        }
    }
}

使用个人访问令牌

{
    "mcp": {
        "inputs": [
            {
                "id": "github_personal_access_token",
                "description": "GitHub 个人访问令牌",
                "type": "promptString",
                "password": true
            }
        ]
    },
    "servers": {
        "ghas-mcp-server": {
            "command": "npx",
            "args": [
                "@rajbos/ghas-mpc-server"
            ],
            "env": {
                "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_personal_access_token}"
            }
        }
    }
}

运行结果

运行结果截图

项目结构

ghas-mcp-server/
├── src/
│   ├── operations/      # MCP 工具包
│   │   └── security.ts
│   └── index.ts         # 服务器入口文件
├── package.json
└── tsconfig.json

贡献指南

欢迎各位贡献代码!如果有任何新功能或改进建议,请随时提交问题或拉取请求。

快速上手

  1. 克隆项目仓库。
  2. 安装依赖:npm install
  3. 编译项目:npm run build

学习资源

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client