Skip to main content
Glama
jmass-ggg

GitHub Security Analyzer — MCP

by jmass-ggg

GitHub Security Analyzer — MCP

一个由 AI 驱动的 GitHub 安全扫描器。使用你的 GitHub 账户登录,输入仓库名称,AI 就会扫描每个文件,查找暴露的机密信息(如 API 密钥、密码和令牌),然后给你一份完整的报告,说明需要修复的内容。


工作原理

1. Login with GitHub (OAuth)
        ↓
   .github_token saved locally
        ↓
2. Run the agent
        ↓
   You type a repo name
        ↓
3. AI calls deep_security_scan tool
        ↓
   Fetches every file from the repo via GitHub API
        ↓
   Scans each file with 16 secret patterns (regex)
        ↓
4. AI reads the results and writes a report
        ↓
   Tells you what was found, which file, which line, and how to fix it

Related MCP server: github-security-mcp

项目结构

├── login.py          # GitHub OAuth login — saves token to .github_token
├── github_client.py  # Wrapper around GitHub API calls
├── server.py         # MCP tools (list repos, scan files, read code, etc.)
├── agent.py          # AI agent loop — uses OpenRouter to run the scanner
├── requirements.txt  # Python dependencies
└── .env              # Your credentials (never commit this)

设置

1. 创建 .env 文件:

GITHUB_CLIENT_ID=your_github_app_client_id
GITHUB_CLIENT_SECRET=your_github_app_client_secret
FLASK_SECRET_KEY=any_random_string
OPENROUTER_API_KEY=your_openrouter_key

2. 安装依赖:

pip install -r requirements.txt

3. 使用 GitHub 登录:

python login.py

打开 http://127.0.0.1:5000 → 点击“使用 Github 登录” → 授权 → 完成。这会将你的令牌保存到 .github_token。你只需要执行一次。


运行

选项 A — AI 智能体(终端)

python agent.py

在提示时输入仓库名称。AI 会扫描它并打印一份完整的安全报告。

选项 B — MCP 服务器(适用于 Claude Desktop 或任何 MCP 客户端)

mcp dev server.py

它会扫描什么

机密类型

示例模式

AWS 访问密钥

AKIA...

GitHub 令牌

ghp_...

Google API 密钥

AIza...

Stripe 密钥

sk_live_...

数据库 URL

postgres://user:pass@host

通用密码

password = "..."

私钥

-----BEGIN RSA PRIVATE KEY-----

Bearer 令牌

Authorization: Bearer ...

Slack / Twilio / SendGrid 令牌

各种模式


可用的 MCP 工具

工具

功能

list_repositories

列出你的所有 GitHub 仓库

repository_details

获取特定仓库的详细信息

read_file

读取文件中的源代码

issues

列出未关闭的 GitHub issue

code_change_summary

获取最近的提交消息

security_scan

快速扫描文件名中的敏感词

deep_security_scan

全面扫描所有文件内容以查找机密信息


重要事项

  • 切勿提交 .github_token.env — 两者都在 .gitignore

  • 如果你不小心推送了令牌,请立即在 https://github.com/settings/tokens 撤销它

F
license - not found
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    Not graded
    maintenance
    Enterprise-grade MCP (Model Context Protocol) server for detecting secrets and sensitive information in GitHub repositories. Scans for 35+ types of secrets including API keys, passwords, tokens, and credentials with production-ready reliability features.
    5
    0
  • A
    license
    A
    quality
    D
    maintenance
    An MCP server that enables AI agents to perform comprehensive GitHub security audits across org settings, repositories, Actions workflows, secrets, supply chain, and access control using 39 tools and 45 checks.
    39
    521
    12
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    An MCP server for AI security analysis, enabling vulnerability scanning, sensitive information leak detection, and GitHub code leak monitoring via 48 tools.
    MIT

View all related MCP servers

Related MCP Connectors

  • Scans MCP servers for tool poisoning, prompt injection and supply chain risks.

  • Scan any public GitHub MCP-server repo for security issues. 37 MCP-specific L1 rules, 8 languages.

  • Security scanner for MCP servers. Detect vulnerabilities, prompt injection, and tool poisoning.

View all MCP Connectors

Latest Blog Posts

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/jmass-ggg/Github-Security-analyze-MCP'

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