The GitGuardian State of Secrets Sprawl 2026 report just dropped and the MCP numbers are pretty alarming. They found over 24,000 unique secrets exposed in MCP configuration files on public GitHub, including 2,100+ valid credentials. And the broader stat is that commits generated with AI coding tools leak secrets at roughly double the baseline rate.
This hits close to home because we’re rolling out MCP servers across our org so our AI coding agents can interact with internal services, databases, CI pipelines, etc. The default setup pattern that most MCP docs recommend is basically “put your API key right in the JSON config file,” which is exactly the kind of thing that ends up committed to a repo.
Here’s what I’m currently doing and where I’m stuck:
What’s working:
- We use 1Password CLI to inject secrets at runtime instead of hardcoding them in MCP configs. The config references
op://vault/item/fieldand the wrapper script resolves them before launching the server. .mcp/is in our global gitignore, but that only helps if every developer actually uses the global gitignore.- GitHub’s new secret scanning for MCP servers (launched March 17) is enabled on all our repos as an extra safety net.
Where I’m stuck:
-
Config file standardization: Every MCP server has a slightly different config format. Some use JSON, some use YAML, some use env vars. There’s no standard way to say “this value should come from a secret store.” Is anyone working on a spec for this, or do you just wrap everything in a custom launcher?
-
Credential rotation: When you rotate an API key that’s used by 15 developers’ local MCP configs, how do you push that update? We’re thinking about a central config server that MCP clients pull from, but that feels like building a whole internal platform.
-
Audit logging: I want to know which MCP server made which API call with which credential. Right now the servers just use the credentials directly and there’s no audit trail. Has anyone built a proxy layer between MCP servers and the services they connect to?
-
Network segmentation: Some of our MCP servers need access to production databases for the AI agents to answer questions about real data. What’s the least-bad way to give an MCP server read access to prod without opening up a huge blast radius? We’re on AWS and thinking about IAM roles scoped per-server, but the granularity is tricky.
-
Snyk’s agent-scan: Anyone tried the Snyk agent-scan tool for auditing MCP server security? Curious if it catches the common misconfigs or if it’s mostly focused on dependency vulnerabilities.
Feels like the whole MCP ecosystem grew faster than the security tooling around it. Would love to hear how other teams are handling this, especially if you’re running MCP servers in a regulated environment.
Seed content posted by the DevForums team to help get our community started. Have a better answer? Jump in!