Skip to main content
Glama
complydoc

complydoc

A PDF can say one thing to a person and another to your model. White text, tiny type, an IBAN behind a black bar: it's all still in the text layer, and most loaders pass it straight through. complydoc shows what your loaders actually extracted, flags hidden text and personal and financial identifiers before they're embedded, and traces every ingestion step with its time and cost. Nothing leaves your machine.

Works with LangChain, LlamaIndex, Unstructured, Haystack, Docling, LlamaParse, Azure Document Intelligence, Marker, Chonkie and the common vector stores and embedding APIs.

Try it

uv tool install complydoc
complydoc ui ./documents

complydoc ui audits the folder and opens the viewer on it, served from your machine. To see a hidden clause caught, try the one-page contract in examples/hidden_clause.pdf.

Related MCP server: DJAI Tools MCP

In your assistant

complydoc mcp lets any MCP client, such as Claude, Cursor, VS Code (Copilot), Windsurf or Codex, open documents with personal and financial details masked and hidden instructions taken out. It runs on your machine:

uvx complydoc mcp --folder ~/Documents/Contracts

Install in VS Code Install in Cursor

It is in the MCP Registry as io.github.complydoc/complydoc, as a Claude Desktop extension on the releases page, as a Claude Code plugin (/plugin install complydoc --marketplace complydoc/complydoc) and as the image ghcr.io/complydoc/complydoc. The setup for each client is in Documents into an assistant, cleaned.

Observe a pipeline

import complydoc as cd

with cd.observe("contracts-ingest"):
    documents = PyMuPDF4LLMLoader("contract.pdf").load()
    chunks = splitter.split_documents(documents)
    vector_store.add_documents(chunks)

Every loader, splitter, embedding call and vector store becomes a step, with its settings, time, tokens, cost and the identifiers it passed on. Open it with complydoc ui.

What it shows

  • Traces of each ingestion step, and how runs compare over time.

  • Loader diffs: each loader's reading of a page side by side, with the page itself.

  • Identifiers from Europe, the Americas, India and Australia, checksum-validated and masked until you choose to see them.

  • Hidden content: text a reader does not see and a model does, and instructions written to a model.

  • Evals: the facts a document must keep, checked on every reading.

  • Chunks and cost: splitters side by side, and tokens priced across models.

In CI

- uses: complydoc/complydoc@v0.8.2
  with:
    path: documents
    policy: policy.yaml

complydoc check fails when a folder breaks your rules; finance, legal and hr ship as ready policies. See GitHub Action.

Privacy

complydoc runs on your machine and sends nothing anywhere: every run blocks outbound connections. complydoc mcp reads only the folders you share, keeps the list of folders chosen in a conversation in ~/.complydoc/mcp-folders.json and writes clean copies only where you ask. The one download is the optional name model, fetched once from Hugging Face when you ask for it. Questions go to the issue tracker.

More

If complydoc is useful to you, a star helps other engineers find it.

Available Tools

9 tools
check_documentCheck a document before sharing itA
Read-onlyIdempotent

Say whether a document is safe to share with an AI assistant: the personal and financial details in it, and any text hidden from a reader or written as instructions to a model. Nothing of the document's content is returned.

Inputs: path (required).

check_folderCheck a whole folderA
Read-onlyIdempotent

Say which documents in a folder are safe to share, the ones that are not first, each with what it holds. Use it before a folder is shared or uploaded anywhere.

Inputs: folder.

choose_folderChoose a folder to shareA

Open the computer's folder dialog so the person can pick a folder to share. Use it when they ask to use a folder, or when a document they want is not in a shared folder and they agree to choose where it is. The person picks; you cannot.

Inputs: no named parameters.

list_documentsList shared documentsA
Read-onlyIdempotent

List the documents in the folders the person shared, optionally only those whose name contains a word. Use it to find the file a person means before opening it.

Inputs: page, query.

list_foldersList shared foldersB
Read-onlyIdempotent

Say which folders the person has let complydoc open documents from.

Inputs: no named parameters.

open_documentOpen a document, cleanedA
Read-onlyIdempotent

Read a document for the conversation. Always use this instead of asking for the file: personal and financial details come back masked and hidden passages are taken out, and a short note says what was removed. Tell the person what the note says.

Inputs: path (required).

remove_folderStop sharing a folderA
DestructiveIdempotent

Stop sharing a folder chosen earlier, by the name list_folders gives it.

Inputs: name (required).

save_clean_copySave a clean copyA

Save a clean copy of a document as a text file, with personal and financial details masked and hidden passages taken out, for the person to send to someone or upload elsewhere. Say where it was saved.

Inputs: path (required).

search_documentsSearch shared documentsA
Read-onlyIdempotent

Find which documents say something, and where: words searched in the shared documents' text, already masked and cleaned, with the page and a short passage for each match.

Inputs: query (required), folder.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 9 tools

    Disambiguation4/5

    Most tools have clearly distinct purposes: folder management, document listing, content search, safety checks, opening, and saving clean copies are separated. The only plausible confusion is between safety-checking a document and opening it, or between listing documents and searching them, but the descriptions draw those boundaries fairly well.

    Naming Consistency5/5

    All tool names use snake_case with a predictable verb-first pattern, such as list_documents, check_folder, open_document, and remove_folder. The naming is consistent and easy to scan.

    Tool Count5/5

    Nine tools is a well-scoped set for a document-compliance and safe-sharing server. Each tool corresponds to a meaningful operation in the workflow, with no obvious filler.

    Completeness5/5

    The surface covers the full lifecycle implied by the domain: managing shared folders, finding documents, checking documents and folders for sensitive content, opening masked content, and saving a clean copy. No important operation appears to be missing for the stated purpose.

    Maintenance

    ActivityActive
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Provides AI agents with local file-processing capabilities for token counting, RAG chunking, CSV/JSON conversion, QR generation, and more, while keeping documents private on the user's machine.
      7
      1
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Converts PDFs, Office files, spreadsheets, emails, audio, and more to Markdown locally, enabling AI assistants to read and process them without cloud upload.
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to interact with local documents (PDF, Markdown, TXT) through tools for discovery, reading, extraction, summarization, comparison, keyword extraction, search, and analysis, ensuring privacy and offline capability.
      -