claude-code - 💡(How to fix) Fix [DOCS] Plugin MCP server docs omit optional blank `userConfig` substitution behavior [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#52623Fetched 2026-04-24 06:02:10
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
labeled ×4

Root Cause

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.

RAW_BUFFERClick to expand / collapse

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:

The userConfig field declares values that Claude Code prompts the user for when the plugin is enabled. Use this instead of requiring users to hand-edit settings.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 as CLAUDE_PLUGIN_OPTION_<KEY> environment variables.

The MCP page also says:

Plugins define MCP servers in .mcp.json at the plugin root or inline in plugin.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:

  1. whether a plugin userConfig field can be optional,
  2. what happens when the user leaves that field blank, and
  3. 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 userConfig field,
  • 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 userConfig field.

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:

PageContext
https://code.claude.com/docs/en/plugins-referenceUser configuration section documents ${user_config.KEY} substitution but not optional blank-value behavior
https://code.claude.com/docs/en/mcpPlugin-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

extent analysis

TL;DR

Update the documentation to include information on how to define optional userConfig fields and how Claude Code handles blank values in plugin MCP server configurations.

Guidance

  • Add a subsection under User configuration in plugins-reference to document the behavior of optional userConfig fields and their substitution in plugin MCP server configs.
  • Include an example of a plugin MCP server config that safely references an optional userConfig field.
  • Update the Plugin-provided MCP servers section in https://code.claude.com/docs/en/mcp to cross-reference the new explanation in plugins-reference.
  • Ensure the documentation clarifies that referencing a blank optional value from plugin MCP server config should not cause the server to fail.

Example

No code snippet is provided as the issue is focused on documentation updates rather than code changes.

Notes

The suggested improvement should be applied to the affected pages, specifically the User configuration section in plugins-reference and the Plugin-provided MCP servers section in https://code.claude.com/docs/en/mcp.

Recommendation

Apply workaround by updating the documentation to include the missing information, as this will provide clarity on the behavior of optional userConfig fields and their substitution in plugin MCP server configurations.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING