Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

I built an MCP server that stops AI agents from running commands they shouldn't

Описание и применение

Сервер MCP agent-exec-guard анализирует команды AI‑агентов, классифицируя их как безопасные, заблокированные или требующие одобрения человека, тем самым предотвращая выполнение вредоносных команд.

Задача

AI agents that execute shell commands often rely on simple allowlists that only check the first token, enabling malicious payloads to be hidden inside seemingly safe commands.

Результат

The MCP server prevents malicious commands from executing while allowing legitimate commands to run without interruption, enhancing security for AI agents.

Рабочий процесс

  • 1. Install agent-exec-guard via npm or run directly.
  • 2. Configure the agent to use the MCP server as a proxy.
  • 3. Agent sends command to MCP server.
  • 4. MCP server parses command into AST.
  • 5. MCP server classifies command: SAFE runs immediately; BLOCKED is rejected; UNCERTAIN is sent to a human for approval.
  • 6. Human approves by generating a signed HMAC token tied to the command checksum.
  • 7. Agent receives token and executes the command.
  • 8. Log and audit all decisions.

Доказательства

Instead of string matching, it fully parses the command into a real AST and classifies it: SAFE, BLOCKED, UNCERTAIN

Источник

  • Дата записи: 2026-09-08T04:14:37.415Z