GitGuardian MCP Server
Official GitGuardian MCP server for detecting hardcoded secrets, managing security incidents, and generating honeytokens from inside AI coding agents.
The GitGuardian MCP Server is the official Model Context Protocol implementation from GitGuardian, exposing the platform's secrets detection, incident management, and honeytoken capabilities to AI coding agents like Cursor, Claude Desktop, Windsurf, and Zed. It lets agents scan code for leaked credentials, investigate active incidents, and embed decoy tokens without leaving the IDE.
The server bundles a developer-mcp-server package that wraps the GitGuardian REST API. It leverages 500+ secret detectors to find API keys, tokens, certificates, and other credentials in source code, then surfaces remediation steps and file/line locations for matched occurrences. Honeytoken tools let teams generate AWS decoy credentials with placement recommendations to catch unauthorized access.
By default the server runs locally over stdio and uses OAuth to authenticate to the GitGuardian dashboard, caching tokens in ~/.gitguardian/. It also supports Personal Access Tokens for CI/CD and an HTTP/SSE transport with per-request Authorization headers for shared deployments. Both GitGuardian SaaS (US and EU) and self-hosted instances are supported via the GITGUARDIAN_URL env var.
Tools
| Tool | Description |
|---|---|
scan |
Detect leaked credentials in code before commit using GitGuardian's 500+ secret detectors. |
list_incidents |
View security incidents filtered by severity, status, detector, and other criteria. |
get_incident |
Retrieve detailed incident information including occurrences. |
list_repo_occurrences |
Locate secrets with exact file paths and line numbers in a repository. |
remediate_incidents |
Get step-by-step remediation instructions for detected secrets. |
find_current_source |
Auto-detect the current repository's GitGuardian source ID. |
list_sources |
Browse repositories and integrations monitored by GitGuardian. |
list_detectors |
Explore the 500+ available secret detectors supported by GitGuardian. |
generate_honeytoken |
Create AWS honeytokens with placement recommendations to catch unauthorized access. |
list_honeytokens |
View existing honeytokens in the workspace. |
list_users / get_member |
Look up workspace members. |
get_authenticated_user_info |
Retrieve information about the currently authenticated user and token. |
revoke_token |
Revoke the current API token. |
Prerequisites
- Install
uv(Astral's Python package manager): https://docs.astral.sh/uv/getting-started/installation/ - A GitGuardian account (free tier works). OAuth flow opens automatically on first run.
Claude Desktop
Edit ~/Library/Application Support/Claude Desktop/mcp.json (macOS) or %APPDATA%\Claude Desktop\mcp.json (Windows). Use the absolute path to uvx:
{
"mcpServers": {
"GitGuardianDeveloper": {
"command": "/path/to/uvx",
"args": [
"--from",
"git+https://github.com/GitGuardian/ggmcp.git",
"developer-mcp-server"
]
}
}
}
Cursor
Edit ~/.cursor/mcp.json (or use the one-click install button in the README):
{
"mcpServers": {
"GitGuardianDeveloper": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/GitGuardian/ggmcp.git",
"developer-mcp-server"
]
}
}
}
Personal Access Token (CI/CD)
Disable interactive OAuth and pass a PAT for non-interactive environments:
{
"mcpServers": {
"GitGuardianDeveloper": {
"command": "uvx",
"args": ["--from", "git+https://github.com/GitGuardian/ggmcp.git", "developer-mcp-server"],
"env": {
"ENABLE_LOCAL_OAUTH": "false",
"GITGUARDIAN_PERSONAL_ACCESS_TOKEN": "your_pat_here"
}
}
}
}
Useful env vars
GITGUARDIAN_URL: defaults tohttps://dashboard.gitguardian.com. Usehttps://dashboard.eu1.gitguardian.comfor EU or your self-hosted URL.GITGUARDIAN_SCOPES: override OAuth scopes (e.g. addhoneytokens:read,honeytokens:write).GITGUARDIAN_TOKEN_LIFETIME: default 30 days.MCP_PORT/MCP_HOST: enable HTTP/SSE transport for shared deployments.
- Block leaked secrets in AI-generated code by running
scanbefore the agent commits or opens a PR. - Triage open incidents from the IDE: list filtered by severity, fetch full incident details, and follow
remediate_incidentsinstructions inline. - Pinpoint exposed credentials with
list_repo_occurrencesto get exact file paths and line numbers for rotation. - Plant AWS honeytokens in legacy code or sample configs with
generate_honeytokento detect unauthorized access. - Audit your GitGuardian workspace from the agent: list monitored sources, available detectors, and workspace members.
- "Scan this repository for leaked secrets and show me the file paths and line numbers."
- "List all open incidents with critical severity assigned to my workspace."
- "Walk me through remediating incident 12345 and rotate the affected credential."
- "Generate an AWS honeytoken called
legacy-deploy-keyand suggest where to embed it in this codebase." - "Show me every active honeytoken in the workspace and who created them."
- Official, vendor-maintained server from GitGuardian, distributed straight from the
GitGuardian/ggmcprepo. - Read-only by default with OAuth, plus PAT support for CI and HTTP transport for shared deployments.
- Covers the full developer workflow: detection, incident triage with file/line context, remediation guidance, and honeytokens.
- Works against GitGuardian SaaS (US/EU) and self-hosted instances via a single env var.
- Requires
uv/uvxand a GitGuardian account; some features (honeytokens, full incident management) need a paid plan. - SecOps profile (incident assignment, status changes, custom tags, automated fix PRs) is still on the roadmap, so this server is focused on developer use.
- Honeytoken generation is limited to AWS placement recommendations today.
- Semgrep MCP Server: SAST scanning for code vulnerabilities, broader than secrets.
- Snyk MCP Server: vulnerability scanning across SCA, SAST, and IaC.
- TruffleHog: open-source secret scanner; no official MCP server but commonly wrapped by community implementations.