Config Validator
Validate JSON, YAML, TOML, INI, ENV, and XML configuration files. Catch syntax errors, duplicate keys, inconsistent indentation, and common pitfalls instantly.
Get the CLI Tool
Run the config validator locally as an MCP server, or try it online below.
npx @clinetools/config-validator
- 6 formats — JSON, YAML, TOML, INI, ENV, XML
- Auto-detects format from extension or content heuristics
- Detailed issue reports with line numbers and fix suggestions
- Catches duplicate keys, trailing commas, tab indentation
- Zero config — just run with npx
How to Use It
Three ways to validate your config files — pick the one that fits your workflow.
Try Online
Use the interactive demo below to paste config content and validate it — no install needed.
Use via CLI
Run as a local MCP server and connect any MCP-compatible client.
Add to Cline / Claude Code
Add the tool to your MCP settings for instant access from your AI assistant.
MCP Client Configuration (Cline)
{
"mcpServers": {
"config-validator": {
"command": "npx",
"args": ["@clinetools/config-validator"]
}
}
}
Claude Code Configuration
# In your project's .mcp.json:
{
"mcpServers": {
"config-validator": {
"command": "npx",
"args": ["@clinetools/config-validator"]
}
}
}
Example: Validate a Config File
// Call the tool with a file path:
validate_config({ path: "tsconfig.json" })
// Output:
{
"file": "tsconfig.json",
"format": "json",
"valid": true,
"issues": [],
"parsed": true,
"suggestions": [
"File could be reformatted with consistent 2-space indentation"
]
}
Example: Catch YAML Issues
// Prompt to your AI agent:
"Validate my docker-compose.yml and fix any issues"
// The agent calls:
validate_config({ path: "docker-compose.yml" })
// Output:
{
"file": "docker-compose.yml",
"format": "yaml",
"valid": false,
"issues": [
{
"line": 5,
"severity": "error",
"message": "YAML must not use tabs for indentation",
"suggestion": "Replace tabs with spaces"
}
]
}
Try It Online
Paste a config file below and validate it instantly. Or try one of our demo scenarios.
Paste Config to Validate
Supports JSON, YAML, TOML, INI, ENV, and XML
Paste a config file and click Validate Config to see results.
Issues Found
Why Config Validation Matters
Misconfigurations are one of the top causes of outages and security incidents. Catch them before deployment.
Silent Failures
A trailing comma in JSON or a tab in YAML won't always crash your app — sometimes the config is silently ignored, and your service runs with wrong defaults. Validation catches these before production.
Duplicate Key Traps
JSON, YAML, INI, and TOML all silently allow duplicate keys — the last one wins. This can override critical settings without warning. A validator flags duplicates before they cause surprises.
Security Risks
Placeholder values like "changeme" or "TODO" in .env files are easy to miss in reviews. Unquoted values with spaces can be parsed unexpectedly. Validation catches these security-relevant issues.
Format Gotchas
YAML interprets "yes", "no", "on", "off" as booleans. XML requires matched tags. TOML needs explicit values. Each format has unique pitfalls that only format-aware validation can catch.
Shift Left
Finding a config bug in development takes minutes. Finding it after a 3am production outage takes hours. Validate configs early in your pipeline with MCP tools that your AI agent can run automatically.
Need Config Auditing at Scale?
Our Pro plan includes automated config validation across your entire infrastructure with drift detection.
View Plans