ACB-MCP-002: MCP server launch commands are not interpreted by a shell

FieldValue
Statusdraft
Severityhigh
Check typestatic
Applies tomcp-server-declaration
Profilesstrict-general
Exceptionspermitted

Description

A local MCP server is launched by naming an executable in command and passing its arguments as a list. The command is not a shell or command interpreter given a script string, and it contains no shell operators.

Rationale

A shell invocation turns every argument into code. Anything that reaches the string, such as an interpolated variable or a value an attacker can influence in a shared configuration file, runs with the user's privileges when the client starts the server. Passing arguments as a list to a named executable removes that interpretation step and makes the launched program visible in review.

Audit procedures

no-shell-interpretation (structure)

For each server entry with a command key, the command is not a shell or command interpreter (sh, bash, zsh, dash, ash, ksh, fish, csh, tcsh, cmd, powershell, pwsh) invoked with a string-evaluation flag (-c, /c, /k, -Command, -EncodedCommand), whether directly or through a wrapper such as env or sudo, and the command value contains none of the shell operators ; & | < > $ ` or a newline.

Illustrative failing indicators (non-exhaustive):

Remediation

Name the server executable directly in command and move each argument to its own element of args. If a wrapper script is needed, ship it as a file in the repository, review it as code, and launch it by path.

References