Slash Command Registration Collision with MCP Server Configuration
Resolved 💬 3 comments Opened Apr 4, 2025 by bkudria Closed Apr 4, 2025
Bug Description
Custom Slash Commands and project MCP servers conflict
Environment Info
- Platform: macos
- Terminal: tmux
- Version: 0.2.62
- Feedback ID: 3bdb0f3d-2529-409d-a606-28768d984739
Errors
[{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"tools: Tool names must be unique.\"}}\n at q6.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:539:26089)\n at O6.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:543:7207)\n at O6.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:543:8149)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-04-04T04:48:13.726Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"tools: Tool names must be unique.\"}}\n at q6.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:539:26089)\n at O6.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:543:7207)\n at O6.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:543:8149)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1571:1809\n at async Ip (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1568:3847)\n at async Gi2 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1571:1649)\n at async Lv1 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1568:2075)\n at async Ax2 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1569:130)\n at async Qj5 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1419:73)","timestamp":"2025-04-04T04:48:13.883Z"}]
Terminal Session
─❯ mkdir .claude/commands
~/code/claude-bugs main
❯ echo "tell me a joke" > .claude/commands/joke.md
~/code/claude-bugs main ?1
❯ claude "/project:joke"
✻ Welcome to Claude Code research preview!
/help for help
cwd: /Users/bkudria/code/claude-bugs
Tips for getting started:
1. Run /init to create a CLAUDE.md file with instructions for Claude
2. Use Claude to help with file analysis, editing, bash commands and git
3. Be as specific as you would with another engineer for the best results
> /project:joke is running…
⏺ Why don't scientists trust atoms?
Because they make up everything.
> tell me another joke
⏺ Search(pattern: "*.md")…
⎿ Found 0 files
⏺ I tried to write a joke about construction, but I'm still working on it.
>
Press Ctrl-D again to exit
Total cost: $0.0268
Total duration (API): 9.8s
Total duration (wall): 31.3s
Total code changes: 0 lines added, 0 lines removed
~/code/claude-bugs main ?1
❯ claude mcp
Usage: claude mcp [options] [command]
Configure and manage MCP servers
Options:
-h, --help display help for command
Commands:
serve Start the Claude Code MCP server
add [options] [name] [commandOrUrl] [args...] Add a server (run without arguments for interactive wizard)
remove [options] <name> Remove an MCP server
list List configured MCP servers
get <name> Get details about an MCP server
add-json [options] <name> <json> Add an MCP server (stdio or SSE) with a JSON string
add-from-claude-desktop [options] Import MCP servers from Claude Desktop (Mac and WSL only)
reset-project-choices Reset all approved and rejected project-scoped (.mcp.json) servers within this project
help [command] display help for command
~/code/claude-bugs main ?1
❯ claude mcp list
No MCP servers configured. Use `claude mcp add` to add a server.
~/code/claude-bugs main ?1
❯ claude mcp add
✓ MCP Server added successfully!
Your server "fetch" has been added to the project configuration (shared with anyone using this project via .mcp.json).
View server info with: claude mcp get fetch. Remove with: claude mcp remove fetch
~/code/claude-bugs main ?2
❯ claude mcp list
fetch: uvx mcp-server-fetch
~/code/claude-bugs main ?2
❯ claude "/project:joke"
New MCP server found in .mcp.json: fetch
MCP servers may execute code or access system resources. All tool calls require approval. Learn more in the MCP documentation
(https://docs.anthropic.com/s/claude-code-mcp).
❯ Use this and all future MCP servers in this project ✔
Use this MCP server
Continue without using this MCP server
Enter to confirm · Esc to reject
✻ Welcome to Claude Code research preview!
/help for help
cwd: /Users/bkudria/code/claude-bugs
Tips for getting started:
1. Run /init to create a CLAUDE.md file with instructions for Claude
2. Use Claude to help with file analysis, editing, bash commands and git
3. Be as specific as you would with another engineer for the best results
> /project:joke is running…
⏺ Why did the AI go to art school?
To learn how to draw conclusions!
> tell me another joke
⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"tools: Tool names must be unique."}}
> /bug
⎿ Bug report submitted
>
? for shortcuts
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗