The Platform Tooling team at a logistics company ships a codeindex MCP server that lets engineers ask Claude Code about an unfamiliar legacy billing service. The server definition is committed to the repository in .mcp.json, shown in the configuration below, and it starts cleanly for the four engineers who built it. A newly joined engineer clones the repository and the server fails to start on her first session, while the built-in Read, Grep and Glob tools work normally. Which mechanism explains that failure?
{
"mcpServers": {
"codeindex": {
"command": "node",
"args": ["./tools/codeindex-server.js"],
"env": { "CODEINDEX_TOKEN": "${CODEINDEX_TOKEN}" }
}
}
}- AThe token value is stored in the committed file, and a project-scoped entry may not carry credentials, so the server is blocked until the whole entry is moved into her user-scoped configuration.
- BA project-scoped server stays inert until each engineer re-runs the command that originally generated the entry, which rewrites the definition with machine-local paths before the server can be launched.
- CThe reference to CODEINDEX_TOKEN is expanded from her own shell environment at the moment the server process is launched, so with that variable unset and no default supplied in the entry the expansion fails and the server never starts. Correct
- DThe committed definition distributes the server name, but the token itself is resolved from the user-scoped configuration of whoever committed the file, which a fresh clone on another machine has no way to read.
Why A is wrong: Tempting because moving secrets out of a shared file is sound practice and user scope is a real alternative, but the committed file holds a variable reference rather than a value, so there is no credential in it to reject.
Why B is wrong: Tempting because some tooling does generate machine-specific configuration, but a committed definition is read as written and no regeneration step is required for it to launch.
Why C is correct: Correct: environment variable expansion in a server definition resolves against the launching developer's environment, which is what makes the file safe to commit and also what makes it fail for anyone who has not supplied the value.
Why D is wrong: Tempting because it correctly separates definition from secret, but there is no cross-machine lookup of another developer's configuration; the value comes from the local environment of whoever runs the server.