Skip to content

Commit a35fc53

Browse files
groksrcclaude
andcommitted
Fix project list MCP column to show transport type
Rename "MCP (stdio)" column to "MCP" and show actual transport type (stdio/https) based on project routing mode instead of just checking whether a local DB entry exists. Clear local path display for cloud-mode projects since they route through the cloud API. Fixes #659 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Drew Cain <groksrc@gmail.com>
1 parent 6e4bb72 commit a35fc53

2 files changed

Lines changed: 16 additions & 4 deletions

File tree

src/basic_memory/cli/commands/project.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ async def _list_projects(ws: str | None = None):
128128
table.add_column("Cloud Path", style="green")
129129
table.add_column("Workspace", style="green")
130130
table.add_column("CLI Route", style="blue")
131-
table.add_column("MCP (stdio)", style="blue")
131+
table.add_column("MCP", style="blue")
132132
table.add_column("Sync", style="green")
133133
table.add_column("Default", style="magenta")
134134

@@ -164,6 +164,11 @@ async def _list_projects(ws: str | None = None):
164164
elif entry and entry.mode == ProjectMode.LOCAL and entry.path:
165165
local_path = format_path(normalize_project_path(entry.path))
166166

167+
# Clear local path for cloud-mode projects — only local projects
168+
# should display a local path
169+
if entry and entry.mode == ProjectMode.CLOUD:
170+
local_path = ""
171+
167172
cloud_path = ""
168173
if cloud_project is not None:
169174
cloud_path = normalize_project_path(cloud_project.path)
@@ -182,7 +187,13 @@ async def _list_projects(ws: str | None = None):
182187
is_default = config.default_project == project_name
183188

184189
has_sync = bool(entry and entry.local_sync_path)
185-
mcp_stdio_target = "local" if local_project is not None else "n/a"
190+
# Determine MCP transport based on project routing mode
191+
if entry and entry.mode == ProjectMode.CLOUD:
192+
mcp_stdio_target = "https"
193+
elif cloud_project is not None and local_project is None:
194+
mcp_stdio_target = "https"
195+
else:
196+
mcp_stdio_target = "stdio"
186197

187198
# Show workspace name (type) for cloud-sourced projects
188199
ws_label = ""

tests/cli/test_project_list_and_ls.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,15 +122,16 @@ async def fake_list_projects(self):
122122
assert "Local Path" in result.stdout
123123
assert "Cloud Path" in result.stdout
124124
assert "CLI Route" in result.stdout
125-
assert "MCP (stdio)" in result.stdout
125+
assert "MCP" in result.stdout
126126

127127
lines = result.stdout.splitlines()
128128
alpha_line = next(line for line in lines if "│ alpha" in line)
129129
beta_line = next(line for line in lines if "│ beta" in line)
130130

131131
assert "local" in alpha_line # CLI route for alpha
132+
assert "stdio" in alpha_line # Local projects use stdio transport
132133
assert "cloud" in beta_line # CLI route for beta
133-
assert "n/a" in beta_line # MCP stdio route is unavailable for cloud-only projects
134+
assert "https" in beta_line # Cloud projects use HTTPS transport
134135
assert "alpha-local" in result.stdout
135136
assert "/alpha" in result.stdout
136137
assert "/beta" in result.stdout

0 commit comments

Comments
 (0)