Skip to content

MCP for every CLI agent: secfoo mcp sync for Codex, Copilot, OpenCode, Droid and Devin, and per-run scoping where the CLI allows it #124

Open

Description

@vsn411

Problem: [[mcp_servers]] in ~/.secfoo/config.toml reaches claude automatically (per-run --mcp-config, --strict-mcp-config) and gemini/agent (Cursor) through secfoo mcp sync (src/secfoo/mcp.py: sync_gemini, sync_cursor). The other adapters have zero MCP handling: codex.py says it is "a follow-up", and copilot.py, opencode.py, droid.py, devin.py and antigravity.py do not mention MCP at all. So the "context, not just code" story in the README is only true for three of the ten agents, and Confluence or Jira context silently falls into "could not be reached" for the rest.

Goal: every CLI agent whose tool can load MCP servers gets them from secfoo's one config, preferring per-run scoping (as with Claude) and falling back to a persistent secfoo mcp sync --agent <id> (as with Gemini), with the limitation documented for any CLI that truly has no mechanism.

Build, one adapter per PR is fine:

  1. Codex: Codex reads ~/.codex/config.toml ([mcp_servers.<name>] tables with command/args/env, and per codex --help possibly -c mcp_servers.<name>.command=... overrides for a single run). Prefer the per-run -c form if it works for stdio servers; otherwise implement sync_codex that merges into config.toml without clobbering the user's other servers. Record which Codex version you verified against.
  2. Copilot CLI: check copilot --help for an MCP config flag or its config file location; implement per-run or sync accordingly.
  3. OpenCode: opencode.json / ~/.config/opencode/ supports mcp entries (local and remote); implement sync_opencode, and look for a per-run config flag.
  4. Droid and Devin: investigate their config surfaces; implement what exists, and if nothing does, make secfoo mcp sync --agent <id> say exactly that with a link, instead of the generic "unsupported".
  5. Antigravity (agy): re-check; the current note says its CLI has no MCP mechanism "as of this writing". Update the note with the version checked.
  6. One table, one test per agent: extend sync() in src/secfoo/mcp.py, add tests in tests/test_mcp.py that write into a temp HOME and assert the resulting config (idempotent, preserves unrelated entries, handles url/transport/headers servers), and make the per-agent support matrix in docs/REFERENCE.md the single source of truth that secfoo mcp sync prints when asked for an unsupported agent.
  7. secfoo agents shows MCP support as a column (per-run, sync, none), so users see it before they pick an agent.

Where to look: src/secfoo/mcp.py, src/secfoo/agents/claude.py (the per-run pattern), src/secfoo/agents/{codex,copilot,opencode,droid,devin,antigravity}.py, src/secfoo/cli.py (mcp_sync, agents), tests/test_mcp.py, docs/REFERENCE.md (MCP table), docs/agents.md, README.md ("Context, not just code").

Done when: each adapter either loads secfoo's MCP servers (tested) or the docs state, with a CLI version and date, that it cannot; secfoo agents shows the MCP column; the README's agent note is updated.

Activity

  1. added
    enhancement
    help wanted
    hackathon
    difficulty: medium
    on Nov 15, 2026
  2. saryeljaramany commented on Nov 20, 2026

    @saryeljaramany
    Contributor

    I'd like to work on this

  3. saryeljaramany commented on Nov 21, 2026

    @saryeljaramany
    Contributor

    Opened PR #190 to address this.

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

    difficulty: mediumenhancementhackathonhelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions