Free Tool
MCP Config (.mcp.json) Generator
Add your MCP servers, local (stdio) or remote (HTTP), and get a valid .mcp.json for Claude Code plus the equivalent claude mcp add commands. Keep secrets out of the file with ${VAR} variables.
.mcp.json
.mcp.json
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"."
]
},
"my-remote-api": {
"type": "http",
"url": "https://example.com/mcp",
"headers": {
"Authorization": "Bearer ${API_KEY}"
}
}
}
}
Same servers with claude mcp add
claude mcp add --scope project filesystem -- npx -y @modelcontextprotocol/server-filesystem .
claude mcp add --transport http --scope project my-remote-api https://example.com/mcp --header 'Authorization: Bearer ${API_KEY}'How to use it
- For a shared project setup, save the JSON as
.mcp.jsonin your project root and commit it. - Or run the commands instead; they write the same servers for the scope you picked.
- Set any
${VAR}values in your shell, then start Claude Code and approve the servers. - Check them with
claude mcp listor/mcp.
Frequently asked questions
Project-scoped servers live in .mcp.json at the root of your project, which you can commit so your team gets the same servers. Servers you add with --scope user are stored in ~/.claude.json and work in every project. The default local scope is also kept in ~/.claude.json, for the current project only.
A stdio server is a program Claude Code starts on your computer, set with command, args and env. An HTTP server is a remote service set with type "http" and a url, plus optional headers such as an Authorization token. HTTP is the recommended remote transport; SSE is deprecated.
Use environment variables. Claude Code expands ${VAR} and ${VAR:-default} in command, args, env, url and headers, so you can write "Bearer ${API_KEY}" and set API_KEY in your shell instead of committing the key.
Project-scoped servers can run code, so Claude Code asks before using them the first time. If you want to see the prompt again, run claude mcp reset-project-choices.
Yes. Use claude mcp add --transport http <name> <url> for remote servers, or claude mcp add <name> -- <command> [args...] for local ones. Add --scope project to write to .mcp.json. This tool prints those commands for you too.
Run claude mcp list in your terminal, or type /mcp inside Claude Code to see each server's status and log in to servers that need it.