From 1b95bfa80142450eaa66b7de45fff36059ca5154 Mon Sep 17 00:00:00 2001 From: "claude[bot]" <41898282+claude[bot]@users.noreply.github.com> Date: Tue, 10 Mar 2026 17:37:16 +0000 Subject: [PATCH] fix: show actual MCP transport type in project list column Rename 'MCP (stdio)' column to 'MCP' and update values to reflect the actual transport used (stdio for local projects, http for cloud-routed projects) instead of whether a local DB entry exists. Closes #659 Co-authored-by: Drew Cain --- src/basic_memory/cli/commands/project.py | 15 +++++++++++++-- tests/cli/test_project_list_and_ls.py | 6 ++++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/basic_memory/cli/commands/project.py b/src/basic_memory/cli/commands/project.py index a6d39bf2..68ce2dd1 100644 --- a/src/basic_memory/cli/commands/project.py +++ b/src/basic_memory/cli/commands/project.py @@ -128,7 +128,7 @@ def list_projects( table.add_column("Cloud Path", style="green") table.add_column("Workspace", style="green") table.add_column("CLI Route", style="blue") - table.add_column("MCP (stdio)", style="blue") + table.add_column("MCP", style="blue") table.add_column("Sync", style="green") table.add_column("Default", style="magenta") @@ -182,7 +182,18 @@ def list_projects( is_default = config.default_project == project_name has_sync = bool(entry and entry.local_sync_path) - mcp_stdio_target = "local" if local_project is not None else "n/a" + + # Determine MCP transport type based on project routing mode. + # Trigger: entry.mode or cloud-only project presence + # Why: the original "local"/"n/a" only reflected local DB presence, not transport + # Outcome: column now shows the actual MCP transport (stdio vs http) + if entry and entry.mode == ProjectMode.CLOUD: + mcp_stdio_target = "http" + elif cloud_project is not None and local_project is None and entry is None: + # Cloud-only project with no local config entry + mcp_stdio_target = "http" + else: + mcp_stdio_target = "stdio" # Show workspace name (type) for cloud-sourced projects ws_label = "" diff --git a/tests/cli/test_project_list_and_ls.py b/tests/cli/test_project_list_and_ls.py index be9f583d..1ff552e0 100644 --- a/tests/cli/test_project_list_and_ls.py +++ b/tests/cli/test_project_list_and_ls.py @@ -122,15 +122,17 @@ def test_project_list_shows_local_cloud_presence_and_routes( assert "Local Path" in result.stdout assert "Cloud Path" in result.stdout assert "CLI Route" in result.stdout - assert "MCP (stdio)" in result.stdout + assert "MCP" in result.stdout + assert "MCP (stdio)" not in result.stdout lines = result.stdout.splitlines() alpha_line = next(line for line in lines if "│ alpha" in line) beta_line = next(line for line in lines if "│ beta" in line) assert "local" in alpha_line # CLI route for alpha + assert "stdio" in alpha_line # MCP transport for local-mode project assert "cloud" in beta_line # CLI route for beta - assert "n/a" in beta_line # MCP stdio route is unavailable for cloud-only projects + assert "http" in beta_line # MCP transport for cloud-mode project assert "alpha-local" in result.stdout assert "/alpha" in result.stdout assert "/beta" in result.stdout