[ENHANCEMENT] Display MCP resource title/name in @-mention chip while retaining URI value
Summary
When a user selects an MCP resource from Claude Code's @ picker, render the selected reference with a human-readable label from resource.title ?? resource.name, while retaining the resource URI as the underlying replacement/read value.
Current behavior
Claude Code can discover and attach standard MCP resources, but the selected composer reference remains visibly URI-shaped, for example:
@example:example://document/opaque-id
This is correct as an identity/read value, but it is noisy in a prompt when the resource descriptor already supplies a concise human-readable title.
Requested behavior
- Visible selected label:
resource.title ?? resource.name ?? resource.uri - Underlying value and resource read target: unchanged URI
- Preserve the server namespace where needed for identity or disambiguation
- Fall back to the current URI rendering when no usable title/name is present
The picker can continue searching by title, name, and URI. This request is only about the visible representation after selection.
Minimal reproduction
- Connect an MCP server whose
resources/listresponse includes:
``json``
{
"uri": "example://document/opaque-id",
"name": "Readable document title",
"title": "Readable document title",
"mimeType": "text/markdown"
}
- Type
@example:and select the resource. - Observe that the composer retains the full URI-shaped token rather than a compact label.
Why this helps
MCP resource URIs are durable identifiers, not necessarily user-facing names. Using the standard descriptor metadata for display would keep prompts readable without changing resource identity, protocol behavior, or the text Claude uses to resolve the attachment.
Observed with Claude Code 2.1.207 on macOS.