Automatic
Anonymization
with LibreChat

anymize provides GDPR-compliant text anonymization for LibreChat. Two integration methods are available depending on your needs.

Until now, developers and companies using LibreChat had to leave sensitive data out entirely. Too risky for personal information. Too dangerous for compliance requirements. anymize changes that fundamentally.

For the first time, teams can use real business data in LibreChat – securely, GDPR-compliantly, without compromising on functionality or data protection.

A developer builds chatbots with real support tickets, real FAQ content, real product data. A data scientist analyzes customer conversations with real business data, developing precise AI-powered responses. A business team creates internal assistants with real contracts, reports, and communication data.

Every conversation stays GDPR-compliant. Every integration works fully. Every innovation is possible.

Chat with sensitive data – GDPR-compliant.

anymize.js (Google Drive) download

Example

Anonymization

Original:

"My name is John Doe, email: john@example.com"

Anonymized:

"My name is [[Person-abc123]], email: [[Email-def456]]"

Supported Languages

German, English, French, Spanish, Italian

Support

  • API issues: https://app.anymize.ai
  • LibreChat documentation: https://docs.librechat.ai
  • anymize website: https://anymize.ai

Security Notes

  • Never share API keys publicly
  • Data is processed securely according to GDPR standards
  • Only the original session can de-anonymize data
  • No data storage – processing happens in real-time

Method 1: MCP Server (Recommended)

Best suited for

Easy setup, use in chat interfaces, no coding required

Setup

Get API key at https://app.anymize.ai. Add to librechat.yaml:

mcpServers:
  anymize:
    type: streamable-http
    url: 'https://mcp.anymize.ai/mcp'
    timeout: 60000
    chatMenu: true
    startup: true
    headers:
      x-anymize-api-key: anymize_yourkey

Replace anymize_yourkey with your actual API key. Restart LibreChat afterwards.

Usage in Chat

  • Select a Tools-compatible endpoint (e.g. OpenAI, Anthropic, Google)
  • Open the MCP Server dropdown below the text input
  • Select Anymize
  • Start chatting – the AI can now anonymize and de-anonymize text

Usage with Agents

  • Open the Agent Builder
  • Click Add Tools
  • Save the agent

Method 2: Structured Tool

Best suited for

Advanced file processing (PDF/image OCR), custom configurations

Prerequisites

  • LibreChat with structured tools support
  • Node.js 16+
  • anymize API key from https://app.anymize.ai

Installation

Download Anymize.js from Google Drive. Place the file at:

api/app/clients/tools/structured/Anymize.js

Edit api/app/clients/tools/manifest.json – add:

{
  "name": "Anymize",
  "pluginKey": "anymize",
  "description": "GDPR-compliant text anonymization and deanonymization.",
  "icon": "https://res.cloudinary.com/.../anymize-favico-b_tpvtwh.svg",
  "authConfig": [
    {
      "authField": "ANYMIZE_API_KEY",
      "label": "Anymize API Key",
      "description": "Get your API key from Anymize Dashboard"
    }
  ]
}

Edit api/app/clients/tools/index.js:

const Anymize = require('./structured/Anymize');

module.exports = {
  // ... existing exports
  Anymize,
};

Edit api/app/clients/tools/util/handleTools.js – add import:

const { Anymize } = require('../');

Add anymize to the customConstructors object:

anymize: async (toolContextMap) => {
  const authFields = getAuthFields('anymize');
  const authValues = await loadAuthValues({ userId: user, authFields });

  const contextFiles = options.tool_resources?.[EToolResources.context]?.files ?? [];
  const messageAttachments = options.req?.body?.files ?? [];
  const allFiles = [...contextFiles];
  const seenFileIds = new Set(contextFiles.map(f => f?.file_id).filter(Boolean));

  for (const file of messageAttachments) {
    if (file?.file_id && !seenFileIds.has(file.file_id)) {
      allFiles.push(file);
      seenFileIds.add(file.file_id);
    }
  }

  if (allFiles.length > 0) {
    let toolContext = 'Context files available for anonymization:';
    for (const file of allFiles) {
      if (file) toolContext += `\n\t- ${file.filename} (${file.file_id})`;
    }
    toolContextMap.anymize = toolContext;
  }

  return new Anymize({
    ...authValues,
    userId: user,
    req: options.req,
    contextFiles: allFiles,
  });
},

Add the API key to your .env file:

ANYMIZE_API_KEY=your_api_key_here

Restart LibreChat.

Usage

  • Anonymize text: "Anonymize this: My name is John Doe"
  • Anonymize files: Upload a PDF or image and say "Anonymize this document"
  • De-anonymize: "Deanonymize: [[Person-abc123]]"
  • Supported file formats: PDF, PNG, JPG (processed via OCR)

Comparison: Which method to use?

FeatureMCP ServerStructured Tool
Setup effort⭐ Easy⭐⭐⭐ Advanced
Text anonymization
File/OCR support
Agent support
Chat dropdown

MCP if you only want to anonymize text and prefer a quick setup.

Structured Tool if you need file processing (PDF/image OCR) or advanced features.

Troubleshooting

MCP Server Issues

Server not showing:

  • Check the API key in librechat.yaml
  • Restart LibreChat
  • Make sure you selected a Tools-compatible model

Connection timeout:

  • Check your internet connection
  • Check the status of the Anymize service

Structured Tool Issues

Tool not showing:

  • Make sure all files are in the correct directories
  • Check JSON syntax in manifest.json
  • Clear browser cache

"Missing API Key" error:

  • Check that ANYMIZE_API_KEY=your_key is in the .env file
  • Make sure there are no spaces around the "="
  • Restart the backend after changes

"No files available" error:

  • Upload a file first
  • Wait for the upload to complete
  • Supported formats: PDF, PNG, JPG

Start now.
14 days free trial.

All models. All features. No credit card.

We stand behind anymize. And we know – when an AI tool touches client, patient or employee data, a demo video isn't enough. That's why we give you 14 days of full access – all models, all features, no credit card. Enough time to be certain, before you trust us.

Your AI workplace awaits.