bunny.net CDN and Shield

io.github.fullfatthings由 GitHub 帳號 fullfatthings 發布v1.0.1更新於 Nov 5, 2026

Debug bunny.net CDN pull zones and manage bunny Shield: WAF, rate limits, bot detection, event logs

發布方自己的服務:Bunny

概覽

AI 產生的概覽

非官方 MCP 伺服器,用來排查 bunny.net CDN 拉取區域,並管理 bunny Shield 的 WAF、速率限制、機器人偵測與事件日誌。

可以做什麼
  • 列出並檢視拉取區域,包含可讀的邊緣規則及快取、來源與安全設定
  • 讀取 CDN 統計資料與來源錯誤日誌以進行排查
  • 修改拉取區域設定、清除快取,並建立、啟停或刪除邊緣規則
  • 檢視 Shield WAF 設定、自訂規則、速率限制與機器人偵測,並附說明提示規則的實際效果
  • 依規則、IP 或指紋分組檢視最近 72 小時的 WAF 事件日誌
  • 建立、更新與刪除 WAF 規則和速率限制,並調整機器人偵測模式
適用情境
適合在維運 bunny.net CDN 網站時使用:讓助理診斷 502/504 來源錯誤、查看快取命中率、調整邊緣規則,或不必開控制台就能設定與測試 WAF 規則和速率限制。
執行需求
透過 npx 在本機執行,需要 Node.js 20 或更新版本。需在 BUNNY_API_KEY 環境變數提供 bunny.net 帳戶 API 金鑰。可選設定 BUNNY_READONLY=1 只註冊唯讀工具。需要連線至 bunny.net API 的網路存取。
安裝前請注意
此 API 金鑰擁有帳戶的完整存取權,應視為高價值機密。寫入類工具會變更線上 CDN 與 WAF 設定、清除快取,並永久刪除邊緣規則、WAF 規則與速率限制;可設定 BUNNY_READONLY=1 避免。更新工具也可能改動你未要求的設定。本專案為非官方專案,與 bunny.net 無關聯。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 bunny.net CDN and Shield,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

bunny-mcp

An MCP server for debugging bunny.net CDN sites and managing bunny Shield, the bunny.net web application firewall (WAF).

This is an unofficial project. It is not affiliated with or endorsed by bunny.net.

It covers pull zones (CDN sites), edge rules, cache purges, CDN statistics, origin error logs, and Shield: WAF settings, custom WAF rules, rate limits, bot detection and WAF event logs. It does not cover DNS, storage, Stream or edge scripts. For those, see anvme/bunnycdn-mcp or Digitizers/bunny-mcp.

What it does differently

  • Explains what rules will really do. get_shield_zone returns notes that warn, for example, when Block rules only log because the zone's WAF execution mode is Log.
  • Reads WAF event logs. shield_event_logs shows what the WAF blocked, challenged or logged in the last 72 hours, grouped by rule, IP, JA4 fingerprint and more.
  • Reports what changed. Update tools return a before-and-after diff. update_pull_zone also lists settings bunny.net changed that you did not ask for.
  • Keeps responses small. Pull zones, edge rules, origin errors and event logs are summarised. Pass detail: true for the raw response.
  • Hides credentials. Token authentication keys, AWS signing keys, TLS certificates and private keys, log forwarding tokens, and cookie or Authorization values in edge rule triggers are replaced with <hidden>, also in raw responses.

Requirements

  • Node.js 20 or later
  • A bunny.net account API key, from Account settings > API key in the bunny.net dashboard. This key gives full access to the account.

Install

Claude Code:

sh
claude mcp add bunny --env BUNNY_API_KEY=your-key -- npx -y @fullfatthings/bunny-mcp

Other MCP clients (for example Claude Desktop):

json
{  "mcpServers": {    "bunny": {      "command": "npx",      "args": ["-y", "@fullfatthings/bunny-mcp"],      "env": { "BUNNY_API_KEY": "your-key" }    }  }}

Configuration

VariableMeaning
BUNNY_API_KEYRequired. Your bunny.net account API key.
BUNNY_READONLYSet to 1 to register only the read tools. Write tools are then absent from the tool list, so the assistant cannot call them.

Tools

Read tools:

ToolPurpose
list_pull_zonesList pull zones with IDs, origins and hostnames.
get_pull_zoneOne pull zone: hostnames, readable edge rules, and caching, origin and security settings.
cdn_statisticsBandwidth, requests, cache hit rate and error responses.
origin_errorsFailed requests from bunny.net to your origin on one day, with counts by error.
get_shield_zoneWAF settings, custom rules, rate limits and bot detection, with notes.
shield_event_logsRequests the WAF blocked, challenged or logged in the last 72 hours.

Write tools (not registered when BUNNY_READONLY=1):

ToolPurpose
update_pull_zoneChange pull zone settings.
purge_cachePurge one URL or a whole pull zone.
save_edge_ruleCreate or update an edge rule.
set_edge_rule_enabledSwitch an edge rule on or off.
delete_edge_ruleDelete an edge rule.
update_shield_zoneChange WAF settings, including adding or removing single rule IDs from lists.
update_bot_detectionChange bot detection mode and sensitivity.
save_waf_ruleCreate or update a custom WAF rule.
save_rate_limitCreate or update a rate limit.
delete_shield_ruleDelete a custom WAF rule or rate limit.

To test a new WAF rule safely, save it with action Log, check shield_event_logs, then save it again with action Block.

Development

sh
npm installnpm test

To release, run npm version patch (or minor or major). It updates package.json and server.json, commits, tags and pushes; the tag starts a GitHub Action that publishes to npm and the MCP registry.

Licence

MIT. See LICENSE.

來源:README.md,提交 d68283b

工具

16

list_pull_zones

List bunny.net pull zones (CDN sites) with their IDs, origins and hostnames.

輸入參數pagesearchperPage

get_pull_zone

One pull zone: hostnames, edge rules as readable one-line summaries (Guid first) and the caching, origin and security settings that matter when debugging. Credentials (ZoneSecurityKey, AWS signing keys, cookie and Authorization trigger values) are left out. For other settings, pass `fields` with the raw names; `detail: true` returns the full raw object (about 10,000 tokens) with the same credentials hidden.

輸入參數detailfieldspull_zone_id必填

cdn_statistics

CDN statistics: bandwidth, requests, cache hit rate and, with load_errors, non-2xx responses. Defaults to the last 30 days across all pull zones.

輸入參數hourlydate_todate_fromload_errorspull_zone_id

update_pull_zone

Change pull zone settings and return what changed. Send only the fields to change, using the raw names (e.g. CacheControlMaxAgeOverride, UseStaleWhileOffline); read current values with get_pull_zone and `fields`. `alsoChanged` lists settings Bunny changed that were not requested. Edit edge rules with save_edge_rule, not here.

輸入參數fields必填pull_zone_id必填

purge_cache

Purge the CDN cache for one URL (wildcard * allowed at the end), or for a whole pull zone.

輸入參數urlcache_tagpull_zone_id

save_edge_rule

Create an edge rule, or update one by including its Guid (from get_pull_zone). Send the whole rule, not only changed fields; to switch a rule on or off use set_edge_rule_enabled. Fields: ActionType, ActionParameter1-3, Triggers [{Type, PatternMatches[], PatternMatchingType, Parameter1}], TriggerMatchingType, Description, Enabled, OrderIndex, ExtraActions [{ActionType, ActionParameter1-3}]. ActionType: 0 Force SSL, 1 Redirect, 2 Origin URL, 3 Override Cache Time, 4 Block Request, 5 Set Response Header, 6 Set Request Header, 7 Force Download, 8 Disable Token Authentication, 9 Enable Token Authentication, 10 Override Cache Time Public, 11 Ignore Query String, 12 Disable Optimizer, 13 Force Compression, 14 Set Status Code, 15 Bypass Perma-Cache, 16 Override Browser Cache Time, 17 Origin Storage, 18 Set Network Rate Limit, 19 Set Connection Limit, 20 Set Requests Per Second Limit, 21 Run Edge Script, 22 Origin Magic Containers, 23 Disable WAF, 24 Retry Origin, 25 Override Browser Cache Response Header, 26 Remove Browser Cache Response Header, 27 Disable Shield Challenge, 28 Disable Shield, 29 Disable Shield Bot Detection, 30 Bypass AWS S3 Authentication, 31 Disable Shield Access Lists, 32 Disable Shield Rate Limiting, 33 Enable Request Coalescing, 34 Disable Request Coalescing, 35 Use Load Balancer, 36 Force Load Balancer Sticky Session Mode, 37 Strip Cookies (Client to Origin). Trigger Type: 0 URL, 1 Request Header, 2 Response Header, 3 URL Extension, 4 Country Code, 5 Remote IP, 6 URL Query String, 7 Random Chance, 8 Status Code, 9 Request Method, 10 Cookie Value, 11 Country State Code, 12 Origin Retry Attempt Count, 13 Origin Connection Error. PatternMatchingType and TriggerMatchingType: 0 Match Any, 1 Match All, 2 Match None. Edge rules change CDN behaviour and log nothing; to block abusive traffic use a WAF rule (save_waf_rule), which can log first and records every match in shield_event_logs.

輸入參數rule必填pull_zone_id必填

set_edge_rule_enabled

Switch an edge rule on or off without resending the whole rule.

輸入參數guid必填enabled必填pull_zone_id必填

origin_errors

Bunny's log of failed requests to a pull zone's origin on one day: why each failed (e.g. http_timeout, http_request_failure, dns_lookup, network_socket_exception). Use it to confirm 502 or 504 errors from Bunny's side. Origin responses with an error status, such as a PHP-FPM 502, may not appear here. Returns counts and samples for one page of up to 200 entries. Which part of the day that page covers varies between calls, so check from and to; hasMoreData means other entries exist that this tool does not fetch.

輸入參數date必填detailpull_zone_id必填

delete_edge_rule

Permanently delete an edge rule. To switch one off but keep it, save it with Enabled: false instead.

輸入參數guid必填pull_zone_id必填

get_shield_zone

WAF (bunny Shield) state for a pull zone: zone settings (wafEnabled, wafExecutionMode, wafDisabledRules, wafLogOnlyRules, learningMode), custom WAF rules, rate limits and bot detection. Read `notes` first: it explains coded settings and warns when settings stop rules from acting.

輸入參數pull_zone_id必填

shield_event_logs

Requests the WAF blocked, challenged or logged for a pull zone. Only the last 72 hours are available. Use group_by to summarise, e.g. ["ruleId"], ["ja4"] or ["ip"]. Events can take a minute to appear, so wait at least a minute after a change before judging it.

輸入參數tofrom必填pagequerydetailgroup_bypage_sizepull_zone_id必填

update_shield_zone

Change WAF settings for a pull zone and return what changed. Fields use the names get_shield_zone returns: wafEnabled, wafExecutionMode (0 Log (no rule blocks, including custom Block rules), 1 Block), learningMode, wafDisabledRules, wafLogOnlyRules, dDoSShieldSensitivity and others. A list in `fields` replaces the whole list; to change part of a list use `add` or `remove`, e.g. add: {"wafDisabledRules": ["942100"]}.

輸入參數addfieldsremovepull_zone_id必填

update_bot_detection

Change bot detection for a pull zone and return what changed. executionMode: 0 LogOnly, 1 Challenge. requestIntegrity, ipAddress and browserFingerprint each take {sensitivity: 0 Off, 1 Low, 2 Medium, 3 High}; browserFingerprint also takes aggression and complexEnabled. Read the current values with get_shield_zone.

輸入參數ipAddresspull_zone_id必填executionModerequestIntegritybrowserFingerprint

save_waf_rule

Create a custom WAF rule (no rule_id) or update one (with rule_id; send the whole rule). To test a rule, save it with actionType 2 (Log), check shield_event_logs, then save it again with 1 (Block). Returns warnings when zone settings would stop the rule from acting.

輸入參數rule_idruleName必填pull_zone_id必填ruleDescriptionruleConfiguration必填

save_rate_limit

Create a rate limit (no rule_id) or update one (with rule_id). Fields: ruleName and ruleDescription (letters, numbers and spaces only) and ruleConfiguration. Copy the ruleConfiguration shape from an existing rate limit in get_shield_zone.

輸入參數rule_idruleName必填pull_zone_id必填ruleDescriptionruleConfiguration必填

delete_shield_rule

Permanently delete a custom WAF rule or a rate limit by its ID from get_shield_zone. To keep a WAF rule but stop it acting, save it with actionType 2 (Log) instead.

輸入參數kind必填rule_id必填

版本歷史

1
  1. v1.0.1最新Nov 4, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Bunny 整合