Skip to main content
Glama

Mahrem

Hassas veriyi yapay zekâya gitmeden önce cihazda rumuzlayan açık kaynak gizlilik katmanı.

Mahrem ayrı bir SaaS veya belge yükleme sitesi değildir. Yerel MCP aracı + skill paketi ve bağımsız tarayıcı eklentisi içerir. Kod MIT lisanslıdır, API anahtarı istemez. Claude/GPT kullanımının kendi abonelik veya API maliyeti ayrıdır.

Önemli: Ham metni önce sohbete yapıştırıp sonra “maskele” demek güvenli değildir. Metin o anda modele ulaşmış olur. Mahrem bu nedenle metin değil, yerel dosya yolu kabul eder.

Hukuk profesyonelleri için kolay başlangıç

Windows için indir · Adım adım kurulum rehberi

ZIP dosyasını indirin, Tümünü ayıkla ile açın ve Kur.bat dosyasına çift tıklayın. Gerekli yazılımlar otomatik hazırlanır; Git veya Python komutu yazmanız gerekmez. Kurulum sonunda uygulamanıza gireceğiniz hazır bağlantı bilgileri açılır.

Kurulum çift tıkla başlar; Claude/Codex bağlantısı için rehberdeki kısa ayar adımı da gerekir. Windows kurucusu henüz imzalı değildir. İlk denemeyi paketteki örnek belgeyle yapın.

Tarayıcı kullanıyorsanız: Chrome / Edge eklentisini kurun. Python veya MCP kurulumu gerekmez. Eklenti ayrı bir yerel sekmede metni maskeler; kontrol ettiğiniz çıktıyı sohbete kendiniz kopyalarsınız. Mağazada yayımlanmış değildir; indirilen extension klasörü yüklenir. Sohbet sitelerini izlemez, gönderimi veya dosya yüklemeyi otomatik durdurmaz.

Related MCP server: balmas-mcp

0.2: Word, PDF ve tarayıcı

  • Yerel araç .txt, .md, Word .docx ve metin içeren .pdf dosyalarını okur.

  • Word/PDF çıktısı maskeli TXT olur. Orijinal dosya değiştirilmez; yeni çıktıda sayfa düzeni, biçim ve dijital imza korunmaz. Bu işlem PDF üzerinde karartma değildir.

  • OCR yoktur. Şifreli PDF ve metin okunamayan sayfa içeren PDF reddedilir. Eski .doc dosyasını önce .docx olarak kaydedin.

  • Görsel, ek ve form içeriği eksik kalabilir. Çıkarılan metni ve maskelenmemiş bilgileri yerelde kontrol edin.

  • Tarayıcı eklentisi yapıştırılan metinle çalışır; doğrudan Word/PDF yüklemez. Yanıtı aynı sekmede geri açıp TXT olarak indirebilirsiniz.

Nasıl çalışır?

flowchart LR
    A[Ham yerel dosya] -->|yalnizca dosya yolu| B[Mahrem MCP]
    B -->|rumuzlu metin| C[Claude / Codex / ChatGPT Desktop]
    C -->|yer tutucular korunur| D[Maskeli sonuc dosyasi]
    D --> B
    B -->|acik metni modele vermeden| E[Geri acilmis yerel dosya]

Ornek:

Musteri: Ayse Deneme
TCKN: 10000000146
E-posta: ayse.deneme@example.com

sununa donusur:

Musteri: [KISI-1]
TCKN: [TCKN-1]
E-posta: [EPOSTA-1]

Aynı değer, aynı maskeleme işlemi içinde aynı rumuzu alır. Her dosya ayrı bir geri açma oturumu oluşturur. Model maskeli metinle çalışır. Sonuç tamamlanınca restore_file, gerçek değerleri yalnızca yerel çıktı dosyasına yazar; açık metni model yanıtına döndürmez.

Tespit kapsamı

  • TCKN: yalnizca checksum'u gecerli adaylar

  • TR IBAN: uzunluk ve mod-97 kontrolu

  • Turkiye cep telefonu

  • E-posta

  • Luhn uyumlu kart numarasi

  • IPv4 ve URL

  • Musteri:, Davaci:, Davali: gibi belirli etiketlerden sonra gelen kisi adlari

  • Yerel rules.json ile ozel kisi/kurum terimleri ve allowlist

  • UTF-8 .txt, .md, .docx ve metin PDF girdileri; TXT/MD çıktısı

Bu bir alpha sürümüdür. Serbest metindeki tüm kişi ve kurum adlarını bulduğunu iddia etmez. Kalıcı şifreli kasa ve tamamen yerel NER modeli henüz yoktur.

Kurulum

Gerekenler: Python 3.10+ ve uv.

git clone https://github.com/orhanluce/mahrem.git
cd mahrem
uv tool install .

mahrem-mcp komutunun PATH uzerinde oldugunu kontrol edin:

mahrem --help

Claude Code

Repo hem Claude plugin manifestini hem de .mcp.json dosyasini icerir:

claude --plugin-dir .

Claude icinde /mahrem:mahrem komutunu kullanabilir veya “bu dosyayi Mahrem ile isle” diyebilirsiniz.

Codex

Yerel MCP sunucusunu bir kez ekleyin:

codex mcp add mahrem -- mahrem-mcp
codex mcp list

Skill'i kullanici kapsaminda kurmak icin skills/mahrem klasorunu %USERPROFILE%\.agents\skills\mahrem altina kopyalayabilirsiniz. Repo bir Codex uyumluluk manifesti de icerir: .codex-plugin/plugin.json.

ChatGPT web yerel Codex yapılandırmasını okumaz. Web sohbeti için tarayıcı eklentisinin ayrı maskeleme akışını kullanın. Windows kurucusu PATH ayarı yapmaz; onunla kurduysanız rehberdeki mutlak komut yolunu kullanın.

Kullanim

Dosya yollarini mutlak verin.

mahrem scan "C:\Belgeler\dava-notu.md"
mahrem mask "C:\Belgeler\dava-notu.md"
mahrem mask "C:\Belgeler\dilekce.docx"
mahrem mask "C:\Belgeler\karar.pdf"

CLI rumuzlu dosya olusturur fakat surec kapaninca geri acma tablosu silinir. Geri acilabilir akista Claude/Codex icindeki uzun omurlu MCP sunucusunu kullanin.

MCP araclari:

  • scan_file: Ham degerleri gostermeden tur/adet raporu verir.

  • mask_file: Rumuzlu dosya ve modele uygun maskeli metin olusturur.

  • restore_file: Sonucu yerelde geri acar, acik metni modele dondurmez.

  • forget_session: Bellek ici eslesme tablosunu siler.

Özel terimler için örnek kural dosyasını kopyalayın. Allowlist eşleşmeleri tam değer üzerinden yapılır. Gerçek isimleri bu yerel JSON'a yazın; sohbete yapıştırmayın.

Gelistirme

uv sync
uv run python -m unittest discover -s tests -v
node --test tests/extension.test.mjs
uv run mahrem scan "$PWD\examples\ornek-belge.txt"

Guvenlik ve sinirlar

Tehdit modeli ve bilinen sınırlar SECURITY.md dosyasındadır. Kısa hali:

  • Ag istegi ve telemetri yok.

  • Eslesmeler diske yazilmaz; MCP sureci kapaninca geri acma olanagi da kapanir.

  • Geri acilmis dosya ajan tarafindan yeniden okunmamalidir.

  • Otomatik tespit uzman kontrolunun yerine gecmez.

İsteğe bağlı gerçek Chromium testi: Playwright kurulu ortamda node tests/browser-extension.cjs. Bu test yerel eklentiyi açar; kontrol onayı, kopyalama, geri açılan dosya, oturum temizleme ve ağ isteği olmamasını sınar.

Güncelleme

Önce açık işlerinizi geri açıp tamamlayın. Yeni ZIP'i indirin; masaüstü kurulumunda Kur.bat dosyasını yeniden çalıştırıp istemciyi yeniden başlatın. Tarayıcıda yeni extension klasörünü yükleyin. Yeniden başlatma veya sekmeyi yenileme, bellekteki geri açma tablosunu siler.

Yol haritasi

  1. Yerel Turkce NER ile kisi/kurum/adres tespiti

  2. Sifreli ve kullanici parolali oturum kasasi

  3. DOCX/PDF icin bicimi koruyan donusum

  4. Tarayıcı mağazası dağıtımı ve ayrı değerlendirmeyle site entegrasyonları

  5. Farkli diller icin tespit paketleri

Katki kurallari icin CONTRIBUTING.md dosyasina bakin.

Available Tools

4 tools
forget_sessionB

Erase one in-memory placeholder mapping after the restored file is created.

Inputs: session_id (required). Returns: object

mask_fileC

Mask local TXT/MD/DOCX/PDF to plain text. Detection is partial: human review is required.

Inputs: source_path (required), overwrite, rules_path, output_path. Returns: object

restore_fileC

Restore placeholders into a local output file; never returns the restored clear text.

Inputs: session_id (required), masked_path (required), overwrite, output_path. Returns: object

scan_fileB

Scan local TXT, Markdown, DOCX or text PDF without returning raw values. Report extraction warnings.

Inputs: source_path (required), rules_path. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool maps to a distinct stage in the masking workflow: scan for warnings, mask to produce placeholders, restore to reinsert values, and forget to clean up session state. Although scan and mask both operate on local files, their outputs and purposes are clearly differentiated.

    Naming Consistency5/5

    All four names follow a consistent snake_case verb_noun pattern (scan_file, mask_file, restore_file, forget_session), making the set predictable and easy to navigate.

    Tool Count5/5

    Four tools is well-scoped for a focused privacy-preserving file workflow; each tool earns its place without redundancy.

    Completeness4/5

    The set covers the core lifecycle of scan, mask, restore, and cleanup, but lacks any tool to list or inspect active sessions/placeholder mappings, which could be a minor gap for multi-file use.

    Maintenance

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    • Mask, restore and black out personal data in text and files, processed in the EU.

      https://redactic.eu/mcp
    • Detect and redact PII and secrets before text reaches an LLM, with reversible placeholders.

    • Detecta e mascara dado pessoal brasileiro (CPF, CNPJ, RG, e-mail) antes do texto ir a uma IA. LGPD.

      https://guard.egos.ia.br/mcp
    • Redact personal data from text before your agent sends it to a model or stores it: names, contact details, ID numbers, financial and health identifiers, card numbers, plus any exact terms you add. Nothing stored, no third-party AI. Tools - redact_text: returns the redacted text and a count of what was removed, by type. Never the removed values. Options: restrict to particular data types, add exact terms to remove, choose the replacement style (a type label such as <PERSON> by default) and set a confidence threshold. - list_entity_types: lists the detectable data types. Free. Data handling - Nothing you send is stored. Text is processed in memory and discarded when the call returns. - No third-party AI. Text is never sent to OpenAI, Anthropic, Google or any other outside model. - Tool arguments are never logged. Only counts are kept: credits used, a timestamp and how many of each type were found. PDFs, including scanned pages, are handled by the REST API with the same key and credits. They aren't offered as an MCP tool because a file doesn't fit in a tool call. Pricing: 1 credit per call plus 1 per 1,000 characters. 10 free credits on sign-up, no card. Credit packs from $5; purchased credits never expire. Failed calls and repeated identical calls are free. Setup and API key: https://eleyed.com/mcp?utm_source=glama&utm_medium=directory&utm_campaign=listing

      https://eleyed.com/api/mcp

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Enables an AI assistant to redact text and, more importantly, files without reading them, since file redaction and restoration happen locally and only counts are reported, keeping personal data out of the conversation. It exposes tools for redacting text, writing a redacted copy of a UTF-8 file with an owner-only restore mapping, and putting original values back offline.
      3
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to browse and read files from allowlisted folders while names, IDs, contacts, and secrets are replaced with consistent tokens locally before the agent ever sees them. The agent's final answer can then be restored to the original values locally, with no write tools and no file contents leaving the machine.
      57 npm
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables irreversible anonymisation of documents and spreadsheets (PDF, Word, PowerPoint, HTML, Excel, CSV) into consistent pseudonymised Markdown before they reach an AI, keeping names, national IDs, bank details and contact data unrecoverable. Runs as a free online HTTP endpoint needing no key, or locally with the full engine bundled so nothing leaves the machine.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Masks personal data in text, PDF, Word and Excel files with Redactic (EU servers) before the model reads them, blacks out PDFs and images, and puts the original values back into masked text, Word and Excel files on your computer, where the restore map stays. Website: https://redactic.eu/ai-assistants/
      470 npm
      MIT