Lucairn SDKs are the official collection of client libraries for the Lucairn privacy-preserving AI gateway, and the repository maintains four feature-aligned packages: @lucairn/mcp-server (a Model Context Protocol server, installable in one line via npx for Claude Desktop, Cursor, Cline, Continue, etc.), @lucairn/sdk (TypeScript/Node), lucairn (Python), and the Go SDK.
Purpose: to act as a privacy gateway between an application or AI agent and the chosen upstream LLM provider, removing personal data from prompts before the model sees them, and returning a signed certificate proving what was redacted, when, and which redaction layers were applied.
Key capabilities: PII detection is performed on each request in three layers—layer one is tenant-known entity matching; layer two is Presidio NER (names, emails, IBANs, addresses, phone numbers, customer IDs, etc.); layer three is a GPU-hosted custom PII guard model (Enterprise only, optionally trained on domain corpora). Detected PII is replaced with placeholders (such as [PERSON_1], [EMAIL_2], [IBAN_3]) before being sent to the upstream model. Responses come with a signed compliance certificate containing an Ed25519 witness signature, an RFC 3161 timestamp, and a Sigstore Rekor inclusion proof. The gateway selects the upstream provider based on the model parameter in the request; starting with @lucairn/mcp-server@1.1.0, cross-provider BYOK is supported, allowing keys to be set in the same MCP configuration, with the server forwarding them per request as X-Upstream-Key, billed to the user's own provider account.
Usage: the MCP scenario is fastest, requiring no build or installation; npx runs on demand, and after adding the server to the MCP client configuration and restarting the client, the chat_via_lucairn tool is available. The language SDKs remain consistent at the observable level, and cross-language byte equivalence is locked by test fixtures generated by a shared Go assembler, so a certificate issued by one SDK can be verified consistently in the other two SDKs. There are two ways to verify certificates: the HTML summary is aimed at DPOs, is available at all tiers (including the free Developer edition), and is obtained via getCertificateSummary / get_certificate_summary / GetCertificateSummary, or by pasting the certificate URL into https://lucairn.eu/verify;JSON Certificates and local Ed25519 verification are aimed at Pro and above, using getCertificate + verifyCertificate and the corresponding language methods, with verifiers located in the repository (ts/src/verify-certificate/, python/src/lucairn/verify_certificate/, and the internal/verify package under go/). Methods such as verifyCertificateChain validate each claim's own signature, the claim bytes, the typed copy, the signed upstream request hash, and the unsigned cert_tier; all three share the 98 cases in testdata/parity-corpus/ and return consistent results; rendering and decisions should be based only on the returned verified values, and the expected request ID should be passed in to reject certificates from other rounds.
Use cases: developers and teams that need to redact personal data before sending prompts to an LLM and retain verifiable compliance proof, especially suited to EU privacy compliance scenarios and agent integrations.
Limits and tiers: the Developer edition (free) allows 500 requests per month, requires no credit card, returns placeholders as-is, and is suitable for testing the redaction surface; Pro/Enterprise re-associate placeholders back to the original values on the gateway side, and Pro also provides programmatic access to certificate JSON, audit event export, and higher quotas; Enterprise supports self-hosting, BYOK and provider-side billing isolation, as well as an optional custom PII guard model (priced by scope). Enterprise self-hosted deployments can run the entire stack within the customer's environment, so raw identity data never leaves that environment. External RFC 3161 and Sigstore Rekor anchor verification is currently presented only as passthrough metadata; full external anchor verification will be introduced in a later release. Production packages are versioned independently, cross-language byte equivalence is locked by shared fixtures, and release notes are in CHANGELOG.md.