@@ -319,13 +319,9 @@ def scan(
319319 if config_dir :
320320 reads .append (f" [green]Would read:[/green] { config_dir } (config directory)" )
321321 if not reads :
322- import platform
323- if platform .system () == "Darwin" :
324- reads .append (" [green]Would read:[/green] ~/Library/Application Support/Claude/claude_desktop_config.json" )
325- reads .append (" [green]Would read:[/green] ~/.cursor/mcp.json" )
326- reads .append (" [green]Would read:[/green] ~/.codeium/windsurf/mcp_config.json" )
327- else :
328- reads .append (" [green]Would read:[/green] ~/.config/claude/claude_desktop_config.json" )
322+ from agent_bom .discovery import get_all_discovery_paths
323+ for client , path in get_all_discovery_paths ():
324+ reads .append (f" [green]Would read:[/green] { path } ({ client } )" )
329325 for tf_dir in tf_dirs :
330326 reads .append (f" [green]Would read:[/green] { tf_dir } (Terraform .tf files)" )
331327 for ap in agent_projects :
@@ -1535,17 +1531,49 @@ def validate(inventory_file: str):
15351531
15361532
15371533@main .command ()
1538- def where ():
1539- """Show where agent-bom looks for MCP configurations."""
1534+ @click .option ("--json" , "as_json" , is_flag = True , help = "Output as JSON for machine consumption" )
1535+ def where (as_json : bool ):
1536+ """Show where agent-bom looks for MCP configurations.
1537+
1538+ Lists every config path that would be checked during auto-discovery,
1539+ grouped by MCP client. Paths that exist on your system are marked with ✓.
1540+
1541+ Use --json for machine-readable output (useful for auditing).
1542+ """
15401543 import shutil
15411544
1545+ from agent_bom .discovery import (
1546+ AGENT_BINARIES ,
1547+ COMPOSE_FILE_NAMES ,
1548+ CONFIG_LOCATIONS ,
1549+ PROJECT_CONFIG_FILES ,
1550+ expand_path ,
1551+ get_all_discovery_paths ,
1552+ get_platform ,
1553+ )
1554+
1555+ current_platform = get_platform ()
1556+
1557+ if as_json :
1558+ import json as _json
1559+ entries = []
1560+ for client , path in get_all_discovery_paths (current_platform ):
1561+ expanded = str (expand_path (path )) if not path .startswith ("." ) else path
1562+ entries .append ({
1563+ "client" : client ,
1564+ "path" : path ,
1565+ "expanded" : expanded ,
1566+ "exists" : expand_path (path ).exists () if not path .startswith ("." ) else Path (path ).exists (),
1567+ })
1568+ click .echo (_json .dumps ({"platform" : current_platform , "paths" : entries }, indent = 2 ))
1569+ return
1570+
15421571 console = Console ()
15431572 console .print (BANNER , style = "bold blue" )
15441573 console .print ("\n [bold]MCP Client Configuration Locations[/bold]\n " )
15451574
1546- from agent_bom .discovery import AGENT_BINARIES , CONFIG_LOCATIONS , PROJECT_CONFIG_FILES , expand_path , get_platform
1547-
1548- current_platform = get_platform ()
1575+ total_paths = 0
1576+ found_paths = 0
15491577
15501578 for agent_type , platforms in CONFIG_LOCATIONS .items ():
15511579 paths = platforms .get (current_platform , [])
@@ -1560,16 +1588,48 @@ def where():
15601588 console .print (f"\n [bold cyan]{ agent_type .value } [/bold cyan]{ binary_status } " )
15611589 if paths :
15621590 for p in paths :
1591+ total_paths += 1
15631592 expanded = expand_path (p )
15641593 exists = "✓" if expanded .exists () else "✗"
15651594 style = "green" if expanded .exists () else "dim"
1595+ if expanded .exists ():
1596+ found_paths += 1
15661597 console .print (f" [{ style } ]{ exists } { expanded } [/{ style } ]" )
15671598 else :
15681599 console .print (f" [dim] (CLI-based discovery via { binary or 'N/A' } )[/dim]" )
15691600
1570- console .print ("\n [bold cyan]Project-level configs[/bold cyan]" )
1601+ # Docker MCP Toolkit paths
1602+ console .print ("\n [bold cyan]Docker MCP Toolkit[/bold cyan]" )
1603+ for dp in ["~/.docker/mcp/registry.yaml" , "~/.docker/mcp/catalogs/docker-mcp.yaml" ]:
1604+ total_paths += 1
1605+ expanded = expand_path (dp )
1606+ exists = "✓" if expanded .exists () else "✗"
1607+ style = "green" if expanded .exists () else "dim"
1608+ if expanded .exists ():
1609+ found_paths += 1
1610+ console .print (f" [{ style } ]{ exists } { expanded } [/{ style } ]" )
1611+
1612+ console .print ("\n [bold cyan]Project-level configs[/bold cyan] [dim](relative to CWD)[/dim]" )
15711613 for config_name in PROJECT_CONFIG_FILES :
1572- console .print (f" [dim] ./{ config_name } [/dim]" )
1614+ total_paths += 1
1615+ exists = Path (config_name ).exists ()
1616+ mark = "✓" if exists else "✗"
1617+ style = "green" if exists else "dim"
1618+ if exists :
1619+ found_paths += 1
1620+ console .print (f" [{ style } ]{ mark } ./{ config_name } [/{ style } ]" )
1621+
1622+ console .print ("\n [bold cyan]Docker Compose files[/bold cyan] [dim](relative to CWD)[/dim]" )
1623+ for cf in COMPOSE_FILE_NAMES :
1624+ total_paths += 1
1625+ exists = Path (cf ).exists ()
1626+ mark = "✓" if exists else "✗"
1627+ style = "green" if exists else "dim"
1628+ if exists :
1629+ found_paths += 1
1630+ console .print (f" [{ style } ]{ mark } ./{ cf } [/{ style } ]" )
1631+
1632+ console .print (f"\n [bold]Total:[/bold] { total_paths } paths checked, { found_paths } found on this system" )
15731633
15741634
15751635@main .command ()
0 commit comments