Promptyard
MCP

MCP Server Config Generator

Build the JSON entry for Claude Desktop or project-local .mcp.json — server name, command, args, env.

Target file
Environment variables
Paste into ~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/me/Documents"
      ],
      "env": {
        "NODE_ENV": "production"
      }
    }
  }
}

After saving the config, fully quit and restart Claude Desktop (or reload the project) to pick up the new server. If the server fails to start, run the command directly in a terminal first to see error output.

What MCP is, briefly

Model Context Protocol is Anthropic's open standard for letting LLM clients (Claude Desktop, Claude Code, Cursor, etc.) connect to external tools and data sources. An MCP server is a separate process that the client launches; it exposes tools over a JSON-RPC channel. The config block tells the client what to launch.

Servers are typically tiny CLIs invoked via npx (Node-based) or uvx (Python). The args spell out connection details (paths, URLs); env vars carry secrets (API keys, tokens). Don\'t check secrets into version control — keep them in env.

FAQ

Where exactly does Claude Desktop's config live?
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json. Windows: %APPDATA%\Claude\claude_desktop_config.json. Linux: ~/.config/Claude/claude_desktop_config.json.
Difference between global and project-local config?
Global config (claude_desktop_config.json) applies to every conversation. Project-local .mcp.json only applies when Claude Code is opened in that project. Use project-local for repo-specific servers (e.g., a Postgres MCP pointing at the project DB).
How do I find a server's exact command?
Most published MCP servers ship as npm or uv packages. Their READMEs show the exact command + args shape. Search "MCP server" + your tool of interest, or browse the official servers repo.
Why aren't my env vars showing up?
Empty key strings are skipped silently. Make sure each row has both KEY and value. Some servers also need flags via args, not env (check the server's docs).

Common pitfalls

  • Restarting fails to pick up new server. Quit Claude Desktop fully (right-click → Quit, not just close window).
  • Using relative paths in args. Use absolute paths or env-var references.
  • Forgetting trailing punctuation in JSON when editing manually. Let this tool produce it.
  • Putting secrets in args (visible in process list) instead of env.

Related tools