[BUG] Prompt slash commands use Title instead of Name, breaking on spaces
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Environment / Setup
- Claude Code Version:
2.0.32 - Installation Method: npm (
npm install -g @anthropic-ai/claude-code@latest) - Inference Platform: AWS Bedrock
- Model:
claude-sonnet-4-5-20250929-v1:0[1m] - Language:
go1.25.1 darwin/arm64 - MCP SDK:
github.com/modelcontextprotocol/go-sdk@v1.0.0 - Operating System: Mac OS Tahoe 26.0.1
- Terminal:
iTerm2, Build 3.6.5
Description
When invoking MCP prompts via slash commands, Claude Code appears to use the prompt's Title field instead of the Name field as the identifier. This breaks the command parsing when the Title contains spaces.
References
I am using Go but here are the descriptions for the base metadata of Title and Name in the TypeScript SDK:
/** Intended for programmatic or logical use, but used as a display name in past specs or fallback */
name: z.string(),
/**
* Intended for UI and end-user contexts — optimized to be human-readable and easily understood,
* even by those unfamiliar with domain-specific terminology.
*
* If not provided, the name should be used for display (except for Tool,
* where `annotations.title` should be given precedence over using `name`,
* if present).
*/
title: z.optional(z.string())
https://github.com/modelcontextprotocol/typescript-sdk/blob/main/src/types.ts#L234
What Should Happen?
The slash command syntax /mcp-server-name:prompt-name should use the prompt's Name field (the unique identifier) for invocation. Instead, Claude Code uses the prompt's Title field (human-readable display name), causing parsing errors when the Title contains spaces.
Error Messages/Logs
You can see here how the command is displayed with spaces using the title
> claude
▐▛███▜▌ Claude Code v2.0.32
▝▜█████▛▘ .../global.anthropic.claude-sonnet-4-5-20250929-v1:0[1m] · API Usage Billing
▘▘ ▝▝ <redacted>
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
> /mcp [reconnect <server-name>]
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
/mcp Manage MCP servers
/my-server:System Context Prompt (MCP) Provides system-level context about ... <redacted>
However, it cannot be used:
> Unknown slash command: my-server:System
Steps to Reproduce
Reproduction Example
An MCP server registers a prompt with:
&mcp.Prompt{
Name: "system-context", // Identifier (no spaces)
Title: "System Context Prompt", // Display name (with spaces)
Description: "Provides system-level context...",
}
When attempting to invoke with /my-server:system-context, Claude Code tries to execute /my-server:System Context Prompt, which fails with:
Unknown slash command: my-server:System
The command is cut off at the first space in the Title.
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.0.32
Platform
Bedrock
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
I do have a slight Workaround but I still think this is worth reporting and investigating.
Setting Title to match Name (no spaces, dash-separated) resolves the issue, but defeats the purpose of having separate Name/Title fields per MCP specification.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗