Git Security
FreeNot checkedAnalyzes GitHub repositories for security risks including exposed secrets, vulnerable dependencies, and high-churn hotspot files.
About
Analyzes GitHub repositories for security risks including exposed secrets, vulnerable dependencies, and high-churn hotspot files.
README
Git MCP is an MCP server that helps LLM agents analyze GitHub repositories for security risk and codebase shape.
It combines four practical scans:
- Secrets exposure in commit history
- Dependency inventory from common manifest files
- Dependency CVE scan using Trivy
- Hotspot detection (frequently changed files)
It also includes a repository summarizer that returns relevant file paths and contents for downstream reasoning.
Objectives
This project demonstrates building an MCP-native security workflow that is:
- Tool-driven (LLM invokes structured capabilities, not ad-hoc scripts)
- Operationally aware (timeouts, error categorization, and binary checks)
- Agent-friendly (standardized response envelope for reliable parsing)
Tech stack
- Python 3.11+
- FastMCP (
mcp.server.fastmcp.FastMCP) - Pydantic response models
- External scanners:
- TruffleHog (via Docker image)
- Trivy (local binary)
Repository layout
src/git_mcp/
server.py # MCP server and tool registration
models/responses.py # Standard ToolResponse schema
tools/
secrets.py # GitHub secret scan (TruffleHog via Docker)
dependencies.py # Dependency extraction + Trivy CVE scan
hotspots.py # Git churn hotspot scan
clone.py # Repo clone helper + repository summarizer
prerequisites.py # Local runtime binary checks
Prerequisites
Install the following on your machine and ensure they are on PATH:
uvgitdocker(required for secret scanning)trivy(required for CVE scanning)
Installation
uv sync
Run the MCP server
uv run git-mcp
This starts the MCP server over stdio, suitable for MCP-compatible clients/agents.
MCP tools
run_github_secret_scan(owner, repo, scan_depth=50)
Scans GitHub commit history for exposed secrets using containerized TruffleHog.
run_dependency_scan(owner, repo)
Extracts dependencies from root-level package.json, pyproject.toml, and requirements.txt.
run_github_dependency_cve_scan(owner, repo, severity_threshold="HIGH")
Runs Trivy vulnerability scan on extracted dependencies and returns CVE findings at or above the threshold.
run_github_hotspot_scan(owner, repo, scan_depth=50)
Finds high-churn files from Git history (git log --name-only) to identify risk hotspots.
run_summarize_repository(owner, repo)
Clones the repository and returns relevant source/text files (excluding .git, node_modules, __pycache__) with lightweight summary metadata.
Response contract
All tools return a shared ToolResponse schema with:
status:ok | degraded | errorsummary: concise human-readable outcomefindings: structured list payload- optional
error_categoryanderror_detail
This consistency improves reliability when wiring multiple tools into one agent loop.
Notes and current limitations
- Dependency extraction currently checks only top-level repository manifests.
- Secret scanning relies on Docker availability at runtime.
- CVE scanning requires local Trivy installation.
- Default command timeouts are tuned for interactive agent usage and may need adjustment for large repositories.
Installing Git Security
This server has no published package — it is built from source. Open the repository and follow its README.
▸ github.com/felip3s/git_sec_mcpFAQ
Is Git Security MCP free?
Yes, Git Security MCP is free — one-click install via Unyly at no cost.
Does Git Security need an API key?
No, Git Security runs without API keys or environment variables.
Is Git Security hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install Git Security in Claude Desktop, Claude Code or Cursor?
Open Git Security on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
GitHub
PRs, issues, code search, CI status
by GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Template MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
by mcpdotdirectCompare Git Security with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All development MCPs
