Skip to content

v1.1.0

Latest

Choose a tag to compare

@github-actions github-actions released this 27 May 15:04
4dabf36

Added

  • Optional Bearer auth on the HTTP /mcp endpoint — set MCP_API_KEY=<key> and every request must include Authorization: Bearer <key> (timing-safe compare). Missing/wrong tokens get 401 with a WWW-Authenticate: Bearer realm="mcp" header. /health stays open for health-checkers. Unset = open endpoint (preserves current behavior). HTTP transport only — stdio is single-process and unaffected. (#11) — thanks @kb1isz for the request.
  • Per-client FortiManager token passthrough — set MCP_TOKEN_PASSTHROUGH=true and each MCP client can supply its own FortiManager admin token via the X-FMG-Token header. That token is used (instead of FMG_API_TOKEN) for live API calls made by the execute tool for that request only, so FortiManager's own admin-profile RBAC enforces per-user permissions. Requests without the header fall back to FMG_API_TOKEN, so existing single-tenant deployments keep working unchanged. HTTP transport only. (#11)
  • FmgClient.rawRequest(method, params, opts?: { tokenOverride }) — new optional per-call token override threaded through CodeExecutor.execute(code, opts?: { fmgToken }). The shared FmgClient (and its undici dispatcher) is reused across requests; only the Authorization header is swapped per call.
  • 18 new tests across config / client / code-executor / HTTP transport covering the auth gate, passthrough, fallback, and combined modes (total 90).

Changed

  • HTTP transport's serverFactory now receives an McpRequestContext (currently exposing fmgToken) instead of being called with no arguments. The stdio path is unchanged.
  • startHttpTransport now removes its installed SIGINT / SIGTERM listeners when close() is called, so repeated test runs no longer leak signal handlers on the host process.

Full Changelog: https://github.com/jmpijll/fortimanager-code-mode-mcp/compare/...

Note: This server requires locally-generated API spec files. See README for setup instructions.