Skip to content

Commit 7bfac15

Browse files
groksrcclaude
andauthored
fix(cli): project list MCP column shows transport type instead of DB presence (#661)
Signed-off-by: Drew Cain <groksrc@gmail.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 8761692 commit 7bfac15

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

src/basic_memory/cli/commands/project.py

Lines changed: 14 additions & 3 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_transport = "https"
193+
elif entry is None and cloud_project is not None:
194+
mcp_transport = "https"
195+
else:
196+
mcp_transport = "stdio"
186197

187198
# Show workspace name (type) for cloud-sourced projects
188199
ws_label = ""
@@ -195,7 +206,7 @@ async def _list_projects(ws: str | None = None):
195206
"local_path": local_path,
196207
"cloud_path": cloud_path,
197208
"cli_route": cli_route,
198-
"mcp_stdio": mcp_stdio_target,
209+
"mcp_stdio": mcp_transport,
199210
"sync": has_sync,
200211
"is_default": is_default,
201212
}

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)