complydoc
This complydoc MCP server lets an assistant browse, search, check, and clean documents from folders the user explicitly shares, with sensitive and hidden content handled locally.
List shared folders, choose a folder to share, and stop sharing a folder.
List documents in shared folders and search their cleaned, masked text by words.
Check a document or folder for personal/financial identifiers and hidden or model-directed text without returning document content.
Open a cleaned document with sensitive details masked and hidden passages removed, plus a note describing removals.
Save a cleaned text copy of a document for sharing or upload.
Integrates with LangChain ingestion pipelines, enabling tracing and auditing of document loaders, splitters, vector stores, embedding calls, and related ingestion steps.
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 ./documentscomplydoc 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
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.yamlcomplydoc 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
Documentation, and the playground with everything ready to run
Run it for your team, in a container or from a bucket
Network isolation: every run blocks outbound connections and records that it did
Optional extras for scans and names:
complydoc doctorsays what is installed and how to add the restChangelog · Contributing · MIT
If complydoc is useful to you, a star helps other engineers find it.
Available Tools
9 toolscheck_documentCheck a document before sharing itARead-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 folderARead-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 documentsARead-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 foldersBRead-onlyIdempotent
Say which folders the person has let complydoc open documents from.
Inputs: no named parameters.
open_documentOpen a document, cleanedARead-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 folderADestructiveIdempotent
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 documentsARead-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
Scored across 9 tools
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.
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.
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.
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
Related MCP Connectors
Check a document for hidden text before your agent reads it. PDF, Office, RTF, HTML.
PDF and image tools for AI agents: compress, merge, split, OCR, sign. Runs locally, never uploads.
Convert PDF, Word, Excel and scanned documents to Markdown, tables and RAG chunks. OCR.
File tools for your AI chat: PDF tables to Excel, merge PDFs, images to PDF, fill PDF forms.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to read and extract text content from PDF, Excel, and Word documents via the Model Context Protocol.2MIT
- AlicenseAqualityDmaintenanceProvides 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.71MIT
- AlicenseNot gradedqualityCmaintenanceConverts PDFs, Office files, spreadsheets, emails, audio, and more to Markdown locally, enabling AI assistants to read and process them without cloud upload.MIT
- FlicenseNot gradedqualityDmaintenanceEnables 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.-