Stu Mason
Stu Mason

Activity

Pull Request Merged

PR #167 merged: feat: add --header flag for custom HTTP headers

Summary

  • Adds --header CLI flag to inject custom HTTP headers on all API requests
  • Multiple --header flags can be specified (e.g., --header "CF-Access-Client-Id: value" --header "CF-Access-Client-Secret: value")
  • Headers are applied to all outgoing requests alongside the existing Authorization: Bearer header
  • Useful for Cloudflare Zero Trust, custom auth proxies, and other middleware that requires additional headers

Changes

  • CoolifyConfig interface: added optional customHeaders field
  • CoolifyClient: spreads customHeaders into all fetch requests (both request() and getVersion())
  • index.ts: parses --header "Name: Value" from argv, passes to config

Usage

npx @masonator/coolify-mcp \
  --header "CF-Access-Client-Id: abc123.access" \
  --header "CF-Access-Client-Secret: secret"

Test plan

  • Build succeeds (npm run build)
  • Verified headers appear on outbound requests using echo server
  • MCP tools/list works with custom headers
  • Multiple --header flags coexist correctly
+130
additions
-0
deletions
7
files changed