MCP Server Config Generator

Build a working mcpServers JSON block for Claude Desktop, Cursor, Cline, or Windsurf. Pick from filesystem, GitHub, Postgres, Brave Search, and Fetch presets, or add a custom server.

About This Tool

Wiring an MCP (Model Context Protocol) server into your AI client sounds simple — drop a JSON object under the right key and restart the app — until you're hand-typing your fourth @modelcontextprotocol/server-... package name with the wrong escape sequence in a Windows path. This generator removes the typos. Pick a target client, click a preset, fill in a path or token, and the JSON regenerates instantly in the right panel, ready to copy or download as the file your client expects.

Five presets cover the most-used servers from the official @modelcontextprotocol registry: filesystem for granting the model read access to a folder, github for repo and issue access via a Personal Access Token, postgres for read-only SQL queries, brave-search for web lookups, and fetch for arbitrary HTTP requests. Need something the registry doesn't ship? The "Custom server" button gives you raw control over command, args, and env — the same shape the spec uses for any stdio-based server you write yourself.

Configs differ subtly across clients. Claude Desktop expects the file at ~/Library/Application Support/Claude/claude_desktop_config.json on macOS and %APPDATA%\Claude\claude_desktop_config.json on Windows; Cursor reads either a project-local .cursor/mcp.json or a global ~/.cursor/mcp.json; Cline looks at .cline/mcp.json or its VS Code settings entry; Windsurf uses ~/.codeium/windsurf/mcp_config.json. The generator surfaces the right path for whichever client you select, so you don't have to grep documentation every time.

If you also work with raw API tokens, our JWT decoder can inspect a GitHub fine-grained token to confirm its scopes before you paste it here, the JSON formatter will validate the output if you hand-edit it later, and the secret redactor strips sensitive values before you share a config snippet in a bug report. Every byte stays in your browser — environment variables, connection strings, and Personal Access Tokens are written to JSON via JSON.stringify and never leave the page.

How to Use

  1. Pick your target client at the top — Claude Desktop, Cursor, Cline, or Windsurf — to set the right top-level JSON key and surface the correct save path.
  2. Click a preset (filesystem, github, postgres, brave-search, or fetch) to add a pre-filled server card. Click multiple presets to combine them.
  3. Edit the server name (the key under mcpServers), command, args (one per line), and env (KEY=VALUE per line) directly in each card.
  4. For filesystem, replace the placeholder path with the directory you want the model to read; for github / brave-search, paste your token into the env line; for postgres, replace the connection string in the last args line.
  5. Use Custom server when you need a server outside the five presets — the input fields work the same way.
  6. Watch the right panel for the live JSON; warnings appear under the preview if a server is missing a name or has duplicate keys.
  7. Press Copy JSON (or Ctrl+Shift+C) and paste into your client's config file, or hit Download to save it as claude_desktop_config.json / mcp.json directly.

Popular MCP Config Examples

View all 15 MCP config examples →

FAQ

What is MCP (Model Context Protocol)?

MCP is an open spec from Anthropic for connecting AI assistants to external data sources and tools. An MCP server is a small process — usually launched via stdio with a single command — that exposes capabilities (read this file, query this database, fetch this URL) over a JSON-RPC channel. Clients like Claude Desktop, Cursor, and Cline read a JSON config file at startup to know which servers to spawn and which arguments and environment variables to pass them.

Which clients support MCP?

Claude Desktop (macOS, Windows, and Linux) was the first widely-adopted client and uses the mcpServers key in claude_desktop_config.json. Cursor reads .cursor/mcp.json (project-level) or ~/.cursor/mcp.json (global). Cline (a VS Code extension) reads .cline/mcp.json or its mcpServers settings entry. Windsurf reads ~/.codeium/windsurf/mcp_config.json. The shape of the JSON object is nearly identical across all four, which is why this generator can target any of them by just switching the dropdown.

Where do I save the config file?

Claude Desktop: ~/Library/Application Support/Claude/claude_desktop_config.json on macOS, %APPDATA%\Claude\claude_desktop_config.json on Windows, ~/.config/Claude/claude_desktop_config.json on Linux. Cursor: .cursor/mcp.json in the project root or ~/.cursor/mcp.json for global. Cline: .cline/mcp.json. Windsurf: ~/.codeium/windsurf/mcp_config.json. Restart the client after writing the file — none of them hot-reload MCP server lists.

How do I add a custom MCP server?

Click the dashed Custom server button to add a blank card. Set command to the binary that launches your server (npx, uvx, node, python, or an absolute path), put each CLI argument on its own line in args, and add KEY=VALUE pairs in env for any tokens or runtime config the server needs. The server speaks the MCP protocol over stdio, so as long as your binary follows the spec it will appear in the client just like the official servers.

Are my API keys safe?

The generator never sends your input anywhere — it builds the JSON via JSON.stringify in your browser and renders the result client-side. That said, the file you save will contain plain-text secrets (Personal Access Tokens, API keys, database passwords). Treat it like any other secret file: keep it out of version control, scope tokens to read-only when possible, and consider using OS-level secret stores (1Password CLI, macOS Keychain, env-from-file wrappers) instead of inlining values when your client supports them.

Is my data safe?

Yes. Every preset, every server card, and every JSON byte is processed in your browser using JSON.stringify and basic string handling. No fetch() or XMLHttpRequest calls are made with your data — you can confirm this by opening DevTools, switching to the Network tab, and watching while you paste a token into the env field. Even the secret-warning banner is computed locally from the contents of your env textareas; nothing about your config (server names, paths, tokens) is logged, transmitted, or saved outside your browser tab.

Why does my server need npx or uvx?

Most official MCP servers ship as Node.js packages (run via npx -y @modelcontextprotocol/server-...) or Python packages (run via uvx mcp-server-...). The -y flag in npx auto-confirms the install prompt so the server can spawn non-interactively. If you'd rather not pull packages on every launch, install the server globally and replace the command with the absolute binary path, then drop the package name from args.

Related Tools