# shell_exec_background

Run a long shell command in the background, returning a job_id.

Agent View of the PolicyLayer registry record for `shell_exec_background`. HTML page: https://policylayer.com/tools/0xmihirk-hercules-mcp/shell-exec-background

## Facts

- Tool: `shell_exec_background`
- Server: Hercules MCP (`0xmihirk/hercules-mcp`) — https://policylayer.com/tools/0xmihirk-hercules-mcp.md
- Homepage: https://github.com/0xMihirK/hercules-mcp
- Risk category: Execute (High risk)
- Registry record: grade F, identity unverified
- Server rate-limited: no
- Parameters: 0
- Recommended policy verdict: Rate-limited

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "shell_exec_background",
    "arguments": {}
  }
}
```

## Why shell_exec_background is rated High

This tool executes arbitrary shell commands with no constraints mentioned on what commands can be run. In a penetration testing context with Kali Linux, this could execute any offensive tool or destructive command (network attacks, data exfiltration, system compromise, malware deployment). The background execution pattern increases risk by allowing fire-and-forget attacks.

From the tool's own definition: "Tool name contains 'shell_exec' which directly executes arbitrary shell commands. Description states 'Run a long shell command in the background' confirming execution of uncontrolled shell operations."

## Use case

AI agents invoke shell_exec_background to trigger actions in Hercules MCP. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call: builds kicked off, notifications sent, workflows started.

## Recommended policy (PolicyLayer)

Verdict: **Rate-limited**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Hercules MCP:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "shell_exec_background": {
      "limits": [
        {
          "counter": "shell_exec_background_rate",
          "window": "minute",
          "max": 10,
          "scope": "grant"
        }
      ]
    }
  }
}
```

## Other tools on Hercules MCP (44)

- `browser_act` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/browser-act.md
- `browser_cmd` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/browser-cmd.md
- `browser_eval` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/browser-eval.md
- `browser_open` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/browser-open.md
- `browser_session` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/browser-session.md
- `browser_wait` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/browser-wait.md
- `bruteforce_hydra` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/bruteforce-hydra.md
- `crack_john` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/crack-john.md
- `ctf_binwalk` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/ctf-binwalk.md
- `ctf_steghide` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/ctf-steghide.md
- `fuzz_dirs` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/fuzz-dirs.md
- `metasploit_generate_payload` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/metasploit-generate-payload.md
- `metasploit_manage` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/metasploit-manage.md
- `metasploit_run_module` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/metasploit-run-module.md
- `metasploit_start_listener` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/metasploit-start-listener.md
- `ncat` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/ncat.md
- `network_curl` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/network-curl.md
- `network_hping3` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/network-hping3.md
- `nmap_run_nse_script` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/nmap-run-nse-script.md
- `nmap_scan` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/nmap-scan.md
- `nmap_write_nse_script` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/nmap-write-nse-script.md
- `nuclei_run` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/nuclei-run.md
- `recon_amass` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/recon-amass.md
- `recon_dns` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/recon-dns.md
- `searchsploit` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/searchsploit.md
- `shell_exec` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/shell-exec.md
- `shell_kill_job` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/shell-kill-job.md
- `sqlmap_run` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/sqlmap-run.md
- `system_start_new_session` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/system-start-new-session.md
- `system_stop_container` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/system-stop-container.md
- …and 14 more: https://policylayer.com/tools/0xmihirk-hercules-mcp.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=0xmihirk-hercules-mcp · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/0xmihirk-hercules-mcp
