Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{}
resources
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
execute_command

[Command Execution] Execute a command in the specified shell (powershell, cmd, or gitbash)

Example usage (PowerShell):

{
  "shell": "powershell",
  "command": "Get-Process | Select-Object -First 5",
  "workingDir": "C:\\Users\\username"
}

Example usage with custom environment variables:

{
  "shell": "powershell",
  "command": "python -c \"print('Hello δΈ–η•Œ')\"",
  "env": {
    "PYTHONIOENCODING": "utf-8",
    "PYTHONUTF8": "1"
  }
}

Example usage (CMD):

{
  "shell": "cmd",
  "command": "dir /b",
  "workingDir": "C:\\Projects"
}

Example usage (Git Bash):

{
  "shell": "gitbash",
  "command": "ls -la",
  "workingDir": "/c/Users/username"
}
read_command_history

[Command Execution] Get the history of executed commands

Example usage:

{
  "limit": 5
}

Example response:

[
  {
    "command": "Get-Process",
    "output": "...",
    "timestamp": "2024-03-20T10:30:00Z",
    "exitCode": 0
  }
]
start_background_job

[Command Execution] Start a command as a background job

Example usage:

{
  "shell": "powershell",
  "command": "Start-Sleep -Seconds 30; Write-Output 'Done'",
  "timeout": 60
}

Returns job ID immediately. Use get_job_status to monitor progress.

get_job_status

[Command Execution] Get status and metadata for a background job

Example usage:

{
  "jobId": "job_1"
}

Returns job status, runtime, exit code, and output preview (first 500 chars).

get_job_output

[Command Execution] Get output from a background job with streaming support

Example usage:

{
  "jobId": "job_1",
  "offset": 0
}

Returns job output. Use offset to get only new output since last call (streaming).

execute_batch

[Command Execution] Execute multiple commands sequentially

Example usage:

{
  "shell": "powershell",
  "commands": [
    "cd C:\\project",
    "npm install",
    "npm run build"
  ],
  "stopOnError": true,
  "timeout": 300
}

Executes commands in order. If stopOnError=true, stops on first failure.

ssh_execute

[SSH Operations] Execute a command on a remote host via SSH

Example usage:

{
  "connectionId": "raspberry-pi",
  "command": "uname -a"
}

Configuration required in config.json:

{
  "ssh": {
    "enabled": true,
    "connections": {
      "raspberry-pi": {
        "host": "raspberrypi.local",
        "port": 22,
        "username": "pi",
        "password": "raspberry"
      }
    }
  }
}
ssh_disconnect

[SSH Operations] Disconnect from an SSH server

Example usage:

{
  "connectionId": "raspberry-pi"
}

Use this to cleanly close SSH connections when they're no longer needed.

create_ssh_connection

[SSH Operations] Create a new SSH connection

read_ssh_connections

[SSH Operations] Read all SSH connections

update_ssh_connection

[SSH Operations] Update an existing SSH connection

delete_ssh_connection

[SSH Operations] Delete an existing SSH connection

read_ssh_pool_status

[SSH Operations] Get the status and health of the SSH connection pool

validate_ssh_connection

[SSH Operations] Validate SSH connection configuration and test connectivity

sftp_upload

[SSH Operations] Upload file to remote host via SFTP

Example usage:

{
  "connectionId": "raspberry-pi",
  "localPath": "C:\\data\\file.txt",
  "remotePath": "/home/pi/file.txt"
}

Security: Validates local file exists. Remote path must be absolute.

sftp_download

[SSH Operations] Download file from remote host via SFTP

Example usage:

{
  "connectionId": "raspberry-pi",
  "remotePath": "/home/pi/file.txt",
  "localPath": "C:\\downloads\\file.txt"
}

Security: Local path must be absolute. Creates parent directories if needed.

sftp_list_directory

[SSH Operations] List files and directories on remote host via SFTP

Example usage:

{
  "connectionId": "raspberry-pi",
  "remotePath": "/home/pi",
  "pattern": "*.txt"
}

Security: Remote path must be absolute. Pattern supports glob wildcards.

sftp_delete

[SSH Operations] Delete file or directory on remote host via SFTP

Example usage:

{
  "connectionId": "raspberry-pi",
  "remotePath": "/home/pi/file.txt",
  "isDirectory": false
}

SECURITY WARNING: Deletion is permanent and cannot be undone. Remote path must be absolute. Set isDirectory=true to delete directories.

check_security_config

[Diagnostics] Get current security configuration including blocked commands, allowed paths, and restrictions. Use this to troubleshoot why commands are being blocked.

validate_command

[Diagnostics] Test if a command would be allowed without executing it (dry-run validation). Use this to troubleshoot security blocks before attempting execution.

explain_exit_code

[Diagnostics] Explain what an exit code means and how to resolve issues

validate_config

[Diagnostics] Validate configuration file and show how it merges with defaults

read_system_info

[Diagnostics] Get system information for troubleshooting

test_connection

[Diagnostics] Test shell connectivity and basic functionality

read_environment_variable

[Diagnostics] Read a single environment variable with security filtering

Example usage:

{
  "name": "PATH",
  "show_blocked_reason": true
}

Security:

  • Sensitive variables (API_KEY, PASSWORD, TOKEN, SECRET) are blocked

  • Case-insensitive variable name matching

  • Read-only access (no write operations)

list_environment_variables

[Diagnostics] List all accessible environment variables with optional filtering

Example usage:

{
  "filter": "^PATH|^TEMP",
  "show_blocked_count": true,
  "category": "system"
}

Security:

  • Sensitive variables (API keys, passwords) automatically excluded

  • Case-insensitive filtering

  • Read-only access

get_config_value

[Diagnostics] Get a specific configuration value by path (dot notation)

Example usage:

{
  "path": "security.maxCommandLength",
  "show_type": true
}

Examples:

  • "security.maxCommandLength"

  • "shells.powershell.enabled"

  • "ssh.strictHostKeyChecking"

reload_config

[Diagnostics] Validate configuration file and preview reload (server restart required)

Example usage:

{
  "validate_before": true
}

Note: This tool validates the config file. To apply changes, restart the MCP server.

dns_lookup

[Diagnostics] Perform DNS lookup for hostname

Example usage:

{
  "hostname": "google.com",
  "record_type": "A",
  "timeout": 5000
}

Supported record types: A, AAAA, MX, TXT, NS, CNAME, ALL

test_connectivity

[Diagnostics] Test network connectivity to host and port

Example usage:

{
  "host": "google.com",
  "port": 443,
  "timeout": 5000
}

Security: Blocks connections to private IPs, localhost, and cloud metadata endpoints.

read_current_directory

[System Info] Get the current working directory

get_cpu_usage

[System Info] Get CPU usage percentage with configurable sampling interval

Example usage:

{
  "interval": 1000
}

Returns CPU usage percentage measured over the interval (default: 1 second).

get_disk_space

[System Info] Get disk space information for all drives or specific drive

Example usage:

{
  "drive": "C",
  "unit": "GB"
}

Returns disk space info (total, used, free) in specified units.

list_processes

[System Info] List running processes (requires opt-in configuration)

Example usage:

{
  "filter": "chrome",
  "limit": 10,
  "sort_by": "cpu"
}

SECURITY: This tool is disabled by default. Process enumeration can be used for reconnaissance. To enable, add to config.json: { "security": { "allowProcessListing": true } }

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription
Current Working DirectoryThe current working directory of the CLI server
SSH ConfigurationAll SSH connection configurations
CLI Server ConfigurationMain CLI server configuration (excluding sensitive data)
Security Validation RulesComplete security validation rules including blocked commands, arguments, operators, and path restrictions
Command History SummarySummary of recent command executions with statistics and patterns
SSH Connection Pool StatusActive SSH connections, pool statistics, and connection health
Background JobsStatus of all background command execution jobs

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/quanticsoul4772/mcp-server-win-cli'

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