chat_via_lucairn is an ordinary chat call whose point is the substitution step in the middle: PII is detected and replaced with placeholders before the upstream provider ever sees the text, and the provider keys stay in your own configuration rather than in the gateway. Provider selection is derived rather than declared — the model string decides whether ANTHROPIC_API_KEY or OPENAI_API_KEY is used — so moving a workload between Anthropic and OpenAI is a parameter change. With one tool and the Anthropic Messages shape on the wire, the cost of finding out whether the redaction suits your data is a single call.
A single-tool privacy gateway for chat: chat_via_lucairn detects PII and replaces it with placeholders before the request reaches the upstream model, and routes to Anthropic or OpenAI according to the model name, with bring-your-own keys on both sides.
- PII removed ahead of the upstream call: chat_via_lucairn detects personally identifiable information and substitutes placeholders before the text leaves for the provider.
- The provider chosen by the model string rather than by configuration: claude-* and anthropic-* models go upstream on ANTHROPIC_API_KEY, while gpt-*, openai-*, o1-*, o3-* and o4-* go upstream on OPENAI_API_KEY.
- The ordinary chat controls preserved: messages, system, model, temperature and max_tokens pass through, in the Anthropic Messages wire format.
A Lucairn API key as LUCAIRN_API_KEY, plus the upstream provider keys you intend to use: ANTHROPIC_API_KEY for the claude-* models and OPENAI_API_KEY for the gpt-* ones.
One command plus a key — npx -y @lucairn/mcp-server, then supply credentials
