
GitGuardian MCP Server
MCPGitGuardian 官方 MCP,用 500 多种检测器扫描代码里泄露的密钥,agent 还能分诊和处理泄露事件、生成蜜罐令牌、提 PR 修复。需要 GitGuardian 账号,推荐用官方托管地址并通过 OAuth 登录。
GitGuardian MCP Server
Remediate leaked secrets from your AI agent, from a single repository to your whole organization.
The GitGuardian MCP server connects any MCP client to GitGuardian's secrets detection and incident management. Your agent gets the same view of your incidents as the GitGuardian dashboard, and can act on them for you.
Built for two jobs
SecOps and AppSec: orchestrate remediation at scale
- Triage the backlog. List, count and prioritize internal and Public Monitoring incidents by severity, validity, source, tag or assignee.
- Route the work. Assign incidents to the right developer or team, set severity,
add tags and comments, across the whole workspace. Share Public Monitoring incidents
with external developers using
create_public_incident_share_link(requiresincidents:share). Anyone holding the link can view the shared incident; feedback collection and permission to resolve or ignore default to off. Setlifespanin hours, or leave it at zero for the workspace's default sharing duration. Revoke the link withrevoke_public_incident_share_linkto end that access. - Close the loop. Resolve, ignore or reopen incidents, revoke exposed secrets, and deploy honeytokens.
Developers: fix incidents in the repository you work on
- See what's yours. Get the incidents assigned to you and the leaks in the current repository, with their exact locations and history.
- Fix them in place. Follow GitGuardian’s remediation workflow, or your organization’s own, to remove the secret from the code and get it rotated.
[!CAUTION] Agents act with your permissions. Review actions that modify incidents, create credentials, or revoke secrets, and grant only the scopes you need.
Quick start: hosted server
Add the URL for your GitGuardian region through your client's remote MCP setup and complete the OAuth sign-in:
| Region | URL |
|---|---|
| US | https://mcp.gitguardian.com/mcp |
| EU | https://mcp.eu1.gitguardian.com/mcp |
Example for clients using an mcpServers configuration:
{
"mcpServers": {
"GitGuardian": {
"type": "http",
"url": "https://mcp.gitguardian.com/mcp"
}
}
}
Hosted requests pass through the GitGuardian MCP service. To run the server on your own machine or infrastructure, use local stdio or self-hosting.
Try asking your agent:
- "Scan this codebase for leaked credentials."
- "Explain the security incidents assigned to me and suggest remediation steps."
- "Generate an AWS honeytoken named dev-database."
Local stdio
Install uv and add this local-server configuration to your MCP client. Requests go from your machine to the configured GitGuardian API.
{
"mcpServers": {
"GitGuardian": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/GitGuardian/ggmcp.git",
"gg-mcp-server"
],
"env": {
"GITGUARDIAN_URL": "https://dashboard.gitguardian.com"
}
}
}
}
Set GITGUARDIAN_URL to your dashboard URL. Browser login is enabled by default;
the first tool call opens a login flow and stores the resulting PAT locally for reuse.
Each login creates a new PAT in your GitGuardian account.
For headless use, add GITGUARDIAN_PERSONAL_ACCESS_TOKEN and
ENABLE_LOCAL_OAUTH=false to env. Create a PAT under API → Personal Access
Tokens in your GitGuardian dashboard. Keep real tokens out of committed configuration.
Clients that cannot find uvx through PATH need its absolute path in command.
For optional Sentry support, use
ggmcp[sentry] @ git+https://github.com/GitGuardian/ggmcp.git as the --from value
and configure SENTRY_DSN.
Self-hosting
Run the published Docker image behind a reverse proxy that terminates TLS, then
connect your MCP clients to its /mcp endpoint:
docker run -p 8000:8000 \
-e GITGUARDIAN_URL=https://dashboard.gitguardian.mycorp.local \
-e IS_ON_PREM=true \
-e MCP_BASE_URL=https://mcp.mycorp.local \
-e MCP_OAUTH_PROXY_ENABLED=true \
-e MULTI_TENANCY_ENABLED=true \
-e MCP_PORT=8000 \
-e ENABLE_LOCAL_OAUTH=false \
ghcr.io/gitguardian/mcp-server:latest \
gunicorn --workers=4 --worker-class=uvicorn.workers.UvicornWorker \
-b 0.0.0.0:8000 gg_mcp_server.http_app:app
IS_ON_PREM=trueselects the self-hosted GitGuardian API path and supported scopes, overriding hostname detection. Set it explicitly for self-hosted GitGuardian instances.MCP_BASE_URLis the public URL of your MCP server.MCP_OAUTH_PROXY_ENABLED=trueenables OAuth discovery and proxies authorization to your GitGuardian dashboard.- HTTP requires
MULTI_TENANCY_ENABLED=trueandMCP_PORT. Every request uses its own bearer token; the server refuses HTTP startup without multi-tenancy.
For HTTP clients that send a PAT directly, leave MCP_OAUTH_PROXY_ENABLED unset,
keep ENABLE_LOCAL_OAUTH=false, and send Authorization: Bearer <PAT> with each request.
Live change notifications
Live tool, prompt and resource change subscriptions are disabled for HTTP and stdio.
This keeps long-lived subscriptions/listen responses from blocking worker recycling.
Clients can continue to discover and call tools normally; modern protocol discovery
advertises change subscriptions as unavailable.
Pagination
List tools accept per_page (1 to 100, default 20), cursor and get_all.
Results report per_page and provide next_arguments for the next call.
The former page_size input and result field have been removed; update existing
calls and result consumers to use per_page. A call that still sends page_size
is refused with an error naming per_page, so an agent can correct itself.
Configuration
Environment variables
| Variable | Purpose | Default |
|---|---|---|
GITGUARDIAN_URL | GitGuardian dashboard URL | https://dashboard.gitguardian.com |
IS_ON_PREM | true: self-hosted; false: SaaS; unset: detect from hostname | Unset |
GITGUARDIAN_PERSONAL_ACCESS_TOKEN | PAT for local stdio | Unset |
GITGUARDIAN_SCOPES | Comma-separated OAuth scopes to request | Scopes used by the tools |
GITGUARDIAN_CLIENT_ID | OAuth client ID | ggshield_oauth |
GITGUARDIAN_TOKEN_NAME | Name for a local OAuth-issued PAT | MCP Token |
GITGUARDIAN_TOKEN_LIFETIME | Local OAuth PAT lifetime in days, or never | 30 |
MCP_PORT | Enable HTTP on this port; unset selects stdio | Unset |
MULTI_TENANCY_ENABLED | Use each request's bearer token; required for HTTP | false |
MCP_HOST | HTTP bind address | 127.0.0.1 |
MCP_BASE_URL | Public MCP server URL for OAuth discovery | http://localhost:8000 |
MCP_OAUTH_PROXY_ENABLED | Enable OAuth proxy mode | false |
ENABLE_LOCAL_OAUTH | Enable local browser login | true |
LOG_LEVEL | Log level | INFO |
LOG_FORMAT | json or console | Console on a TTY; JSON otherwise |
Development
Install Python 3.13, uv, and Make, then run:
git clone https://github.com/GitGuardian/ggmcp.git
cd ggmcp
uv sync --frozen --all-groups
make test
make lint
make typecheck
make format
Install the linting, commit-message, and secret-scanning hooks with
uvx pre-commit install and uvx pre-commit install --hook-type pre-push.
Tools live in src/gg_api_core/tools/ and are registered with their required
scopes in src/gg_mcp_server/register_tools.py. Cover new tools in tests/e2e/.
See PUBLISHING.md for the release process.
相關資源

Gitleaks
CLI检测 Git 仓库、目录文件与标准输入中硬编码的密码、API Key 和令牌,可配成 pre-commit 钩子或 GitHub Action 拦截密钥泄露。已宣布功能冻结、只发安全补丁,作者转向 Betterleaks。
gitleaks/gitleaks31.5k
TruffleHog
CLI在 Git、GitHub、S3、文件系统等来源中查找泄露的凭据,可识别 800 多种密钥类型,并登录对应服务验证密钥是否仍然有效,减少误报。
trufflesecurity/trufflehog29.8k
SonarQube
Plugin在 agent 编码循环中接入 SonarQube 代码质量与安全检查:密钥扫描钩子、问题列表与修复、质量门禁、覆盖率与依赖风险查询;开通 Vortex 分析后每次编辑自动检查。Sonar 官方维护,需 SonarQube 账号(含免费 Community Build)、sonar CLI 与 Docker。
SonarSource/sonarqube-agent-plugins118
Semgrep Guardian
Plugin把 Semgrep MCP 服务和钩子打包在一起:agent 每写一个文件,就用 Semgrep Code、Supply Chain、Secrets 扫描漏洞、恶意依赖和硬编码密钥,并提示 agent 重写,直到结果干净或由你忽略。Semgrep 官方维护,需要登录 Semgrep 账号。
semgrep/guardian24
Agentic Awesome Skills
Skill收录 2400 多个可安装的 SKILL.md 技能,覆盖开发、安全、云与运维、AI、营销等领域;附 AAS Core 本地 MCP 与安装器,帮 agent 检索、挑选技能并预览安装计划。原名 antigravity-awesome-skills。
sickn33/agentic-awesome-skills50.7k
Trivy
CLI一站式安全扫描器:检查容器镜像、文件系统、Git 仓库与 Kubernetes 集群中的已知漏洞、IaC 错误配置、泄露密钥与软件许可证,并能生成 SBOM。Aqua Security 开源维护。
aquasecurity/trivy40k