Skip to main content
Glama

cloudarmor-mcp

English | 日本語

MCP server for Google Cloud Armor WAF log patrol — deny summaries per rule, home-region false-positive checks, and preview (dry-run) rule review, straight from Cloud Logging.

Built for a daily "is the WAF healthy?" patrol: one daily_brief call answers what did we block, did we block anyone we shouldn't have, and are the preview rules ready to promote.

Documentation: https://shigechika.github.io/cloudarmor-mcp/

Tools

Tool

Purpose

daily_brief

One-call morning summary: enforced DENYs by rule priority, home-region false-positive lens, preview DENYs

enforce_denies

Enforced DENY counts per rule priority

home_region_denies

Enforced DENYs whose source IP geolocates to your home region — anything not marked known-normal is a false-positive candidate

preview_denies

Preview (dry-run) DENY counts — a quiet preview rule is a promotion candidate

health_check

Version, config presence, and a minimal Cloud Logging probe

All tools are read-only. Counts are hard-capped (default 2000 entries per query) and a capped result is reported as >= N (capped), never as an exact total.

Related MCP server: gke-cred-audit

Setup

1. Least-privilege service account

Create a service account with roles/logging.viewer only and download a key. Unlike human accounts, service accounts are not subject to organization re-authentication policies, so an unattended patrol never silently expires.

gcloud iam service-accounts create waf-log-viewer --project=YOUR_PROJECT
gcloud projects add-iam-policy-binding YOUR_PROJECT \
  --member=serviceAccount:waf-log-viewer@YOUR_PROJECT.iam.gserviceaccount.com \
  --role=roles/logging.viewer
gcloud iam service-accounts keys create key.json \
  --iam-account=waf-log-viewer@YOUR_PROJECT.iam.gserviceaccount.com

2. Install

pip install cloudarmor-mcp
# or
uv tool install cloudarmor-mcp

3. Environment variables

Variable

Required

Meaning

CLOUDARMOR_PROJECT

yes

GCP project ID that receives the load-balancer logs

GOOGLE_APPLICATION_CREDENTIALS

yes

Path to the service-account key file

CLOUDARMOR_BACKEND_SERVICES

no

Comma-separated backend service names to filter (default: all)

CLOUDARMOR_HOME_REGION

no

ISO region code treated as home traffic, e.g. JP. Enables the false-positive lens

CLOUDARMOR_RULES_INI

no

Path to a rules INI (labels + known-normal priorities, see below)

CLOUDARMOR_MAX_ENTRIES

no

Max entries fetched per query (default 2000)

4. Optional rules INI

Keep your rule numbering out of prompts and give the reports human-readable labels:

[rules]
101 = block non-home deep-path crawlers
500 = AutoDiscover probe block
1002 = OWASP LFI protection

[home]
; home-region DENYs on these priorities are expected, not false positives
known_normal_priorities = 500, 600

5. Claude Code (plugin)

This repository doubles as a single-plugin marketplace, so Claude Code can install the server for you:

/plugin marketplace add shigechika/cloudarmor-mcp
/plugin install cloudarmor-mcp@cloudarmor-mcp

The plugin launches uvx cloudarmor-mcp and reads the same environment variables described in Environment variables above; export them before starting Claude Code. GOOGLE_APPLICATION_CREDENTIALS still has to point at a service-account key file that exists on your own machine — the plugin can't ship or fetch that file for you, so this server can't be fully configured through the plugin's own settings alone.

uvx must be on the PATH of the process that runs Claude Code — a login shell usually has it, but a GUI-launched app may not; install uv system-wide if the plugin fails to start.

6. Claude Code (manual)

claude mcp add cloudarmor -- cloudarmor-mcp

with the environment variables above in the server's env.

CLI

cloudarmor-mcp --version   # print version
cloudarmor-mcp --check     # config + API probe (exit 0 when healthy)
cloudarmor-mcp --brief     # print daily_brief to stdout (cron / smoke tests)

Reading the report

  • Enforced DENY by rule — your normal blocking volume. Sudden shifts in the mix are worth a look.

  • Home-region DENY — requests from your own country/region that were blocked. Legitimate users and legitimate crawlers being denied show up here; scanner traffic that happens to originate locally will too, so the known_normal_priorities list keeps expected rules (e.g. an AutoDiscover block) out of the suspicious list.

  • Preview DENY — rules in dry-run. A preview rule that stays free of home-region hits over time is a candidate for promotion to enforce.

License

MIT

Available Tools

5 tools
daily_briefB

Morning patrol summary: enforced DENYs by rule, home-region

false-positive check, and preview DENYs, in one call.

ParametersJSON Schema
NameRequiredDescriptionDefault
since_hoursNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.4/5.0
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. The words 'summary', 'check', and 'preview' strongly imply a read-only, non-destructive operation, which is useful behavioral context. However, it does not explicitly state side effects, authentication requirements, or return format. The description adds context beyond the name but lacks a clear safety declaration.

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

Conciseness5/5

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

The description is a single sentence that is concise, front-loaded, and free of fluff. It efficiently lists the three components of the brief, making every word earn its place. This is an excellent example of brevity without sacrificing meaning.

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 that the tool has an output schema and only one optional parameter, the description covers the core purpose well. The main gap is the undocumented 'since_hours' parameter, but the schema's default and the simple nature of the tool partially mitigate this. The description is complete enough for a low-complexity tool with an output schema.

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

Parameters2/5

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

The schema describes one parameter, 'since_hours', with a default of 26, but the description does not mention it at all. Schema description coverage is 0%, so the description must compensate, but it fails to explain what 'since_hours' represents or how it affects the brief. The parameter name suggests a time window, but this is not linked to the 'morning patrol' context.

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

Purpose4/5

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

The description clearly states the tool provides a 'Morning patrol summary' covering three specific components: enforced DENYs by rule, home-region false-positive check, and preview DENYs. This distinguishes it from sibling tools like enforce_denies, preview_denies, and home_region_denies, which are individual operations. The verb is implied ('summary') rather than explicit, but the scope and content are unambiguous.

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

Usage Guidelines3/5

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

The phrase 'Morning patrol summary' implies use for a routine daily check, and 'in one call' suggests it consolidates multiple separate operations. However, there is no explicit guidance on when to use this tool versus the sibling alternatives, nor when not to use it. The context is clear but not explicit about exclusions or alternatives.

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

enforce_deniesD

Enforced DENY counts per Cloud Armor rule priority over the window.

ParametersJSON Schema
NameRequiredDescriptionDefault
since_hoursNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

D1.8/5.0
Behavior2/5

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

No annotations are present, so the description carries the full burden of behavioral disclosure. It only states what is counted without explaining whether this is a read-only operation, how the 'window' is defined, or what 'Enforced' means in contrast to preview.

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 a single short phrase, but it is under-specified rather than concise. It omits critical context needed to invoke the tool correctly, so the brevity is not a strength.

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

Completeness1/5

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

Despite having only one parameter and an output schema, the description is too sparse to provide a complete picture of the tool's behavior. It does not clarify key terms like 'window' or 'Enforced', making it inadequate for confident tool selection and invocation.

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

Parameters1/5

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

The schema has one parameter (since_hours) with 0% description coverage, and the description does not mention it at all. The meaning and effect of the parameter are completely unexplained.

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

Purpose3/5

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

The description mentions the resource (Cloud Armor rule priority) and metric (enforced DENY counts), but lacks a clear verb and the phrase 'over the window' is ambiguous. It distinguishes from sibling 'preview_denies' via the word 'Enforced', but not explicitly.

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

Usage Guidelines1/5

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

No guidance is provided on when to use this tool versus alternatives like preview_denies or health_check. There is no mention of appropriate use cases, exclusions, or conditions for selection.

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

health_checkA

Service health: version, config presence and a minimal API probe.

Returns a fixed shape (status/service/version + backend fields) so a monitoring caller never has to branch on missing keys. status is "healthy" when the config loads and a 1-entry probe query succeeds, "degraded" when config loads but the probe fails, "error" when the config itself is unusable.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.5/5.0
Behavior4/5

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

Without annotations, the description fully explains the behavior by defining the three possible statuses (healthy, degraded, error) and their conditions. It also discloses that the response has a fixed shape, which is valuable for callers.

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

Conciseness5/5

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

The description is two focused sentences, front-loaded with the tool's purpose, and every sentence adds behavioral value. It is concise without being under-specified.

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

Completeness5/5

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

For a zero-parameter health check with no output schema, the description fully covers purpose, behavior, and return shape. It gives a complete picture for an agent to invoke and interpret the tool correctly.

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

Parameters4/5

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

This tool has zero parameters, so the schema already provides complete coverage. The description adds no parameter details, but none are needed; the baseline of 4 is appropriate.

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 description clearly states this is a service health check that reports version, config presence, and a minimal API probe. It identifies the exact resource and action, and is distinctly different from sibling tools like enforce_denies or daily_brief.

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?

It provides clear context by mentioning a 'monitoring caller' and explains why the fixed shape is beneficial (no branching on missing keys). However, it does not explicitly state when not to use this tool or name alternative tools.

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

home_region_deniesA

Enforced DENYs whose source IP geolocates to the home region.

This is the false-positive lens: home-region users being denied on a priority that is not marked known-normal deserves review. Requires CLOUDARMOR_HOME_REGION.

ParametersJSON Schema
NameRequiredDescriptionDefault
since_hoursNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description must carry the transparency burden. It discloses a prerequisite (CLOUDARMOR_HOME_REGION) and implies a read-only review operation, but it does not explicitly state that no changes are made or describe the output shape beyond the output schema.

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

Conciseness5/5

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

The description is two sentences long, front-loaded with the primary action, and the second sentence provides valuable context. There is no filler or repetition, making it highly efficient.

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?

The tool is simple, has an output schema, and the description covers purpose and usage context well. However, it omits any explanation of the since_hours parameter and the concept of 'known-normal', which are relevant to effective use.

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

Parameters2/5

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

The schema has one parameter (since_hours) with no description, and the description never mentions it. Since schema coverage is 0%, the description should compensate, but it doesn't, leaving the parameter's role and default behavior undocumented.

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 description states exactly what the tool does: it lists enforced DENYs whose source IP geolocates to the home region, framing it as a false-positive lens. This is a specific verb-resource combination that clearly distinguishes it from siblings like enforce_denies or preview_denies.

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 gives clear usage context: use this when reviewing home-region users being denied on a priority not marked known-normal. It does not explicitly name alternatives or when-not-to-use, but the context is sufficient for most agents.

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

preview_deniesA

Preview (dry-run) DENY counts per rule priority over the window.

A preview rule that stays free of false positives is a candidate for promotion to enforce.

ParametersJSON Schema
NameRequiredDescriptionDefault
since_hoursNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations provided, the description carries the transparency burden. The term 'dry-run' clearly communicates non-destructive behavior, and the false-positive evaluation context adds behavioral insight. It could explicitly state no changes are made, but the meaning is clear.

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

Conciseness5/5

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

Two concise sentences that front-load the core purpose. The second sentence adds context without fluff. No wasted words.

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 tool's simplicity (one optional param, output schema present), the description covers the purpose and use case well. The main gap is the lack of explicit mapping from 'window' to since_hours, and some domain terms like 'rule priority' are undefined, but overall it is sufficient.

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

Parameters2/5

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

Schema coverage is 0%, and the description does not explain the since_hours parameter or its relationship to the 'window'. The parameter name is self-explanatory, but the description adds no parameter-specific meaning, so it does not compensate for the lack of schema description.

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 description clearly states the tool's function with specific verb 'Preview' and resource 'DENY counts per rule priority over the window'. It distinguishes itself from the sibling enforce_denies by explicitly labeling itself as a dry-run and mentioning promotion to enforce.

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 implies a clear use case: preview rules to evaluate false positives before promoting to enforce. However, it does not explicitly mention alternatives or state when not to use, so it falls short of a 5.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 5 tool updatesv0.1.0
    • First observeddaily_brief
    • First observedenforce_denies
    • First observedhealth_check
    • First observedhome_region_denies
    • First observedpreview_denies

TDQS

B3.1/5.0
Disambiguation4/5

health_check is clearly distinct. enforce_denies vs preview_denies are differentiated by mode. home_region_denies is a specialized subset of enforced denies, which could be confused with enforce_denies, but the description clarifies its specific lens. daily_brief aggregates the others, but its purpose as a combined summary is evident from the description.

Naming Consistency3/5

Tool names mix conventions: verb_noun (enforce_denies, preview_denies), noun_verb (health_check), noun_noun (home_region_denies), and adjective_noun (daily_brief). While all are snake_case, the inconsistent verb/noun order and variable parts of speech make naming less predictable.

Tool Count5/5

5 tools is an appropriate scope for a specialized Cloud Armor deny analytics server. The count is neither too sparse to cover the core workflow nor bloated with redundant functionality, and each tool serves a distinct purpose within the defined domain.

Completeness3/5

The tools cover deny counts (enforced and preview), home-region analysis, and a summary brief, which addresses the primary monitoring workflow. However, there are notable gaps: no way to list or retrieve rule details to map priorities to rule names, and no allow-count or total-traffic metrics. These omissions could require agents to work around the lack of context when analyzing denies.

Maintenance

ActivityMaintained
ResponsivenessResponsive

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

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/shigechika/cloudarmor-mcp'

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