GG

gitguardian/ggmcp

Developer tools
44 stars 15 forks Quality 86 Trend 20MIT

MCP server for remediating hardcoded secrets using GitGuardian’s API. It detects over 600 secret types and prevents credential leaks before code is made public.

Overview

Bring GitGuardian's secret detection and incident management into your AI agent. Scan code for credentials before they leak, triage existing incidents, generate honeytokens, and remediate findings — all from inside your IDE or chat client, backed by GitGuardian's 500+ detectors. MCP servers are an emerging technology. Agents act on your behalf and under your responsibility. Use trusted MCP servers and review agent actions when they interact with tools. To limit blast radius the server defaults to read-only-leaning permissions; what is actually exposed is determined by the OAuth scopes your access token holds. - — proactively scan files for leaked credentials. - — list, filter, assign, resolve, and tag incidents (both internal and Public Monitoring incidents). - — generate honeytokens and list existing ones. - — open pull requests that remediate secrets in repositories your workspace monitors.

README

GitGuardian MCP Server

Use GitGuardian’s secret detection and incident management from your AI agent.

  • Scan code for credentials with GitGuardian’s 500+ secret detectors.
  • Investigate internal and Public Monitoring incidents, including their history and locations.
  • Manage incidents: assign, resolve, ignore, tag, and comment.
  • Remediate findings, revoke secrets, and create honeytokens.

Your client discovers the available tools automatically. The token’s OAuth scopes determine which tools it can use.

[!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=true selects the self-hosted GitGuardian API path and supported scopes, overriding hostname detection. Set it explicitly for self-hosted GitGuardian instances.
  • MCP_BASE_URL is the public URL of your MCP server.
  • MCP_OAUTH_PROXY_ENABLED=true enables OAuth discovery and proxies authorization to your GitGuardian dashboard.
  • HTTP requires MULTI_TENANCY_ENABLED=true and MCP_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 with each request.

Configuration

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.

Migration notes

View the full README on GitHub

Install

uvx --from git+https://github.com/GitGuardian/ggmcp.git gg-mcp-server
New to MCP? Start with the mcpskill.org guide →

Configuration

{ "mcpServers": { "GitGuardian": { "type": "http", "url": "https://mcp.gitguardian.com/mcp" } } }