[DOCS] Plugin MCP server docs omit optional blank `userConfig` substitution behavior
Documentation Type
Missing documentation (feature not documented)
Documentation Location
https://code.claude.com/docs/en/plugins-reference
Section/Topic
User configuration and ${user_config.KEY} substitution for plugin-provided MCP servers
Current Documentation
The docs currently say:
TheuserConfigfield declares values that Claude Code prompts the user for when the plugin is enabled. Use this instead of requiring users to hand-editsettings.json. Keys must be valid identifiers. Each value is available for substitution as${user_config.KEY}in MCP and LSP server configs, hook commands, and (for non-sensitive values only) skill and agent content. Values are also exported to plugin subprocesses asCLAUDE_PLUGIN_OPTION_<KEY>environment variables.
The MCP page also says:
Plugins define MCP servers in.mcp.jsonat the plugin root or inline inplugin.json* When a plugin is enabled, its MCP servers start automatically
Neither page explains how optional plugin userConfig fields behave when a user leaves a value blank and that value is referenced from a plugin MCP server config.
What's Wrong or Missing?
Changelog v2.1.119 includes this entry:
Fixed plugin MCP servers failing when ${user_config.*} references an optional field left blank
The current docs explain that ${user_config.KEY} substitution exists, but they do not document the optional/blank-value case for plugin configuration.
That leaves plugin authors without guidance on:
- whether a plugin
userConfigfield can be optional, - what happens when the user leaves that field blank, and
- how plugin-provided MCP servers should behave when their config references that blank value.
Because this behavior was important enough to be fixed in v2.1.119, it should be documented as supported behavior rather than discoverable only through a changelog bug-fix note.
Suggested Improvement
Add a short subsection under User configuration in plugins-reference that documents:
- how plugin authors define an optional
userConfigfield, - what runtime value/substitution behavior Claude Code uses when that field is left blank,
- that referencing a blank optional value from plugin MCP server config should not cause the server to fail, and
- one example showing a plugin MCP server config that safely references an optional
userConfigfield.
Also add a brief cross-reference from the plugin MCP section in https://code.claude.com/docs/en/mcp back to the plugins-reference explanation.
Impact
Medium - Makes feature difficult to understand
Additional Context
Affected Pages:
| Page | Context |
|------|---------|
| https://code.claude.com/docs/en/plugins-reference | User configuration section documents ${user_config.KEY} substitution but not optional blank-value behavior |
| https://code.claude.com/docs/en/mcp | Plugin-provided MCP servers section describes plugin MCP configs but does not mention userConfig optional/blank semantics |
Total scope: 2 pages affected
Source: Changelog v2.1.119
Exact changelog entry: Fixed plugin MCP servers failing when ${user_config.*} references an optional field left blank
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗