Sits between Claude and your upstream LLM provider (Anthropic, OpenAI) and strips PII before prompts reach the model. Runs via `npx @lucairn/mcp-server` with zero install. Exposes a `chat_via_lucairn` tool that runs a three-layer detection pipeline (known entities, Presidio NER for emails/IBANs/phone numbers, optional GPU-trained shield on Enterprise). Returns cryptographically signed receipts (Ed25519 + RFC 3161 timestamp + Sigstore Rekor proof) showing what was redacted and when. Free tier returns placeholders verbatim for testing redaction coverage. Pro and Enterprise re-link originals on the gateway after the model responds. Reach for this when you need audit-grade proof that personal data never touched the model, especially in regulated contexts where you want BYOK provider billing plus compliance certificates your DPO can verify.
Official client libraries for Lucairn — an EU-based privacy-preserving AI gateway. Lucairn sits between your application (or AI agent) and the upstream LLM provider you choose, removes personal data from prompts before the model ever sees them, and returns a signed Lucairn Certificate proving what was redacted, when, and by which sanitizer layer.
This monorepo hosts four packages at parity:
@lucairn/mcp-server — Model Context Protocol server (one-line npx install for Claude Desktop, Cursor, Cline, Continue, …)@lucairn/sdk — TypeScript / Node SDKlucairn — Python SDKgithub.com/declade/lucairn-sdks/go — Go SDKFor most agent use cases, the fastest path is the MCP server. No build step, no install — npx runs it on demand:
npx -y @lucairn/mcp-server
Add it to your MCP client config (Claude Desktop's claude_desktop_config.json, Cursor's mcp.json, Cline's cline_mcp_settings.json, Continue, etc.):
{
"mcpServers": {
"lucairn": {
"command": "npx",
"args": ["-y", "@lucairn/mcp-server"],
"env": {
"LUCAIRN_API_KEY": "<your_lucairn_api_key>",
"ANTHROPIC_API_KEY": "<optional_byok_anthropic_key>",
"OPENAI_API_KEY": "<optional_byok_openai_key>"
}
}
}
}
Restart your client. The chat_via_lucairn tool becomes available immediately. See mcp-server/README.md for full details.
Each request through any Lucairn SDK follows the same pipeline:
[PERSON_1], [EMAIL_2], [IBAN_3], …) before the request reaches the upstream LLM.For Lucairn-hosted Developer-tier callers, on-gateway pseudonymization happens before your LLM sees the request. Enterprise self-host deployments can run the entire stack inside the customer environment, in which case no raw identity data leaves that environment at all.
The gateway picks the upstream provider from the model parameter you send:
| Model prefix | Upstream provider | BYOK env var |
|---|---|---|
claude-*, anthropic-* | Anthropic | ANTHROPIC_API_KEY |
gpt-*, openai-*, o1-*, o3-*, o4-* | OpenAI | OPENAI_API_KEY |
Cross-provider BYOK shipped in @lucairn/mcp-server@1.1.0 — set one or both keys in the same MCP config and the server forwards the matching one as X-Upstream-Key per request, so your provider account is billed directly.
| Language | Package | Version | README |
|---|---|---|---|
| MCP server | @lucairn/mcp-server | 1.2.7 | mcp-server/README.md |
| TypeScript | @lucairn/sdk | 1.1.1 | ts/README.md |
| Python | lucairn | 1.1.1 | python/README.md |
| Go | github.com/declade/lucairn-sdks/go | v1.1.1 | go/README.md |
All SDKs are at parity at the observable level. Cross-language byte-equivalence is locked via shared Go-assembler-generated fixtures, so a certificate signed via one SDK verifies identically via the other two.
Sign up at https://lucairn.eu/account/signup. Free Developer tier: 500 requests/month, no credit card required.
Pro adds response re-linking, programmatic certificate JSON access, audit-event export, and higher quota. Enterprise adds self-host, BYOK with provider-side billing isolation, and the optional custom-trained PII shield (priced per scope).
See https://lucairn.eu/pricing for the full tier comparison.
Every response through any SDK gets a signed Lucairn certificate. Two surfaces:
getCertificateSummary (TS) / get_certificate_summary (Python) / GetCertificateSummary (Go), or paste the certificate URL into https://lucairn.eu/verify.getCertificate + verifyCertificate (and language equivalents). The verifier is in-tree — see ts/src/verify-certificate/, python/src/lucairn/verify_certificate/, and the internal/verify package under go/.External RFC 3161 + Sigstore Rekor anchor verification is currently surfaced as pass-through metadata; full external anchor verification lands in a follow-up release.
Production packages are versioned independently and tagged per the table above. Cross-language byte-equivalence is locked via shared fixtures. Follow CHANGELOG.md for release notes.
@lucairn/mcp-server: https://www.npmjs.com/package/@lucairn/mcp-server@lucairn/sdk: https://www.npmjs.com/package/@lucairn/sdklucairn: https://pypi.org/project/lucairn/See CONTRIBUTING.md. Security reports: SECURITY.md.
MIT — see LICENSE.
LUCAIRN_API_KEY*secretLucairn gateway API key (lcr_live_*). Issued at https://lucairn.eu/account/keys. Free tier requires BYOK upstream LLM keys (ANTHROPIC_API_KEY or OPENAI_API_KEY).
ANTHROPIC_API_KEYsecretUpstream Anthropic API key. Used when the requested model is claude-* / anthropic-*. Required if you call Claude models on the free tier (BYOK).
OPENAI_API_KEYsecretUpstream OpenAI API key. Used when the requested model routes to OpenAI. Required if you call OpenAI models on the free tier (BYOK).
LUCAIRN_BASE_URLOverride the gateway URL. Defaults to https://gateway.lucairn.eu (production). Set this to point at a self-hosted Lucairn deployment.
LUCAIRN_TRANSPORTTransport mode for the MCP server. One of 'direct-http' (default; v1.1+ behavior) or 'stdio-bridge' (v1.2+ opt-in).
io.github.ericm1018/skillfm-llm-cost-optimizer-openai-anthropic-usage
io.github.mikerawsonnz/llm-orchestration-agent
io.github.mikerawsonnz/authenticated-llm-agent
labforgedev/copilot-memory-mcp
csoai-org/agent-prompt-injection-firewall-mcp
io.github.mikerawsonnz/authenticated-multi-llm-agent