• CLEAN
  • FIXED
  • RAW
  • MANUAL

How to clean JSON5 config files with your AI

Connect this MCP once to give your agent the ability to fix broken or messy configuration files. It handles the heavy lifting of syntax correction and comment removal.

Ask AI about this page

Short answer

How can I clean JSON5 config files with my AI?

Your agent uses the parse_json5 tool to strip comments and fix syntax errors like trailing commas. You get a clean, valid JSON5 object. Here is the breakdown of what happens.

The results of a cleanup.

Where your data lands.

Once the AI processes your file, you'll get one of these outcomes.

CLEAN

Valid JSON5 output

The AI removes all comments and fixes syntax errors. You get a clean file that won't crash your application.

FIXED

Syntax error correction

Trailing commas and other small mistakes are wiped out. The AI ensures the structure is strictly compliant.

RAW

Original file preserved

The AI doesn't overwrite your source files unless you tell it to. Your original messy config stays untouched.

MANUAL

Human review needed

If the file is too corrupted to parse, the AI flags the specific error. You'll need to step in and fix the logic yourself.

The workflow

What your AI does when the file arrives.

The AI acts as a specialized editor for your configuration data.

  1. Read the file

    The AI pulls the raw JSON5 content from your local path or repository.

    parse_json5
  2. Strip comments

    The AI identifies and removes all human-readable comments to prepare the data for machine use.

    parse_json5
  3. Fix syntax

    The agent hunts for trailing commas and other common JSON5 formatting issues.

    parse_json5
  4. Validate structure

    The AI confirms the resulting object is a valid, parsable JSON5 structure.

    parse_json5

Try it

Copy these to start.

Use these prompts to trigger the cleanup process.

Starting points

Replace the file paths and repository names with your actual local paths.

JSON5 Connector

You're all set. Choose your MCP client and follow the setup instructions.

Connector linkhttps://edge.vinkius.com/vk_preview_ipuPbcyZFLzpHTIX4HAe9NmAw6sUUhJhrkFNUBqr/mcp

Claude Desktop

Follow the steps below to connect in seconds.

  1. 1In Claude Desktop, open Settings → Connectors.
  2. 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
  3. 3Click Add and start a new chat — JSON5 capabilities are ready to use.
Configuration · claude_desktop_config.jsonCopy
{
  "mcpServers": {
    "json5-resilient-parser-mcp": {
      "url": "https://edge.vinkius.com/vk_preview_ipuPbcyZFLzpHTIX4HAe9NmAw6sUUhJhrkFNUBqr/mcp"
    }
  }
}
Copy into chat04
  • Clean the trailing commas in ./config/settings.json5

  • Strip all comments from the config file in my current repo

  • Fix the syntax errors in the production.json5 file

  • Parse this JSON5 file and give me a version without any comments

  • Claude
  • ChatGPT
  • Cursor
  • VS Code
  • Windsurf
  • Claude Code
  • JetBrains
  • Cline

Start here

Connect JSON5 Resilient Parser once, then ask.

You only need to link the MCP to your client once. After that, your agent can handle any JSON5 file you point it toward.

Connect JSON5 Resilient Parser to your AI

FAQ

How this task behaves.

  • 01

    Will the AI delete my original config file?

    No. The AI only reads the file and provides the cleaned version in the chat or as a new output.

  • 02

    Can the AI fix logic errors in my configuration?

    No. The tool only fixes syntax errors like trailing commas and removes comments. It won't change your actual settings or values.

  • 03

    Does it work with standard JSON?

    Yes, since JSON5 is a superset of JSON, the tool handles standard JSON files without issue.

  • 04

    What happens if the JSON5 is too broken to parse?

    The AI will report the parsing error to you instead of attempting to guess the correct structure.

  • 05

    Can I use this with Cursor or VS Code?

    Yes, any MCP-compatible client like Cursor or VS Code can use this once connected via Vinkius.

  • More questions about JSON5 Resilient Parser? The Connector page answers them. See everything the JSON5 Resilient Parser Connector can do

Connect JSON5 to Claude, Cursor, ChatGPT & more