MCP Config Generator
Generate valid MCP server configuration for Claude Desktop, Cursor, VS Code, Windsurf, and Zed.
- Free
- No account
- Runs in your browser
- Nothing uploaded
Fill in the server details and click Generate Config — the JSON is generated in your browser and never sent anywhere.
Runs entirely in your browser — your input is never uploaded, logged, or stored.Privacy policy
What is MCP Config Generator?
The Model Context Protocol (MCP) lets AI assistants like Claude, Cursor, and Copilot call external tools — database queries, API requests, file operations — through a standardized interface. Each MCP server is defined by a JSON configuration that tells the client how to launch and connect to it.
Writing this config by hand is error-prone: different clients use different file formats and locations, the JSON structure has strict requirements, and a typo in the command path silently breaks everything. This tool generates valid configuration from a simple form and shows you exactly where to put it.
Supported clients: • Claude Desktop (macOS/Windows) — ~/Library/Application Support/Claude/claude_desktop_config.json • Cursor — ~/.cursor/mcp.json • VS Code (Copilot) — .vscode/mcp.json in workspace root • Windsurf — ~/.windsurf/mcp.json • Zed — ~/.config/zed/settings.json (mcpServers section)
The generated config follows the MCP specification: each server has a command (the executable), optional arguments, and optional environment variables. The tool validates that the command is non-empty and that environment variable names don't contain spaces or special characters.
MCP configuration structure (spec v1):
{ "mcpServers": { "<server-name>": { "command": "<executable>", "args": ["<argument>", ...], "env": { "<KEY>": "<value>" } } } }
Fields: • command (required): The executable to run. Must be in PATH or an absolute path. • args (optional): Array of command-line arguments. Each is a string. • env (optional): Environment variables passed to the process. Keys must be valid identifiers (A-Z, 0-9, _).
Validation rules applied: • Server name: non-empty, lowercase alphanumeric with hyphens. • Command: non-empty string. • Environment variable names: must match /^[A-Z_][A-Z0-9_]*$/i. • No nested mcpServers objects — only one level of server definitions.
Worked examples
- Server "my-db" with command "npx" and args ["-y", "@modelcontextprotocol/server-postgres", "postgresql://localhost/mydb"]
- Server "filesystem" with command "npx" and args ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/dir"]
- Server "github" with command "npx" and args ["-y", "@modelcontextprotocol/server-github"] with env GITHUB_TOKEN
How to use MCP Config Generator
- Enter a server name (lowercase, hyphens allowed).
- Enter the command to run (e.g., npx, node, python).
- Add arguments one per line (e.g., -y, @modelcontextprotocol/server-postgres).
- Optionally add environment variables (KEY=VALUE format).
- Select your client (Claude Desktop, Cursor, VS Code, etc.).
- Copy the generated config and paste it into the client's config file.
Common errors
- Config not working — check that the command is installed and in your PATH. Run the command manually in a terminal first to verify.
- Server name has spaces — MCP server names must be lowercase alphanumeric with hyphens (e.g., "my-server", not "My Server").
- Environment variable not set — make sure you typed the key as KEY=VALUE (no spaces around =). The key must be a valid identifier.
- Wrong config file location — each client has its own file path. The tool shows the correct path for your selected client.
FAQ
What is MCP?
The Model Context Protocol (MCP) is an open standard that lets AI assistants call external tools through a standardized interface. Instead of building custom integrations for each AI platform, tool developers write one MCP server that works with Claude, Cursor, VS Code Copilot, and other clients.
Where do I put the config?
Each client has its own config file location. Claude Desktop uses ~/Library/Application Support/Claude/claude_desktop_config.json on macOS. Cursor uses ~/.cursor/mcp.json. VS Code uses .vscode/mcp.json in your workspace. The tool shows the exact path for your selected client.
Can I run multiple MCP servers?
Yes. Add each server as a separate entry under the mcpServers object. Each server runs as an independent process and is available to the AI assistant simultaneously.
What if my server needs a virtual environment?
Use the full path to the Python binary in your virtual environment as the command, e.g., /path/to/venv/bin/python. Or use npx which automatically finds the right package.
Is this config compatible with the latest MCP spec?
Yes. The generated config follows the MCP specification v1 (2025-03-26). The structure is mcpServers → server-name → {command, args, env}.
Related tools
Prefer AllUtil on Google
One click adds AllUtil to your Google preferences. You'll see our tools highlighted with a Preferred badge in Search and AI answers.