Skip to content

Add MCP CommandPlan preview without execution #11

Description

@Eilen6316

Goal

Allow MCP clients to request a CommandPlan preview while keeping execution unavailable over MCP.

Context

The MCP server is intentionally read-only in v4.1.0. A preview-only CommandPlan tool would let external agent clients inspect LinuxAgent's planning and policy boundary without creating a remote execution path.

Scope

  • Add a MCP tool that returns a validated CommandPlan preview.
  • Run policy classification for each proposed command.
  • Include HITL requirement, sandbox profile metadata, and matched policy rules.
  • Return structured content suitable for client display.
  • Audit only if the operation records a formal proposal event; do not record fake execution.

Non-goals

  • Do not execute commands.
  • Do not apply file patches.
  • Do not create background approvals or non-interactive auto-approval.
  • Do not bypass existing planner validation.

Acceptance Criteria

  • MCP preview returns validated plan data and per-command policy decisions.
  • Unsafe or invalid planner output is rejected with structured errors.
  • No subprocess or SSH execution path is reachable from this tool.
  • Unit tests prove preview-only behavior.
  • make lint, make type, make security, make red-team, and make test pass.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions