MCP Config
MCP Server Config Generator & Validator
Generate or validate a Model Context Protocol server configuration for Claude Desktop and generic MCP clients.
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/you/Desktop"
]
}
}
}- If "npx" isn't on your PATH, use its absolute path to avoid a "spawn ENOENT" error.
TL;DR
Generate a valid MCP server config from a short form, or paste an existing one to validate it. Supports stdio, Streamable HTTP, and legacy SSE transports. Native Claude Desktop only honors stdio in its JSON file, so remote servers are bridged with npx mcp-remote or added via Connectors. The full field reference and worked examples are below.
MCP config reference
Updated Jul 5, 2026| Field | Scope | Required | Description |
|---|---|---|---|
| mcpServers | root | Required | Top-level object; keys are the server names you choose. |
| command | stdio | Required | Executable launched as a subprocess (e.g. npx, python, or an absolute path). |
| args | stdio | Optional | Array of string arguments passed to command, in order. |
| env | stdio | Optional | Object of KEY:value strings injected into the subprocess environment. |
| type | remote | Recommended | Transport selector: "http" (Streamable HTTP), "sse" (legacy), "stdio". |
| url | remote | Required | Full endpoint URL for http/sse servers (not honored by native Claude Desktop). |
| headers | remote | Optional | Static HTTP headers, typically for auth. Claude Code / generic clients only. |
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/you/Desktop",
"/Users/you/Downloads"
],
"env": {
"SOME_API_KEY": "your-key-here"
}
}
}
}{
"mcpServers": {
"api-server": {
"type": "http",
"url": "https://api.example.com/mcp",
"headers": {
"Authorization": "Bearer ${API_KEY}"
}
}
}
}How it works
The generator builds an mcpServers block from the form and adapts it to the chosen host: stdio servers get command / args / env; remote servers get type / url / headers. Choosing Claude Desktop with a remote transport emits an npx mcp-remote stdio bridge, because Claude Desktop's JSON config validates stdio only.
The validator parses the JSON, checks for the required mcpServers object, verifies each server has a command or a valid url, type-checks args/env/headers, and flags unrecognized keys. MCP evolves quickly — verify against the current spec at modelcontextprotocol.io before relying on edge cases.
FAQ
- What goes in an MCP server config?
- A top-level "mcpServers" object whose keys are server names. Each stdio server has a "command" (the executable), optional "args" (an array of strings), and optional "env" (key/value environment variables). Remote servers instead use "type" (http or sse), "url", and optional "headers".
- Where is the Claude Desktop MCP config file?
- On macOS it's at ~/Library/Application Support/Claude/claude_desktop_config.json; on Windows it's %APPDATA%\Claude\claude_desktop_config.json. Edit it, paste your mcpServers block, and restart Claude Desktop.
- Can I use a remote HTTP MCP server in Claude Desktop?
- Native Claude Desktop only honors the stdio transport inside claude_desktop_config.json — it ignores "url"/"type":"http". Add remote servers through Settings → Connectors, or bridge them as a stdio process with `npx mcp-remote <url>`. This generator emits that bridge automatically when you pick Claude Desktop + a remote transport.
- What transports does MCP support?
- The spec standardizes two: stdio (local subprocess over stdin/stdout) and Streamable HTTP (a single HTTP endpoint, standard since the 2025-03-26 revision). The older HTTP+SSE transport is deprecated but still configurable as "type": "sse" for older servers. Some clients also add a non-standard WebSocket option.
- Why does my MCP server fail with "spawn ENOENT"?
- That means the command couldn't be found. If you used a bare name like "npx" or "python" that isn't on the app's PATH, use the executable's absolute path instead. The validator flags bare commands as a common cause.