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.dev
和insiders.vscode.dev
,并包含安装服务器的说明。
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
进行身份验证。
配置:
使用个人访问令牌进行配置
对于 VS Code 它看起来像这样:
结果
贡献
欢迎贡献!如果您对新工具或改进有任何想法,请创建问题或提交拉取请求。
快速入门
项目结构
添加组件
该项目附带src/operations/security.ts
中的 GHAS 工具。
建筑
- 更改你的工具
- 运行
npm run build
进行编译 - 服务器将在启动时自动加载您的工具
测试本地构建
您可以通过使用以下 MCP 配置配置本地构建版本来测试本地构建:
不要忘记先将路径更改为本地构建并构建项目!
了解更多
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
此服务器与 GitHub Advanced Security 集成,可加载安全警报并将其纳入您的上下文。支持 Dependabot 安全警报、秘密扫描警报和代码安全警报。
Related MCP Servers
- -securityFlicense-qualityA standalone Model Context Protocol server for Snyk security scanning functionality.Last updated -21JavaScript
- -securityFlicense-qualityEnables interaction with GitHub issues via the Model Context Protocol, allowing users to list and create issues with secure authentication.Last updated -Python
- -securityFlicense-qualityA 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 -1JavaScript
- AsecurityFlicenseAqualityA 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 -4921JavaScript
Appeared in Searches
- A platform for hosting and sharing code
- Using separate agents for schema validation, code standards, and directory structure enforcement in development workflows
- Information about Git, a version control system
- A database for looking up CVEs on the National Vulnerability Database
- Getting Help with GitHub Actions Workflow Coding