Menu

#267 [Feat] MCP exclusions: baseline flag and opt-in agent control (v5.2)

open
nobody
None
7 days ago
7 days ago
Anonymous
No

Originally created by: Avazbek22

Idea

Two sibling startup flags that make the exclusions section flexible for MCP without any config files. The ceiling principle stays intact: the human authors the server command line, and agent parameters can only do what that line allows.

  1. devprojex mcp --exclude ... (baseline). Set the exclusion toggles for the server baseline directly on the mcpServers args line — the same tokens the CLI and TUI already speak (smart-ignore, empty-folders, empty-files, hidden-folders, hidden-files, dot-folders, dot-files, extensionless-files). Same design family as --git-mode shipped in v5.1: one line in the config the user already writes, no profile files.

  2. devprojex mcp --agent-exclusions (delegation). Opt-in that adds an exclusions parameter to the selection tools so the agent can control the exclusions section itself — down to the regular toggles and smart-ignore. Without the flag the parameter does not exist in the schema at all (the tool catalog is built at startup), so a default server keeps today's narrowing-only contract unchanged.

Why this fits the security model

  • The ceiling remains human-authored: raising it is one deliberate flag, not something the agent can talk its way into.
  • Red line unchanged: hide-secrets and hide-private-data never appear in any schema, in any mode. Delegation covers file visibility, never content redaction.
  • Contract-stable vocabulary: reuses the exclusion tokens already shared by the CLI choice set and the TUI set targets — nothing new to invent or freeze.

Open questions to settle before implementation

  • Baseline flag shape: one list that replaces the defaults vs additive/subtractive pairs; how it composes with an explicit profile argument (the v5.1 precedent: startup baseline applies only when no profile is passed).
  • Delegated parameter shape: full desired state ({"smart-ignore": false, ...}) vs a toggle list; which selection tools carry it.
  • Whether delegation also covers the persistent git modes (none|gitignore|tracked) or stays exclusions-only.
  • Reporting: should responses echo the effective exclusion state so both the agent and the human reading logs always see what was active?
  • Interaction with Live Context (#265): when the server follows the GUI, delegated exclusions presumably lose to the on-screen selection — decide the precedence rule.

Notes

  • Not for v5.1 — this is additive schema/contract evolution after the freeze, allowed by the stability policy.
  • Related: [#261] (v5.1 feature push this builds on), [#265] (Live Context).

Related

Tickets: #261
Tickets: #265
Tickets: #275

Discussion


Log in to post a comment.