GitHub Security Analyzer — MCP
This MCP server enables users to sign in with GitHub and use AI agents to scan entire repositories for leaked secrets such as API keys, passwords, and tokens, delivering a report with the exact file and line plus remediation guidance.
README
GitHub Security Analyzer — MCP
An AI-powered GitHub security scanner. Log in with your GitHub account, give it a repo name, and the AI scans every file for exposed secrets like API keys, passwords, and tokens — then gives you a full report with what to fix.
How It Works
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
Project Structure
├── 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)
Setup
1. Create a .env file:
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. Install dependencies:
pip install -r requirements.txt
3. Login with GitHub:
python login.py
Open http://127.0.0.1:5000 → click "Login with Github" → authorize → done.
This saves your token to .github_token. You only need to do this once.
Running
Option A — AI Agent (terminal)
python agent.py
Enter a repo name when prompted. The AI scans it and prints a full security report.
Option B — MCP Server (for Claude Desktop or any MCP client)
mcp dev server.py
What It Scans For
| Secret Type | Example Pattern |
|---|---|
| AWS Access Key | AKIA... |
| GitHub Token | ghp_... |
| Google API Key | AIza... |
| Stripe Keys | sk_live_... |
| Database URLs | postgres://user:pass@host |
| Generic Passwords | password = "..." |
| Private Keys | -----BEGIN RSA PRIVATE KEY----- |
| Bearer Tokens | Authorization: Bearer ... |
| Slack / Twilio / SendGrid tokens | various patterns |
Available MCP Tools
| Tool | What it does |
|---|---|
list_repositories |
Lists all your GitHub repos |
repository_details |
Gets details about a specific repo |
read_file |
Reads source code from a file |
issues |
Lists open GitHub issues |
code_change_summary |
Gets recent commit messages |
security_scan |
Quick scan of file names for sensitive words |
deep_security_scan |
Full content scan of all files for secrets |
Important
- Never commit
.github_tokenor.env— both are in.gitignore - If you accidentally push your token, revoke it immediately at
https://github.com/settings/tokens
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。