induwara.lk
induwara.lkDeveloper · MCP

MCP Config Generator

Build a valid Model Context Protocol config for Claude Desktop, Claude Code, Cursor, VS Code and Windsurf from one form. Correctly keyed, JSON-valid, with the exact file path for each client. Runs in your browser — keys never leave the page.

By Induwara AshinsanaUpdated Jun 28, 2026
Build your MCP configstdio & HTTP
Schema verified
Server 1
Transport

One argument per line. A single line is split on spaces.

Environment variables
Target clients

VS Code uses the servers key; every other client uses mcpServers.

Claude Desktopclaude_desktop_config.json
Valid · 1 server
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem"
      ]
    }
  }
}

Edit via Settings → Developer → Edit Config, then fully quit and reopen Claude Desktop. Linux path applies to community builds.

Cursormcp.json
Valid · 1 server
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem"
      ]
    }
  }
}

Use ~/.cursor/mcp.json for all projects, or .cursor/mcp.json inside a project for a project-only server.

Where to save it

ClientConfig file path (macOS)
Claude Desktop~/Library/Application Support/Claude/claude_desktop_config.json
Cursor~/.cursor/mcp.json (or {project}/.cursor/mcp.json)
Common mistakes that break every server
  • A trailing comma after the last entry — JSON has no comments and no trailing commas. One stray comma disables every server with no error message.
  • env values must be strings: write "3000", not 3000.
  • Use absolute paths for local servers — relative paths resolve against the client's working directory, not your project.
Generated entirely in your browser — nothing you type is uploaded.

How it works

An MCP config file is small but unforgiving. It is plain JSON — no comments, no trailing commas — and a single syntax slip makes the whole file fail to parse, so every server vanishes with no error message. On top of that, each client expects a slightly different file, in a different location, under a different top-level key. This tool builds the block for you so none of that is done by hand.

The generation is deterministic serialization, not calculation. For each server you add, the tool assembles one object:

  • Local (stdio): { command, args, env } — args is your argument list (one per line), env is a map of string values. args and env are omitted when empty.
  • Remote (HTTP): { url, headers } — the streamable-HTTP shape. headers is omitted when empty.

Every server you add is merged into one map, keyed by server name. That map is then wrapped under the client-specific top-level key. Claude Desktop, Claude Code, Cursor and Windsurf use mcpServers; VS Code is the one outlier and uses servers in .vscode/mcp.json. Pasting the wrong key into a client is the most common reason a config looks right but loads nothing.

Finally the object is rendered with JSON.stringify(config, null, 2) and checked twice: the validity badge re-parses the output with JSON.parse, and an independent schema check confirms the right top-level key, that each server has a command or a url, and that all env and header values are strings. The key, file-path and shape rules come straight from the official MCP spec and each client's own docs (cited below), last verified on 2026-06-28.

Worked examples

Local filesystem server — Claude Desktop

  • Name: filesystem
  • Transport: Local (stdio)
  • Command: npx
  • Args: -y / @modelcontextprotocol/server-filesystem / /Users/me/projects
  • Target: Claude Desktop
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/me/projects"
      ]
    }
  }
}

args optional members included; env omitted because it is empty. Save to ~/Library/Application Support/Claude/claude_desktop_config.json.

Same server — VS Code (note the key)

  • Identical inputs, Target: VS Code
{
  "servers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/me/projects"
      ]
    }
  }
}

Only the top-level key changes: servers instead of mcpServers. Save to .vscode/mcp.json in the workspace.

Server with an API key in env — Cursor

  • Name: github
  • Command: npx
  • Args: -y / @modelcontextprotocol/server-github
  • Env: GITHUB_PERSONAL_ACCESS_TOKEN = ghp_xxx
{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_xxx"
      }
    }
  }
}

The env value is a string, per the spec. Cursor uses mcpServers, in ~/.cursor/mcp.json.

Remote HTTP server

  • Name: linear
  • Transport: Remote (HTTP)
  • URL: https://mcp.linear.app/mcp
{
  "mcpServers": {
    "linear": {
      "url": "https://mcp.linear.app/mcp"
    }
  }
}

A streamable-HTTP server uses url and has no command field.

Frequently asked questions

Sources & references

The config keys, file paths and server-object shape on this page were last cross-checked against the official MCP spec and each client's docs on 2026-06-28. The format is a documented schema; this page is reviewed whenever a client changes its config layout.

Related tools

Rate this tool
Be the first to rate

Comments & feedback

Spotted a bug or want an improvement? Tell us — our team reviews every comment, and good ideas get built. Comments are public and anonymous.

Found a bug, edge case, or want another client supported?

Email me at [email protected] — most fixes ship within 24 hours.