MQL

May 10, 2026 · View on GitHub

mql light-mode logo mql dark-mode logo

Open source, cloud-native asset inventory and discovery

MQL is a cloud-native tool for querying your entire infrastructure. Built upon Mondoo's security data fabric, it answers thousands of questions about your infrastructure and integrates with over 1,300 resources across cloud accounts, Kubernetes, containers, services, VMs, APIs, and more.

MQL run example

Here are a few more examples:

# run a query and print the output
mql run -c "ports.listening { port process }"

# open an interactive shell to an aws account
mql shell aws
> aws.ec2.instances{*}

:books: To learn more, read the MQL docs.

Installation

Install mql with our installation script:

Linux and macOS

bash -c "$(curl -sSL https://install.mondoo.com/sh)"

Windows

Set-ExecutionPolicy Unrestricted -Scope Process -Force;
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072;
iex ((New-Object System.Net.WebClient).DownloadString('https://install.mondoo.com/ps1'));
Install-Mondoo;

If you prefer manual installation, you can find the mql packages in our GitHub releases.

Interactive shell

The easiest way to explore MQL is to use our interactive shell, which has auto-complete to guide you:

mql shell

Once inside the shell, you can enter MQL queries like this:

> asset { name title }

To learn more, use the help command.

To exit, either press CTRL + D or type exit.

You can run the shell against local and remote targets like k8s, aws, docker, and many more. Run --help to see a full list of supported providers.

Run simple queries

To run standalone queries in your shell, use the run command:

mql run <TARGET> -c <QUERY>

For example, this runs a query against your local system:

mql run -c "services { name running }"

For automation, it is often helpful to convert the output to JSON. Use -j or --json:

mql run local -c "services { * }" -j

You can then pipe the output to jq or other applications.

Explore your infrastructure in Mondoo Platform​

To more easily explore your infrastructure, sign up for a Mondoo Platform account. Mondoo's web-based console allows you to navigate, search, and arrange all of your assets.

To get started, contact us.

To learn about Mondoo Platform, read the Mondoo Platform docs or visit mondoo.com.

Supported targets

TargetProviderExample
Active Directoryactivedirectorymql shell activedirectory --dc DC_HOST --user admin@corp.local --password PASSWORD
AI/MCP serversmcpmql shell mcp http http://localhost:8080/mcp
Ansible playbooksansiblemql shell ansible YOUR_PLAYBOOK.yml
Arista network devicesaristamql shell arista DEVICE_PUBLIC_IP --ask-pass
Atlassian organizationsatlassianmql shell atlassian --host YOUR_HOST_URL --admin-token YOUR_TOKEN
AWS accountsawsmql shell aws
AWS CloudFormation templatescloudformationmql shell cloudformation cloudformation_file.json
AWS EC2 EBS snapshotaws ec2 ebs snapshotmql shell aws ec2 ebs snapshot SNAPSHOTID
AWS EC2 EBS volumeaws ec2 ebs volumemql shell aws ec2 ebs volume VOLUMEID
AWS EC2 Instance Connectaws ec2 instance-connectmql shell aws ec2 instance-connect ec2-user@INSTANCEID
AWS EC2 instancessshmql shell ssh user@host
Cisco network devicesnd-sshmql shell nd-ssh admin@DEVICE_IP --password PASSWORD
Cisco Catalyst Centerciscocatalystmql shell ciscocatalyst --host HOST --user USER --password PASSWORD
Cloudflare accountscloudflaremql shell cloudflare --token ACCESS_TOKEN
Confluence usersatlassianmql shell atlassian --host YOUR_HOST_URL --admin-token YOUR_TOKEN
Container imagescontainer, dockermql shell container ubuntu:latest
Container registriescontainer registrymql shell container registry index.docker.io/library/rockylinux:8
Dockerfilesdockermql shell docker file FILENAME
DNS recordshostmql shell host mondoo.com
F5 BIG-IP load balancersbigipmql shell bigip --hostname HOST --user USER --password PASSWORD
Fortinet FortiOS devicesfortiosmql shell fortios --hostname HOSTNAME --token TOKEN
GitHub organizationsgithub orgmql shell github org mondoohq
GitHub repositoriesgithub repomql shell github repo mondoohq/mql
GitLab groupsgitlabmql shell gitlab --group mondoohq
Google Cloud projectsgcpmql shell gcp
Google Workspacegoogle-workspacemql shell google-workspace --customer-id CUSTOMER_ID --impersonated-user-email EMAIL --credentials-path JSON_FILE
Grafana organizationsgrafanamql shell grafana --url https://myorg.grafana.net --token TOKEN
Hetzner Cloud projectshetznermql shell hetzner --token API_TOKEN
OPC UA IoT devicesopcuamql shell opcua
IP address informationipinfomql shell ipinfo
IPMI-enabled devicesipmimql shell ipmi user@HOST
Jira projectsatlassianmql shell atlassian --host YOUR_HOST_URL --admin-token YOUR_TOKEN
Juniper Junos devicesjunosmql shell junos --hostname DEVICE_IP --username admin --password PASSWORD
Kubernetes cluster nodeslocal, sshmql shell ssh user@host
Kubernetes clustersk8smql shell k8s
Kubernetes manifestsk8smql shell k8s manifest.yaml
Kubernetes workloadsk8smql shell k8s --discover pods,deployments
Linux hostslocal, sshmql shell local or

mql shell ssh user@host
macOS hostslocal, sshmql shell local or

mql shell ssh user@IP_ADDRESS
Microsoft 365 tenantsms365mql shell ms365 --tenant-id TENANT_ID --client-id CLIENT_ID --certificate-path PFX_FILE
Microsoft Azure instancessshmql shell ssh user@host
Microsoft Azure subscriptionsazuremql shell azure --subscription SUBSCRIPTION_ID
Network scanningnmapmql shell nmap --networks 192.168.1.0/24
Okta orgoktamql shell okta --token TOKEN --organization ORGANIZATION
Oracle Cloud Interface (OCI)ocimql shell oci
OpenStack projectopenstackmql shell openstack --cloud CLOUD_NAME or

mql shell openstack --auth-url AUTH_URL --username USER --password PASSWORD --project-name PROJECT
Proxmox VEproxmoxmql shell proxmox --host HOST --token TOKEN
Palo Alto Networks PAN-OSpanosmql shell panos --hostname DEVICE_IP --username admin --password PASSWORD
Running containersdockermql shell docker CONTAINER_ID
Shodan search engineshodanmql shell shodan
Slack teamslackmql shell slack --token TOKEN
Snowflake data warehousesnowflakemql shell snowflake --account ACCOUNT_ID --region REGION --user USER --role ROLE --ask-pass
SSL certificates on websiteshostmql shell host mondoo.com
Tailscale networktailscalemql shell tailscale --token ACCESS_TOKEN
Terraform HCLterraformmql shell terraform HCL_FILE_OR_PATH
Terraform planterraform planmql shell terraform plan plan.json
Terraform stateterraform statemql shell terraform state state.json
UniFi network controllersunifimql shell unifi --hostname HOST --api-key YOUR_API_KEY
Vagrant virtual machinesvagrantmql shell vagrant HOST
vLLM inference serversvllmmql shell vllm http://localhost:8000
VMware Cloud Directorvcdmql shell vcd user@domain@host --ask-pass
VMware vSpherevspheremql shell vsphere user@domain@host --ask-pass
Windows hostslocal, ssh, winrmmql shell local,

mql shell ssh Administrator@IP_ADDRESS --ask-pass or

mql shell winrm Administrator@IP_ADDRESS --ask-pass
YARA rule scanningyaramql run local -c "yara.scan('/path/to/rules.yar').result"

What's next?

There are so many things MQL can do! Gather information about your infrastructure, find tool-sprawl across systems, run incident response, and share data with auditors… MQL is nearly limitless in capabilities.

Explore:

Join the community!

Our goal is to become the API for your entire infrastructure. Join our community today and let's grow it together!

Development

See our development documentation for information on building and contributing to MQL.

  • Copyright: 2018-2026, Mondoo, Inc.
  • License: BUSL 1.1
  • Authors: Christoph Hartmann, Dominik Richter