What happened?
Problem
When a Claude Code user-scope MCP server and a project-local MCP server use the same name, fastmcp discover returns both entries as claude-code:<name>. A bare fastmcp list <name> or fastmcp call <name> ... fails as ambiguous and prints the same qualified alternative twice. Using that qualified name selects the user-scope entry because FastMCP scans user entries first.
Claude Code documents that local definitions override user definitions with the same name. This means FastMCP's suggested disambiguation both fails to distinguish the entries and can silently choose a different server than the active Claude Code configuration.
Reproduction
In a project directory, configure ~/.claude.json with a top-level user server named weather that runs user-weather, plus projects[<resolved-project-path>].mcpServers.weather that runs local-weather. With the current FastMCP CLI:
fastmcp list weather exits with an ambiguous-name error.
- The error suggests
'claude-code:weather' twice.
fastmcp list claude-code:weather resolves to user-weather, although Claude Code's documented precedence selects local-weather.
The same underlying name resolver is used by list, call, and other client commands. Three isolated fresh-process reproductions against current main returned the same results; unique user-only and local-only controls both resolved successfully. The local MRE uses a temporary home and does not read or modify the real user's Claude configuration.
Expected behavior
Discovery should apply Claude Code's scope precedence when the same server name appears in multiple Claude Code scopes. The effective local entry should be selected, or the CLI should expose distinct scope-qualified identifiers that can actually select each entry. A repeated identical claude-code:<name> suggestion should not be presented as a disambiguation.
Related work
Open issue #5094 reports a Windows path-format mismatch that hides project-scoped Claude Code servers. This report is separate: it reproduces on the supported path layout and concerns same-name scope precedence and resolution.
Example Code
Version Information
- FastMCP main: `5baeacfe20eca735cb949564b4915f93a622b916`
- Python: 3.12.15
- OS: macOS 15.0.1 arm64
What happened?
Problem
When a Claude Code user-scope MCP server and a project-local MCP server use the same name,
fastmcp discoverreturns both entries asclaude-code:<name>. A barefastmcp list <name>orfastmcp call <name> ...fails as ambiguous and prints the same qualified alternative twice. Using that qualified name selects the user-scope entry because FastMCP scans user entries first.Claude Code documents that local definitions override user definitions with the same name. This means FastMCP's suggested disambiguation both fails to distinguish the entries and can silently choose a different server than the active Claude Code configuration.
Reproduction
In a project directory, configure
~/.claude.jsonwith a top-level user server namedweatherthat runsuser-weather, plusprojects[<resolved-project-path>].mcpServers.weatherthat runslocal-weather. With the current FastMCP CLI:fastmcp list weatherexits with an ambiguous-name error.'claude-code:weather'twice.fastmcp list claude-code:weatherresolves touser-weather, although Claude Code's documented precedence selectslocal-weather.The same underlying name resolver is used by
list,call, and other client commands. Three isolated fresh-process reproductions against current main returned the same results; unique user-only and local-only controls both resolved successfully. The local MRE uses a temporary home and does not read or modify the real user's Claude configuration.Expected behavior
Discovery should apply Claude Code's scope precedence when the same server name appears in multiple Claude Code scopes. The effective local entry should be selected, or the CLI should expose distinct scope-qualified identifiers that can actually select each entry. A repeated identical
claude-code:<name>suggestion should not be presented as a disambiguation.Related work
Open issue #5094 reports a Windows path-format mismatch that hides project-scoped Claude Code servers. This report is separate: it reproduces on the supported path layout and concerns same-name scope precedence and resolution.
Example Code
Version Information