Troubleshooting and boundaries

Common issues, why Maskera blocks rather than silently forwarding unredacted text, and where local masking stops.

Common errors and fixes

SymptomCauseFix
Proxy returns 502Local NER failed to run or the upstream API is unreachable.Check stderr or run doctor. If you only want deterministic rules, pass --rules-only.
Codex with ChatGPT login rejects http://127.0.0.1:8787ChatGPT sign-in requires HTTPS for a custom base URL.Use the MCP server (codex mcp add maskera -- npx -y @maskera/mcp --root .) instead of the proxy.
Claude Desktop gets 401 from AnthropicAuth scheme is still set to Bearer.Switch auth scheme to x-api-key and verify base URL is http://127.0.0.1:8787 without /v1.
HTTP 403 on /_maskera or /mcpHost or Origin header does not match the loopback listener.Always open http://127.0.0.1:8787/_maskera directly and call /mcp without a foreign Origin header.
Access denied on maskera_read_fileThe path or a symlink points outside --root.Start with the right --root <dir> (repeatable for multiple folders).
maskera_restore is missing or rejectedThe server runs with --no-raw-restore or ?no_raw_restore=1.Use maskera_write_file to restore directly to disk, or --approval-mode browser.

Running completely offline

When your workstation or server cannot reach Hugging Face, place the model directory on local disk and disable remote fetches.

Terminal
# Install the package and download the model once, pinned to the published revisionnpm install -g @maskera/mcphf download joelhagvall/maskera-sv-ner onnx/model_q4.onnx config.json \  tokenizer.json tokenizer_config.json special_tokens_map.json \  --revision e0d5d017383c2732c5cc3c962fd1afdd73bb8035 \  --local-dir /opt/models/maskera-sv-ner-v24# Then run with no network accessMASKERA_MODEL_PATH=/opt/models \MASKERA_MODEL_ID=maskera-sv-ner-v24 \MASKERA_ALLOW_REMOTE_MODELS=0 \maskera-mcp doctor --root .

Limitations

  • Maskera is built for Swedish (and mixed Swedish/English) text. Other languages are only partially covered.
  • Images and scanned PDFs must be converted to text via OCR before passing through Maskera.
  • A neural model can miss unusual names or typos (see measured numbers on /en/accuracy). Add known client names and case IDs via --custom-term.
  • A skill guides agent behaviour but can be bypassed if the agent has unrestricted shell tools. Hard enforcement requires the local proxy or restricting file access to Maskera MCP.