Skip to main content
Glama

GHAS MCP server (GitHub Advanced Security)

ghas-mcp-服务器

MCP 服务器调用 GHAS 来访问 GitHub 存储库。

目前支持以下工具:

  • list_dependabot_alerts:列出存储库的所有 dependabot 警报
  • list_secret_scanning_alerts:列出存储库的所有秘密扫描警报
  • list_code_scanning_alerts:列出存储库的所有代码扫描警报

确保将这三个范围(只读)添加到配置的 PAT 中并添加到正确的组织中!

在 VS Code 和 VS Code Insiders 中安装

使用按钮在您的 VS Code 或 VS Code Insiders 环境中安装服务器。请务必在信任之前阅读链接!链接指向vscode.devinsiders.vscode.dev ,并包含安装服务器的说明。

VS Code 会让你在任何事情发生之前看到配置:

VS Code 中配置的屏幕截图

示例配置

在编辑器中将以下配置添加到您的 MCP 配置中。

安全选项:使用经过身份验证的 GitHub CLI

除了存储个人访问令牌(请参阅下一节)之外,您还可以使用经过身份验证的 GitHub CLI。这将使用您在 GitHub CLI 中配置的凭据。当您已安装 GitHub CLI 并已通过身份验证时,这非常有用。

要使用 GitHub CLI 进行身份验证,请按照以下步骤操作:

  • "GITHUB_PERSONAL_ACCESS_TOKEN_USE_GHCLI": "true"添加到您的环境变量中。
  • 确保您已安装 GitHub CLI,并通过运行gh auth login进行身份验证。

配置:

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

使用个人访问令牌进行配置

对于 VS Code 它看起来像这样:

{ "mcp": { "inputs": [ { "id": "github_personal_access_token", "description": "GitHub Personal Access Token", "type": "promptString", "password": true } ] }, "servers": { "ghas-mcp-server": { "command": "npx", "args": [ "-y", "@rajbos/ghas-mcp-server" ], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_personal_access_token}" } } } }

结果

VS Code 内部输出的屏幕截图

贡献

欢迎贡献!如果您对新工具或改进有任何想法,请创建问题或提交拉取请求。

快速入门

# Install dependencies npm install # Build the project npm run build

项目结构

ghas-mcp-server/ ├── src/ │ ├── operations/ # MCP Tools │ │ └── security.ts │ └── index.ts # Server entry point ├── package.json └── tsconfig.json

添加组件

该项目附带src/operations/security.ts中的 GHAS 工具。

建筑

  1. 更改你的工具
  2. 运行npm run build进行编译
  3. 服务器将在启动时自动加载您的工具

测试本地构建

您可以通过使用以下 MCP 配置配置本地构建版本来测试本地构建:

"servers": { "ghas-mcp-server": { "command": "node", "args": [ "C:/Users/RobBos/Code/Repos/rajbos/ghas-mpc-server/dist/index.js" ], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN_USE_GHCLI": "true" } } }

不要忘记先将路径更改为本地构建并构建项目!

了解更多

-
security - not tested
F
license - not found
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

此服务器与 GitHub Advanced Security 集成,可加载安全警报并将其纳入您的上下文。支持 Dependabot 安全警报、秘密扫描警报和代码安全警报。

  1. 在 VS Code 和 VS Code Insiders 中安装
    1. 示例配置
      1. 安全选项:使用经过身份验证的 GitHub CLI
      2. 使用个人访问令牌进行配置
    2. 结果
      1. 贡献
        1. 快速入门
        2. 项目结构
        3. 添加组件
        4. 建筑
        5. 了解更多

      Related MCP Servers

      • -
        security
        F
        license
        -
        quality
        A standalone Model Context Protocol server for Snyk security scanning functionality.
        Last updated -
        2
        1
        JavaScript
      • -
        security
        F
        license
        -
        quality
        Enables interaction with GitHub issues via the Model Context Protocol, allowing users to list and create issues with secure authentication.
        Last updated -
        Python
      • -
        security
        F
        license
        -
        quality
        A standalone server enabling Snyk security scanning through the Model Context Protocol, with support for repository and project analysis, token verification, and CLI integration.
        Last updated -
        1
        JavaScript
      • A
        security
        F
        license
        A
        quality
        A Model Context Protocol server that enables integration with GitHub Actions, allowing users to fetch available actions, get detailed information about specific actions, trigger workflow dispatch events, and fetch repository releases.
        Last updated -
        4
        92
        1
        JavaScript
        • Apple

      View all related MCP servers

      MCP directory API

      We provide all the information about MCP servers via our MCP API.

      curl -X GET 'https://glama.ai/api/mcp/v1/servers/rajbos/ghas-mcp-server'

      If you have feedback or need assistance with the MCP directory API, please join our Discord server