Configuration Reference¶
The Linux MCP Server is configured through command line options or environment variables. Environment variables use a LINUX_MCP_ prefix. For example, --log-level corresponds to LINUX_MCP_LOG_LEVEL.
Precedence
Command line options take precedence over environment variables. For MCP client configurations (Claude Desktop, Cursor, etc.), you typically use environment variables in the config file rather than command line arguments, but either will work.
To see available options, run linux-mcp-server --help.
Transport Settings¶
| Option / Env Var | Default | Description |
|---|---|---|
--transportLINUX_MCP_TRANSPORT |
stdio |
Transport type: stdio or http |
--hostLINUX_MCP_HOST |
127.0.0.1 |
Host address for HTTP transport |
--portLINUX_MCP_PORT |
8000 |
Port number for HTTP transport |
--pathLINUX_MCP_PATH |
/mcp |
Path for HTTP transport |
HTTP Transport Security
The HTTP transport does not currently have authentication. It should not be used in production or on untrusted networks.
Note
Some clients, like Claude Desktop, require stdio transport.
SSH Connection Settings¶
| Option / Env Var | Default | Description |
|---|---|---|
--userLINUX_MCP_USER |
(empty) | Default username for SSH connections |
--ssh-key-pathLINUX_MCP_SSH_KEY_PATH |
(none) | Path to SSH private key file |
--key-passphraseLINUX_MCP_KEY_PASSPHRASE |
(empty) | Passphrase for encrypted SSH key |
--search-for-ssh-keyLINUX_MCP_SEARCH_FOR_SSH_KEY |
False |
Auto-discover SSH keys in ~/.ssh |
--command-timeoutLINUX_MCP_COMMAND_TIMEOUT |
30 |
Local and remote command timeout in seconds |
SSH Security Settings¶
| Option / Env Var | Default | Description |
|---|---|---|
--verify-host-keys / --no-verify-host-keysLINUX_MCP_VERIFY_HOST_KEYS |
True |
Verify remote host identity via known_hosts |
--known-hosts-pathLINUX_MCP_KNOWN_HOSTS_PATH |
(none) | Custom path to known_hosts file |
See SSH Configuration for details on setting up SSH connections and managing host keys.
Tool Settings¶
| Option / Env Var | Default | Description |
|---|---|---|
--toolsetLINUX_MCP_TOOLSET |
fixed |
Toolset: fixed, run_script, or both |
--allowed-log-pathsLINUX_MCP_ALLOWED_LOG_PATHS |
(none) | Comma-separated allowlist of log file paths for read_log_file |
--max-file-read-bytesLINUX_MCP_MAX_FILE_READ_BYTES |
1048576 |
Maximum bytes read_file may return |
See Guarded Command Execution for details on the run_script toolset.
Guarded Command Execution Settings¶
These are used when LINUX_MCP_TOOLSET is set to run_script or both.
| Option / Env Var | Default | Description |
|---|---|---|
--gatekeeper-modelLINUX_MCP_GATEKEEPER_MODEL |
(none) | Required: LiteLLM model name to use |
--always-confirm-scripts / --no-always-confirm-scriptsLINUX_MCP_ALWAYS_CONFIRM_SCRIPTS |
False |
All scripts must be confirmed by the user |
| Other environment variables | (none) | As required by the LiteLLM provider, e.g. OPENAI_API_KEY |
Logging Configuration¶
| Option / Env Var | Default | Description |
|---|---|---|
--log-dirLINUX_MCP_LOG_DIR |
~/.local/share/linux-mcp-server/logs |
Directory for server logs |
--log-levelLINUX_MCP_LOG_LEVEL |
INFO |
Log verbosity: DEBUG, INFO, WARNING |
--log-retention-daysLINUX_MCP_LOG_RETENTION_DAYS |
10 |
Days to retain log files |
See Debug Logging for details on log formats and locations.
Examples¶
Specify SSH settings:
Configure log access:
Using environment variables in a client config: