Skip to main content
Glama
andresthor

Command-Line MCP Server

by andresthor

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
CMD_LINE_MCP_COMMANDS_READNoComma-separated list of read commands to add to the defaults
CMD_LINE_MCP_COMMANDS_WRITENoComma-separated list of write commands to add to the defaults
CMD_LINE_MCP_COMMANDS_SYSTEMNoComma-separated list of system commands to add to the defaults
CMD_LINE_MCP_COMMANDS_BLOCKEDNoComma-separated list of blocked commands to add to the defaults
CMD_LINE_MCP_SECURITY_REQUIRE_SESSION_IDNoWhether to require a session ID for commands
CMD_LINE_MCP_SECURITY_WHITELISTED_DIRECTORIESNoComma-separated list of directories that can be accessed without approval
CMD_LINE_MCP_SECURITY_ALLOW_COMMAND_SEPARATORSNoWhether to allow command chaining with separators like |, ;, &
CMD_LINE_MCP_SECURITY_AUTO_APPROVE_DIRECTORIES_IN_DESKTOP_MODENoWhether to automatically approve directories when using Claude Desktop

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
execute_command

Execute a Unix/macOS terminal command.

Args: command: The command to execute session_id: Optional session ID for permission management

Returns: A dictionary with command output and status

execute_read_command

Execute a read-only Unix/macOS terminal command (ls, cat, grep, etc.).

Args: command: The read-only command to execute session_id: Optional session ID for permission management

Returns: A dictionary with command output and status

list_available_commands

List all available commands by category.

Returns: A dictionary with commands grouped by category

get_command_help

Get detailed help about command capabilities and usage.

This tool provides comprehensive information about:

  • Supported commands in each category (read, write, system)

  • Blocked commands for security reasons

  • Command chaining capabilities (pipes, semicolons, ampersands)

  • Usage restrictions and examples

Returns: A dictionary with detailed information about command capabilities and usage

approve_command_type

Approve a command type for the current session.

Args: command_type: The command type to approve (read, write, system) session_id: The session ID remember: Whether to remember this approval for the session

Returns: A dictionary with approval status

approve_directory

Approve access to a directory for the current session.

Args: directory: The directory to approve access to session_id: The session ID remember: Whether to remember this approval for the session

Returns: A dictionary with approval status

list_directories

List all whitelisted and approved directories.

Args: session_id: Optional session ID to get session-specific approvals

Returns: A dictionary with globally whitelisted and session-approved directories

get_configuration

Get the current configuration settings.

Returns: The current configuration settings

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/andresthor/cmd-line-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server