Project profiles with the same directory basename get identical labels — user can edit the wrong .mcp.json #74
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
discover_project_configs()labels every project profile by basename only:~/work/app/.mcp.jsonand~/personal/app/.mcp.jsonboth render as "Project: app". Paths are deduped correctly, so both profiles exist — they're just indistinguishable in the picker. Pick the wrong one and you edit (and back up, and write) the wrong repo's config.Common in practice:
api,web,app,server,clientas repo directory names.Suggested fix
Disambiguate only when needed, so the common case stays readable:
Project: work/appvsProject: personal/app) — widening further if still ambiguous.Also worth tightening while in here
discover_project_configs's docstring says it looks for "a standalone file with a top-levelmcpServersobject", but the code only checksmcp_path.is_file(). A.mcp.jsonthat's a JSON array or garbage still becomes a profile and only fails when opened. Either check for a readable dict (cheap — these files are tiny) or correct the docstring.Tests
Two
projectskeys with the same basename produce two distinct labels; a single project keeps the plainProject: <name>form.