# claude_desktop_config.json Generator for MCP Servers

> Source: https://netray.co/tools/claude-desktop-mcp-config-json-generator
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: Free Tools

## Short answer

Build the mcpServers entry for claude_desktop_config.json with the right command, arguments and environment variables.

## Category

developer

## Audience

- ERP developer
- IT administrator
- AI engineer

## Tool

**Kind:** template

**Output:** code

**Language:** json

**Fields:**

#### Server name (key)

**Key:** server_name

**Type:** text

**Default:** erp-readonly

#### Command

**Key:** command

**Type:** select

**Options:**

- npx
- node
- python
- uvx
- docker

**Default:** node

#### Script or package

**Key:** script

**Type:** text

**Default:** C:\\mcp\\erp-server\\dist\\index.js

**Help:** On Windows, double every backslash in JSON.

#### Extra argument

**Key:** flag

**Type:** text

**Default:** --read-only

#### ERP base URL

**Key:** erp_url

**Type:** text

**Default:** https://erp.example.com/api

#### Secret environment variable name

**Key:** env_name

**Type:** text

**Default:** ERP_API_TOKEN

#### Secret placeholder

**Key:** env_value

**Type:** text

**Default:** REPLACE_WITH_SERVICE_TOKEN

**Blocks:**

#### claude_desktop_config.json

**Body:** {
  "mcpServers": {
    "{{server_name}}": {
      "command": "{{command}}",
      "args": [
        "{{script}}",
        "{{flag}}"
      ],
      "env": {
        "ERP_BASE_URL": "{{erp_url}}",
        "{{env_name}}": "{{env_value}}"
      }
    }
  }
}

#### Where the file lives

**Body:** Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Fully quit and reopen Claude Desktop after editing. Open the developer settings to read the server logs if the server does not appear.

**Notes:** If the file already has an mcpServers object, add your entry beside the existing ones instead of pasting a second mcpServers key. Never commit real tokens. Use a least-privilege service account for the env value. Verify the file path and options against the current Claude Desktop documentation for your version.

## Content

**Intro:** Claude Desktop reads a JSON file that lists the local MCP servers to launch. A missing comma or a single backslash on Windows is enough to stop a server from loading. This generator produces a clean mcpServers entry you can paste in.

**Sections:**

#### How to use it

**Body:** Enter a short server name, choose how the server starts (node, python, npx, uvx or docker), give the script or package, and add any arguments. Put the ERP base URL and a service token in the env section, not on the command line, so they are not visible in process listings. Copy the output into your config file, keeping valid JSON, then restart the app fully, not just close the window.

**Bullets:**

- Use a dedicated read-only ERP service account
- Double backslashes in Windows paths
- Keep one entry per server and unique names

#### What each key does

**Body:** The mcpServers object maps a name to a launch definition. Command is the executable, args is the list of arguments passed to it, and env adds environment variables to the child process. Desktop starts the process and speaks MCP over standard input and output. That is why the server must write protocol messages only to stdout and logs to stderr, otherwise the handshake breaks.

#### Reading the result and debugging

**Body:** After a restart, your tools should appear in the tools menu. If not, check three things in order: the JSON parses (paste it into any validator), the command resolves on the PATH Desktop sees (node or npx installed for all users), and the server starts by itself in a terminal without errors. Log files in the Claude logs folder show the launch error and the stderr output from your server.

#### Common mistakes

**Body:** Frequent problems include smart quotes pasted from documents, trailing commas, relative script paths, relying on a shell profile for PATH, and storing production admin credentials in the file. Remember the file is plain text on the user's machine. For shared or regulated environments, prefer a remote server with proper authentication over distributing secrets to laptops.

**Cta:** If you need MCP access to your ERP rolled out safely across a team, Netray can design the server, the roles and the deployment with you.

**Faq:**

#### Where is claude_desktop_config.json on Windows?

**Answer:** It is normally under %APPDATA%\Claude\ in a file named claude_desktop_config.json. You can also open it from the developer section of the Claude Desktop settings, which creates it if it does not exist yet.

#### Why does my server not show up?

**Answer:** Most often the JSON is invalid, the command is not on the PATH, or the server crashes at start. Run the same command in a terminal first, then check the Claude Desktop log files for stderr output.

#### Can I put secrets in the env block?

**Answer:** You can, and it is common for local use, but the file is plain text. Use a least-privilege service account, restrict file permissions, and avoid reusing a personal admin token.

#### Does this work for remote MCP servers?

**Answer:** This file launches local processes. Remote servers are generally added through the connectors or integrations settings rather than a command entry, so check the current product documentation for your plan.

## Search terms

claude_desktop_config.json example, claude desktop mcp config, mcpServers json, claude desktop add mcp server, claude_desktop_config.json location windows, mcp server npx config, mcp env variables config, claude desktop config generator

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
