claude mcp add writes 'type: stdio' that /doctor rejects as invalid schema
Resolved 💬 3 comments Opened Mar 29, 2026 by OmicMD Closed May 8, 2026
Summary
claude mcp add writes a "type": "stdio" field into MCP server configs that /doctor then rejects with "Does not adhere to MCP server configuration schema".
Steps to reproduce
# Add an MCP server using the official CLI
claude mcp add my-server --scope project -- /path/to/my-server
# Check what it wrote
cat .mcp.json
# Output includes "type": "stdio"
# Run doctor
claude doctor
# Error: mcpServers.my-server: Does not adhere to MCP server configuration schema
Expected behavior
Either:
claude mcp addshould NOT write the"type"field (since it's inferred fromcommandvsurl), OR/doctorshould accept"type": "stdio"as valid
Actual behavior
claude mcp add --scope project writes:
{
"mcpServers": {
"my-server": {
"type": "stdio",
"command": "/path/to/my-server",
"args": ["--flag", "value"],
"env": {}
}
}
}
/doctor rejects this as invalid schema.
Workaround
Manually remove the "type" field from the config file. The MCP server connects and works fine regardless — only /doctor reports it as an error.
Additional context
- Also discovered that
/doctorwalks up the directory tree merging.mcp.jsonfiles from parent directories, but reports errors against the project-level.mcp.jsonpath even when the error is from a parent directory's config. This made debugging very confusing. - Claude Code version: 2.1.87 (native)
- OS: macOS Darwin 25.3.0
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗