Build Model Context Protocol server configuration with the right structure (transport type, command, arguments, and environment variables) for Claude Code or Claude Desktop.
SponsorThis spot is open to one DevOps or AI tooling company at a time. Ask about sponsoring
116 of 118 run entirely in your browser (Weather Widget uses Open-Meteo; What's My IP asks this site's server).
Share on XShare on LinkedInMost MCP setup failures are one of three things. An absolute path is missing. The launcher does not inherit your shell PATH, so a bare command name frequently fails where the same line works in your terminal. The JSON has a trailing comma, which fails silently and looks like the server not existing. Or an environment variable the server needs was set in your shell profile and not in the config, so it launches and immediately errors.
On security: an MCP server runs with whatever access you grant it and can be invoked by the model. A server with filesystem write access or shell execution is a real capability handed to something a prompt injection could steer. Scope credentials narrowly and be deliberate about which servers get destructive tools.
Build a valid .mcp.json for Claude Code or Claude Desktop. Pick presets, edit inline, copy. No bad JSON, no missing fields.
{
"mcpServers": {
"filesystem": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"${REPO_ROOT}"
]
}
}
}$${GITHUB_TOKEN} and load real values from a vault, a .env, or your shell. Audit MCP servers quarterly. If a row has no clear business owner, remove it.