Config Drift Guard MCP
A read-only MCP server for comparing environment configuration files, detecting drifts like added, removed, or secret-changed entries, while masking secrets and restricting file access to allowed directories.
README
Config Drift Guard MCP
A read-only Model Context Protocol server for comparing environment configuration without exposing detected secrets.
Capabilities
- Parse
.env, YAML, JSON, and Java Properties files. - Normalize nested configuration into stable key paths.
- Detect added, removed, type-changed, value-changed, and secret-changed entries.
- Mask likely credentials, private keys, bearer tokens, and credential-bearing URLs.
- Restrict file access to explicitly allowed directories.
- Run entirely locally without network requests.
Tools
inspect_config
Parse one file and return normalized entries, value types, warnings, and protected values.
compare_configs
Compare a baseline file with a target file and return drift items with risk levels.
scan_secrets
Find likely plaintext secrets while returning only masks and SHA-256 fingerprints.
Install
npm install
npm run build
Node.js 20 or later is required.
Configure
Set CONFIG_DRIFT_ALLOWED_ROOTS to one or more directories. Use the operating system path delimiter (; on Windows, : on Linux and macOS).
# Windows PowerShell
$env:CONFIG_DRIFT_ALLOWED_ROOTS='D:\configs\dev;D:\configs\prod'
node dist/index.js
# Linux or macOS
CONFIG_DRIFT_ALLOWED_ROOTS=/srv/config/dev:/srv/config/prod node dist/index.js
If the variable is omitted, only the current working directory is allowed.
MCP Client Configuration
{
"mcpServers": {
"config-drift-guard": {
"command": "node",
"args": ["/absolute/path/config-drift-guard-mcp/dist/index.js"],
"env": {
"CONFIG_DRIFT_ALLOWED_ROOTS": "/absolute/path/configs"
}
}
}
}
Example
The repository includes examples/dev.yaml and examples/prod.yaml.
compare_configs({
"baselineFile": "/absolute/path/examples/dev.yaml",
"targetFile": "/absolute/path/examples/prod.yaml"
})
The result distinguishes missing keys, type drift, ordinary value drift, and secret fingerprint changes. Detected secret plaintext is never returned.
Paired Skill
skills/config-drift-remediation converts MCP evidence into:
- Expected-environment differences.
- Prioritized defects.
- Secret-rotation recommendations.
- Key-level patch guidance.
- A post-change verification checklist.
Security Model
- Read-only tools.
- No network access.
- No expression or script execution.
- Maximum input file size of 5 MiB.
- Allowed-directory enforcement.
- Secret masks and one-way fingerprints only.
- No configuration plaintext logging.
Development
npm test
npm run build
npm pack --dry-run
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.