Building a Simple Tool: MCP JSON Converter for Claude Users

The Problem

If you use Claude’s MCP (Model Context Protocol) servers, you’ve probably noticed that Claude Desktop uses JSON configuration files, while Claude Code uses CLI commands to add servers. When you want to migrate your MCP setup from Desktop to Code, you have to manually convert each server configuration.

Going from a JSON config to the right claude mcp add commands gets tedious when you’re managing multiple MCP servers. I needed a quick way to generate the CLI commands without writing them by hand every time.

The Solution

I built MCP JSON Converter - a simple single-page application that handles the conversion automatically.

What it does:

  • Converts Claude Desktop MCP JSON configs to Claude Code CLI commands
  • Handles multiple servers at once
  • Validates JSON syntax and structure
  • Clean, minimal interface with instant conversion

Example conversion:

Claude Desktop JSON config:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
{
  "mcpServers": {
    "time": {
      "command": "uvx",
      "args": [
        "mcp-server-time",
        "--local-timezone=America/Sao_Paulo"
      ]
    }
  }
}

Generated Claude Code commands:

1
claude mcp add time -s user -- uvx mcp-server-time --local-timezone=America/Sao_Paulo

Why I Built It This Way

No backend needed - Everything runs client-side with vanilla JavaScript. Your JSON never leaves your browser.

GitHub Pages hosting - Free, reliable, and perfect for simple tools. The deployment is literally:

1
2
3
git add .
git commit -m "Update tool"
git push

Minimal dependencies - Just HTML, CSS, and JavaScript. No build process, no npm packages, no complexity.

Instant availability - No server downtime, no deployment pipelines. It just works.

The Technical Approach

The core conversion logic is straightforward:

1
2
3
4
5
6
7
// Convert JSON config to CLI commands
function convertToCliCommands(config) {
  return Object.entries(config.mcpServers).map(([name, server]) => {
    const args = server.args ? server.args.join(' ') : '';
    return `claude mcp add ${name} -s user -- ${server.command} ${args}`.trim();
  });
}

Simple, readable, and it works. Parse the JSON, extract each server’s command and arguments, format as CLI commands.

Lessons Learned

Start simple - I initially planned features like config validation, syntax highlighting, and reverse conversion. Instead, I shipped the core functionality first. Users just needed to generate CLI commands quickly, not a full MCP management suite.

Free hosting is powerful - GitHub Pages gave me global CDN distribution and 99.9% uptime for zero cost. Sometimes the simplest solution is the best solution.

Single-purpose tools work - Rather than building a complex MCP management suite, I focused on solving one specific problem well.

Try It Out

The tool is live at amlucas0xff.github.io/mcp-json-converter.

Paste your Claude Desktop MCP config JSON, click convert, copy the CLI commands. That’s it.

If you find bugs or want features, the code is on GitHub. It’s intentionally simple - anyone can understand and contribute to it.

uname -a: Human 5.4.0-anxiety #1 SMP Coffee-Deprived x86_64 GNU/Paranoid
Built with Hugo
Theme Stack designed by Jimmy