Skip to content

Bug: make sure we capture all potential MCP file paths #323

@idofrizler

Description

@idofrizler

Problem

Only one MCP config path is shown when multiple exist. The page icon shows raw JSON instead of aggregated view.

Priority

🔴 P1 - HIGH | Path aggregation fix | ~2 hours

Implementation Details

MCP Config Locations to Check:

  • ~/.config/copilot/mcp.json (user-level)
  • .github/copilot/mcp.json (project-level)
  • ~/.copilot/mcp.json (alternative user path)
  • Other standard locations per platform

Fix Steps:

  1. Main process (src/main/main.ts):
const getMcpConfigs = async (): Promise<McpConfig[]> => {
  const paths = [
    path.join(os.homedir(), '.config/copilot/mcp.json'),
    path.join(os.homedir(), '.copilot/mcp.json'),
    path.join(projectRoot, '.github/copilot/mcp.json'),
  ];
  
  const configs = await Promise.all(
    paths.map(async (p) => {
      try {
        const content = await fs.readFile(p, 'utf-8');
        return { path: p, config: JSON.parse(content) };
      } catch { return null; }
    })
  );
  
  return configs.filter(Boolean);
};
  1. Renderer: Update MCP display to show tabbed/merged view of all configs

Files to Modify

  • src/main/main.ts (MCP loading)
  • src/renderer/components/ (MCP display UI)

Acceptance Criteria

  • All MCP config files are discovered
  • UI shows merged or tabbed view of configs
  • User can identify which config came from which path

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1-highHigh prioritybugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions