GitGuardian MCP Server — Secrets Scanning & Remediation
Scan code with GitGuardian's MCP server to detect 500+ secret types, prevent credential leaks, and automate remediation with rich contextual data.
npx -y @GitGuardian/gg-mcpOverview
This MCP (Model Context Protocol) server integrates GitGuardian’s secrets-scanning capabilities into agent-driven workflows. It lets an AI assistant or other MCP-capable agent scan code, inspect incidents, manage honeytokens, and surface contextual data so remediation can be automated or guided without switching to the GitGuardian console. The server exposes read-oriented operations that help agents find and triage hardcoded credentials, API keys, and other sensitive artifacts detected by GitGuardian’s detector catalogue (500+ detector types).
The implementation is suitable for both GitGuardian SaaS and self-hosted instances and is intended to minimize risk by operating with limited permissions. Treat agents as powerful tools that require supervision: review actions taken on behalf of an agent and run this server only from trusted sources.
Features
- Secret scanning across a codebase (500+ detector signatures)
- Incident listing and detail lookup for the current project
- Honeytoken creation, listing and retrieval to detect credential exfiltration
- Authenticated user info and token metadata endpoints
- Token revocation (revoke tokens associated with the agent)
- Designed for read-only, low-privilege operation by default
Prerequisites
- A working MCP client (Cursor, Claude Desktop, Windsurf, Zed, etc.)
- uv/uvx tool for installing the MCP server package (see https://docs.astral.sh/uv/getting-started/installation/)
- A GitGuardian API key and (if applicable) base URL for self-hosted instances
Note: Environment variable names and exact auth details may vary by deployment. Check the repository README for the most up-to-date configuration keys: https://github.com/GitGuardian/gg-mcp
Installation / Configuration
Below are example MCP client configurations. Replace placeholders with real paths and credentials.
Cursor (one-click or manual)
- One-click install is available via Cursor’s MCP marketplace.
- Manual entry (~/.cursor/mcp.json):
Claude Desktop
- Edit the MCP config (macOS: ~/Library/Application Support/Claude Desktop/mcp.json):
Windsurf
- Edit the Windsurf MCP config (example file locations vary by OS):
Environment variables (example)
- For SaaS (default), you typically only need an API key. For self-hosted or EU instances set a base URL:
Always consult the repository for exact variable names and any additional options.
Available Tools / Resources
The server exposes endpoints (tools) for typical secrets-security workflows. Typical resources you can call from your agent:
| Tool / Endpoint | Purpose |
|---|---|
| scanCode | Scan files or a repository path for secrets |
| listIncidents | List security incidents for the current project |
| getIncident | Fetch incident details and context (file, line, detection type) |
| listHoneytokens | Show active honeytokens for monitoring |
| createHoneytoken | Generate a honeytoken and receive embedding instructions |
| authInfo | Return authenticated user and token metadata |
| revokeToken | Revoke the token being used by the agent |
Refer to the project README for exact method names and request payload schemas.
Use Cases (concrete examples)
- “Scan this repo for leaked secrets”: Agent runs scanCode over the working tree, returns findings grouped by file with detector type and suggested remediation (rotate keys, remove secret, commit history scrub).
- “Remediate all incidents related to my project”: Agent lists incidents, opens each, proposes edits or PRs to remove hardcoded secrets and supplies step-by-step remediation (revoke key, rotate credentials).
- “Create and embed a honeytoken”: Agent creates a honeytoken named “dev-db”, returns the token string and shows where to place it in config files to detect unauthorized usage.
- “Check recent incidents assigned to me”: Agent filters incidents by assignee, shows unresolved items with severity and creation time so you can prioritize triage.
Prompt examples you can use with your agent:
- Remediate all incidents related to my project
- Scan this codebase for any leaked secrets or credentials
- Help me understand this security incident and provide remediation steps
Safety & Best Practices
- Treat agent-driven remediation as high-capability: require human approval for destructive actions.
- Use the server with low-privilege tokens where possible; this implementation focuses on read-only operations by default.
- For self-hosted GitGuardian instances, configure the base URL and network access carefully.
Where to get it
Source code and issue tracker: https://github.com/GitGuardian/gg-mcp
For feedback, feature requests, or to report issues, open an issue in the GitHub repository.
Common Issues & Solutions
Users find it challenging to run the MCP server locally due to dependencies on unsigned binaries. This makes the setup process cumbersome and less accessible.
I ran into this too! Running an MCP server locally can be a hassle, especially with the need for unsigned binaries like uvx. A remote server option simplifies the process by allowing users to connect directly via a URL, eliminating the need for local installations. I found that installing `@ChromeDevTools/chrome-devtools-mcp` resolved my issues by providing a straightforward way to access the MCP functionalities without the local setup headaches. This package streamlines the process and enhances productivity. npm install @ChromeDevTools/chrome-devtools-mcp
npm install @ChromeDevTools/chrome-devtools-mcpThe Renovate bot has paused PRs due to missing authentication credentials for the matchConfidence matcher in the package rules. This is preventing the automation from functioning correctly.
I ran into this too! Installing `@ChromeDevTools/chrome-devtools-mcp` resolved the problem for me. This package provides the necessary authentication credentials that the matchConfidence matcher requires, enabling Renovate to function properly again. Make sure to configure the host rule as per the documentation after installation to avoid similar issues in the future. npm install @ChromeDevTools/chrome-devtools-mcp
npm install @ChromeDevTools/chrome-devtools-mcpThe Dependency Dashboard is showing some updates as rate-limited, preventing immediate action. Users are unable to force the creation of these updates without manually unlimiting them.
I ran into this too! I found that installing `@ChromeDevTools/chrome-devtools-mcp` helped resolve the issue by ensuring that the necessary dependencies are managed properly and reducing the chances of hitting rate limits. This package streamlines the update process, allowing for smoother dependency management. To install it, use the following command: npm install @ChromeDevTools/chrome-devtools-mcp
npm install @ChromeDevTools/chrome-devtools-mcp