Skip to main content
Glama
GreyNoise-Intelligence

greynoise-mcp-server

Official

gnql-stats

Retrieve aggregate statistics from GreyNoise GNQL queries to summarize IP classifications, tags, CVEs, and other threat facets.

Instructions

Get aggregate statistics for results matching a GreyNoise GNQL query.

GNQL (GreyNoise Query Language) is a domain-specific query language that uses Lucene deep under the hood.

Facets:

  • "ip" - The IP address of the scanning device IP

  • "classification" - Whether the device has been categorized as unknown, benign, or malicious

  • "first_seen" - The date the device was first observed by GreyNoise

  • "last_seen" - The date the device was most recently observed by GreyNoise

  • "actor" - The benign actor the device has been associated with, such as Shodan, Censys, GoogleBot, etc

  • "tags" - A list of the tags the device has been assigned over the past 90 days

  • "spoofable" - This IP address has been opportunistically scanning the Internet, however has failed to complete a full TCP connection. Any reported activity could be spoofed.

  • "vpn" - This IP is associated with a VPN service. Activity, malicious or otherwise, should not be attributed to the VPN service provider.

  • "vpn_service" - The VPN service the IP is associated with

  • "cve" - A list of CVEs that the device has been associated with

  • "bot" - If the IP is known to belong to a known BOT

  • "single_destination" - A boolean parameter that filters source country IPs that have only been observed in a single destination country

  • "metadata.category" - Whether the device belongs to a business, isp, hosting, education, or mobile network

  • "metadata.country" - The full name of the country the device is geographically located in (This is the same data as "metadata.source_country". "metadata.source_country" is preferred)

  • "metadata.country_code" - The two-character country code of the country the device is geographically located in (This is the same data as "metadata.source_country_code". "metadata.source_country_code" is preferred)

  • "metadata.sensor_hits" - The amount of unique data that has been recorded by the sensor

  • "metadata.sensor_count" - The number of sensors the IP Address has been observed on

  • "metadata.city" - The city the device is geographically located in

  • "metadata.region" - The region the device is geographically located in

  • "metadata.organization" - The organization that owns the network that the IP address belongs to

  • "metadata.rdns" - The reverse DNS pointer of the IP

  • "metadata.asn" - The autonomous system the IP address belongs to

  • "metadata.tor" - Whether or not the device is a known Tor exit node

  • "metadata.destination_country" - The full name where the GreyNoise sensor is physically located

  • "metadata.destination_country_code" - The country code where GreyNoise sensor is physically located

  • "metadata.source_country_code" - The two-character country code of the country the device is geographically located in

  • "metadata.source_country" - The full name of the country the device is geographically located in

  • "raw_data.scan.port" - The port number(s) the devices has been observed scanning

  • "raw_data.scan.protocol" - The protocol of the port the device has been observed scanning

  • "raw_data.web.paths" - Any HTTP paths the device has been observed crawling the Internet for

  • "raw_data.web.useragents" - Any HTTP user-agents the device has been observed using while crawling the Internet

  • "raw_data.ja3.fingerprint" - The JA3 TLS/SSL fingerprint

  • "raw_data.ja3.port" - The corresponding TCP port for the given JA3 fingerprint

  • "raw_data.hassh.fingerprint" - The HASSH fingerprint

  • "raw_data.hassh.port" - The corresponding TCP port for the given HASSH fingerprint

Behavior:

  • You can subtract facets by prefacing the query with a minus character

  • The data that this endpoint queries refreshes once per hour

Shortcuts:

  • You can find interesting hosts by using the GNQL query term "interesting"

  • You can use the keyword "today" in the "first_seen" and "last_seen" parameters: "last_seen:today" or "first_seen:today"

Examples:

  • "last_seen:today" - Returns all IPs scanning/crawling the Internet today

  • "tags:Mirai" - Returns all devices with the "Mirai" tag

  • "tags:"RDP Scanner"" - Returns all devices with the "RDP Scanner" tag

  • "classification:malicious metadata.country:Belgium" — Returns all compromised devices located in Belgium

  • "classification:malicious metadata.rdns:.gov" - Returns all compromised devices that include .gov in their reverse DNS records

  • "metadata.organization:Microsoft classification:malicious" — Returns all compromised devices that belong to Microsoft

  • "(raw_data.scan.port:445 and raw_data.scan.protocol:TCP) metadata.os:Windows*" - Return all devices scanning the Internet for port 445/TCP running Windows operating systems (Conficker/EternalBlue/WannaCry)

  • "raw_data.scan.port:554" - Returns all devices scanning the Internet for port 554

  • "-metadata.organization:Google raw_data.web.useragents:GoogleBot" — Returns all devices crawling the Internet with "GoogleBot" in their useragent from a network that does NOT belong to Google

  • "tags:"Siemens PLC Scanner" -classification:benign" - Returns all devices scanning the Internet for SCADA devices who ARE NOT tagged by GreyNoise as "benign" (Shodan/Project Sonar/Censys/Google/Bing/etc)

  • "classification:benign" - Returns all "good guys" scanning the Internet

  • "raw_data.ja3.fingerprint:795bc7ce13f60d61e9ac03611dd36d90" — Returns all devices crawling the Internet with a matching client JA3 TLS/SSL fingerprint

  • "raw_data.hassh.fingerprint:51cba57125523ce4b9db67714a90bf6e" — Returns all devices crawling the Internet with a matching client HASSH fingerprint

  • "raw_data.web.paths:"/HNAP1/"" -Returns all devices crawling the Internet for the HTTP path "/HNAP1/"

  • "8.0.0.0/8" - Returns all devices scanning the Internet from the CIDR block 8.0.0.0/8

  • "cve:CVE-2021-30461" - Returns all devices associated with the supplied CVE

  • "source_country:Iran" - Returns all results originating from Iran

  • "destination_country:Ukraine single_destination:true" — Returns all results scanning in only Ukraine

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesGNQL query string (e.g., 'classification:malicious last_seen:30d')
countNoNumber of top aggregate results to return (1-10000)
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses one behavioral trait: 'The data that this endpoint queries refreshes once per hour.' It also explains how to subtract facets with a minus character. However, it does not mention permission requirements, rate limits, or idempotency. Given the lack of annotations, this is adequate but not complete.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is excessively long (over 1000 words), listing 30+ facets in detail and including many examples. While front-loaded with the purpose, the bulk could be condensed or moved to external docs. It would be more usable if it were more concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of GNQL queries and the lack of an output schema, the description covers facets, query syntax, shortcuts, and many examples thoroughly. It is complete for understanding how to use the input parameters, though it does not describe the structure of the return value (aggregate statistics).

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with both parameters described. The description significantly adds value by explaining the GNQL query language, listing all available facets with detailed meanings, and providing numerous examples demonstrating queries. This goes far beyond the schema's minimal descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence clearly states the purpose: 'Get aggregate statistics for results matching a GreyNoise GNQL query.' It specifies a verb ('get'), a resource ('aggregate statistics'), and a condition ('matching a GNQL query'). This distinguishes it from siblings like 'gnql-query' (raw results) and 'gnql-timeseries' (time series).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides extensive context through examples, facet explanations, and behavioral notes (e.g., data refreshes hourly, subtracting facets). However, it does not explicitly state when to use this tool vs. alternatives like 'gnql-query' or 'gnql-timeseries', leaving that implicit. The examples do give practical usage guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/GreyNoise-Intelligence/greynoise-mcp-server'

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