Skip to content

Bug: secfoo mcp sync shows a traceback when gemini or Cursor's agent CLI isn't installed #169

Closed

Description

@vsn411

Problem: if Gemini CLI or Cursor's agent isn't installed, secfoo mcp sync --agent gemini (or --agent agent) crashes with a Python traceback (FileNotFoundError). _gemini_existing_names(), sync_gemini() and sync_cursor() call subprocess.run([...]) without checking that the binary exists.

Reproduce: add any [[mcp_servers]] entry to ~/.secfoo/config.toml, make sure gemini isn't on PATH, and run secfoo mcp sync --agent gemini.

Build: before syncing, check the binary with shutil.which (or get_adapter(agent_id).is_available()). If it's missing, return a single failed SyncResult such as gemini isn't installed (not found on PATH). The CLI already prints failed results and exits 1.

Where to look: src/secfoo/mcp.py (_gemini_existing_names, sync_gemini, sync_cursor), tests/test_mcp.py.

Done when: both agents print a one-line error and exit 1 instead of a traceback, and tests/test_mcp.py has a test for each, with the binary missing via monkeypatched shutil.which.

Activity

  1. added
    bug
    good first issue
    help wanted
    hackathon
    difficulty: low
    on Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugdifficulty: lowgood first issuehackathonhelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions