[BUG] MCP prompt not working with title

Status Closed — not planned
Maintainer reply None cached
Activity 9 comments · opened Sep 11, 2025 · closed Jan 14, 2026

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?

When using a MCP with prompts, I can see the list of prompts when I type / .
The MCP prompt also has a title and Claude code show it correctly. However, when I select the prompt (which has a blank space on it), then Claude code returns the error "unknown slash command". The title should be used to display only, but it seems that Claude code is sending the title rather than the name. Not sure if the issue is due to a blank space in the title or Claude code sending the title rather than the name.

What Should Happen?

Claude should be able to invoke the slash command when titles are specified in prompts

Error Messages/Logs

Unknown slash command: spec-workflow:Create

Steps to Reproduce

Add this MCP server : https://github.com/Pimzino/spec-workflow-mcp

Try to use any of the prompts this MCP server provide

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

1.0.96

Platform

AWS Bedrock

Operating System

Other Linux

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

9 Comments

DimWebDev · 1 year ago

I have the same problem. I created an mcp server and added the same mcp server in VSCode in Copilot and it works fine. Claude Code lists the slash commands from the mcp server prompts, but when I try to run them, I get “Unknown slash command”.

All of my commands had mandatory and optional arguments based on the TypeScript mcp SDK docs

vpursuit · 1 year ago

The same happens for me. I found out that the title is not allowed to contain white spaces:
I'm using @modelcontextprotocol/sdk@1.18.0

Example code:
https://github.com/vpursuit/swipl-mcp-server/blob/40f1a152e05d279c56bf8975a2ccee14c3430777/src/prompts.ts#L127

This _fails_:

quickReference: {
    name: "prolog_quick_reference",
    title: "Prolog Server Quick Reference Guide",

This _works_:

quickReference: {
    name: "prolog_quick_reference",
    title: "prolog_quick_reference",

The working slash command is:

/swipl-mcp-server:prolog_quick_reference

I guess claude shall not use property 'title', but 'name' to create the slash-command.

DimWebDev · 1 year ago
The same happens for me. I found out that the title is not allowed to contain white spaces: I'm using @modelcontextprotocol/sdk@1.18.0 This _fails_: `` quickReference: { name: "prolog_quick_reference", title: "Prolog Server Quick Reference Guide", ` This **_works_**: ` quickReference: { name: "prolog_quick_reference", title: "prolog_quick_reference", `` The working slash command is: /swipl-mcp-server:prolog_quick_reference I guess claude shall not use property 'title', but 'name' to create the slash-command.

will try it later today. Thanks!

github-actions[bot] · 10 months ago

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

kazukinakai · 10 months ago

Additional reproduction case

I'm experiencing the same issue with MCP prompts. When typing a slash command like /airis:agent, the autocomplete shows:

/airis:agent (MCP)    Airis Agent - session controller...

Problem: Pressing Enter does nothing. The command cannot be selected.

Workaround: Pressing Backspace to remove the trailing space, then Enter works.

Root cause analysis

Looking at the minified cli.js, I found the issue:

userFacingName(){
  let J = Z.title || Z.name;
  return \`\${Q.name}:\${J} (MCP)\`
}

The (MCP) suffix contains a space, which breaks command parsing when the user selects from autocomplete.

Suggested fix

When matching/executing the slash command, use the name field directly instead of userFacingName(). The userFacingName() should only be used for display purposes.

Something like:

// For display: "/airis:agent (MCP)"
userFacingName() { return \`\${serverName}:\${title || name} (MCP)\` }

// For command matching: "/airis:agent"
commandName() { return \`\${serverName}:\${name}\` }

This would also fix Issue #5597 (MCP prompts with optional arguments require input to invoke).

kazukinakai · 10 months ago

Simpler fix option: Remove the space before (MCP) or change the separator:

// Current (broken - space before parenthesis)
\`\${serverName}:\${name} (MCP)\`

// Fix 1: No space
\`\${serverName}:\${name}(MCP)\`

// Fix 2: Brackets instead
\`\${serverName}:\${name}[MCP]\`

// Fix 3: No suffix (cleanest)
\`\${serverName}:\${name}\`

The space before (MCP) is what breaks command parsing during autocomplete selection.

github-actions[bot] · 9 months ago

This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.

github-actions[bot] · 8 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] · 8 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.