Claude Code: Support MCP completion/complete for resource template parameters in @ mention UI
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
When typing @server:db://object/asp in the @ mention autocomplete, Claude Code should send completion/complete requests to the MCP server to get suggestions for resource template URI parameters. Currently, the @ mention UI only performs fuzzy search over static resources from resources/list — it does not invoke the MCP completions protocol for resource templates.
MCP servers that expose large datasets (databases, APIs with millions of entities) define resource templates like db://object/{object_name} with @server.completion() handlers that return matching names as the user types. This is the MCP-standard way to enable discovery of valid identifiers without enumerating all possible resources upfront.
My server-side implementation works correctly — ReadMcpResourceTool resolves template URIs. But the @ mention in claude code UI never sends completion/complete requests, so users get no suggestions while typing.
Proposed Solution
Expected Behavior
- User types @server:db://object/ — Claude Code recognizes a registered resource template (defined with that resource pattern)
- As the user types parameter characters (e.g., asp), Claude Code sends completion/complete requests
- Returned Completion.values appear as autocomplete suggestions
- Selecting a suggestion completes the URI (e.g., @server:db://object/aspirin)
MCP Protocol Reference
{
"method": "completion/complete",
"params": {
"ref": { "type": "ref/resource", "uri": "db://object/{object_name}" },
"argument": { "name": "object_name", "value": "asp" }
}
}
Alternative Solutions
_No response_
Priority
High - Significant impact on productivity
Feature Category
Interactive mode (TUI)
Use Case Example
- User types @server:db://object/ — Claude Code recognizes a registered resource template (defined with that resource pattern)
- As the user types parameter characters (e.g., asp), Claude Code sends completion/complete requests
- Returned Completion.values appear as autocomplete suggestions
- Selecting a suggestion completes the URI (e.g., @server:db://object/aspirin)
MCP Protocol Reference
{
"method": "completion/complete",
"params": {
"ref": { "type": "ref/resource", "uri": "db://object/{object_name}" },
"argument": { "name": "object_name", "value": "asp" }
}
}
Additional Context
issue 3326 may be related
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗