Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

Connects Claude Desktop to FortiGate firewalls via REST API for read-only config inspection and safe write operations with dry-run confirmation.

README.md

FortiGate MCP Server (Safe Write Capable)

Write tools are dry-run by default and require explicit environment and per-call confirmation. See SAFE_WRITE_MODE.md.

MCP Server สำหรับให้ Claude Desktop เชื่อมต่อกับ FortiGate ผ่าน REST API ใช้ได้เฉพาะอ่าน config (read-only) ปลอดภัย ไม่สามารถแก้ไขได้

✨ Features

  • 🔐 Read-only — แม้ token หลุดก็แก้ config ไม่ได้
  • 🐳 Docker — isolated environment
  • 📡 stdio transport — ไม่ต้องเปิด port
  • 🛡️ Trusted host enforcement บน FortiGate

🛠️ Tools ที่ใช้ได้

| Tool | หน้าที่ | |---|---| | fortigate_get_system_status | ดู firmware version, hostname, etc. | | fortigate_list_address_groups | ดูรายชื่อ address group ทั้งหมด | | fortigate_get_address_group | ดู member ใน group | | fortigate_list_addresses | ดูรายชื่อ address object | | fortigate_get_address | ดู IP จริงของ address object | | fortigate_list_policies | ดู policy ทั้งหมด | | fortigate_get_policy | ดู policy ตัวเดียวละเอียด | | fortigate_list_webfilter_profiles | ดู web filter profile | | fortigate_get_webfilter_profile | ดู URL allow/block ใน profile | | fortigate_list_services | ดู custom service | | fortigate_create_policy | Safely create firewall policy, dry-run by default | | fortigate_update_policy | Safely update firewall policy after reading current state |

📦 Setup

1. Clone/copy โปรเจกต์ลงเครื่อง

วาง folder fortigate-mcp ไว้ที่ไหนก็ได้ เช่น:

  • Windows: C:\mcp\fortigate-mcp
  • Mac/Linux: ~/mcp/fortigate-mcp

2. ตั้งค่า .env

cp .env.example .env

แก้ .env:

FORTIGATE_HOST=172.16.1.X        # IP ของ FortiGate
FORTIGATE_TOKEN=xxxxxxxxxxxx     # token จาก REST API admin
FORTIGATE_VERIFY_SSL=false       # true ถ้ามี valid cert
FORTIGATE_TIMEOUT=10000

3. Build Docker image

cd fortigate-mcp
docker compose build

4. ทดสอบ container ทำงาน

# ทดสอบ run แบบ interactive (Ctrl+C เพื่อออก)
docker compose run --rm fortigate-mcp

ถ้าเห็น log: `` [FortiGate MCP] Server running on stdio [FortiGate MCP] Connected to: 172.16.1.X [FortiGate MCP] Mode: READ-ONLY ``

แสดงว่า container ทำงานได้ ✅

หมายเหตุ: server จะรอ MCP protocol input จาก stdin — ถ้าไม่มี input ก็ปกติ Ctrl+C ปิดได้เลย

5. Register กับ Claude Desktop

แก้ไฟล์ config ของ Claude Desktop:

Windows: %APPDATA%\Claude\claude_desktop_config.json Mac: ~/Library/Application Support/Claude/claude_desktop_config.json

เพิ่ม mcpServers:

{
  "mcpServers": {
    "fortigate": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "--env-file",
        "C:\\path\\to\\fortigate-mcp\\.env",
        "fortigate-mcp:latest"
      ]
    }
  }
}

⚠️ Windows: ใช้ \\ แทน \ ในเส้นทางไฟล์ Mac/Linux: ใช้ /path/to/fortigate-mcp/.env

6. Restart Claude Desktop

ปิดเปิด Claude Desktop ใหม่ทั้งหมด (ไม่ใช่แค่ปิดหน้าต่าง — quit จาก system tray)

7. ทดสอบ

ถาม Claude ว่า: > "ลอง fortigate_get_system_status FortiGate ของฉันหน่อย"

ถ้าได้ข้อมูล hostname ETTFAC กลับมา = สำเร็จ! 🎉

🔍 ตัวอย่างคำถาม

  • "ip068 อยู่ใน address group ไหนบ้าง?"
  • "Web filter profile 'Only Use AI' allow domain อะไรบ้าง?"
  • "Custom service 'Everest_default' ใช้ port อะไร?"
  • "policy ไหนที่ใช้ source 'Wifi'?"

🛡️ Security Notes

  • ✅ Token เก็บใน .env ไม่ถูก commit (มี .gitignore)
  • ✅ Container รันด้วย non-root user
  • ✅ Trusted host enforcement บน FortiGate
  • ✅ Read-only profile บน FortiGate (defense in depth)
  • ⚠️ อย่า commit .env ลง git
  • ⚠️ อย่า share token กับใคร (รวมถึงในแชต Claude)

🐛 Troubleshooting

Error: connect ECONNREFUSED

  • เช็คว่า FortiGate IP ถูกต้องใน .env
  • เช็คว่าเครื่องที่รัน Docker เข้าถึง FortiGate ได้ (ลอง ping)

FortiGate API error (401)

  • Token ผิด หรือ expire — regenerate ใหม่ที่ FortiGate

FortiGate API error (403)

  • Trusted host ไม่ตรง — เช็ค IP ของเครื่องที่รัน Docker
  • Container อาจใช้ IP ต่างจาก host (ลอง network_mode: host ใน docker-compose)

Claude Desktop ไม่เห็น tool

  • เช็คว่า restart Claude Desktop แล้วจริงหรือยัง (quit จาก tray)
  • เช็ค path ใน claude_desktop_config.json ถูกต้อง
  • ดู log ที่ %APPDATA%\Claude\logs\ (Windows)

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Other servers.