Skip to main content

DataFog

DataFog MCP

Check sensitive files before an AI agent reads them.

PyPI version Python 3.10 or later CI status MIT license

Quickstart · Demos · Policy · Privacy · Contributing

DataFog MCP lets an AI agent detect personal data and credentials in local files, then create a copy with matched values redacted, masked, or removed. Detection runs on DataFog Core. Tool responses contain counts, locations, and copy paths—never file contents or matched values.

Stable v1.2.0. Tested with Claude Code. CI runs on Linux; development uses macOS. Windows and other MCP clients have not been validated.

Quickstart

Requires Python 3.10+ and uv.

On an Intel Mac, also install a Rust toolchain first: datafog-core 1.8 has no prebuilt package for Intel Macs, so the install builds it from source. Apple Silicon, Linux, and Windows install prebuilt packages.

1. Install DataFog MCP.

uv tool install datafog-mcp

2. Choose which folders DataFog can access.

datafog-mcp roots --edit

List one allowed directory per line, such as ~/Downloads/customer-exports. Without a roots file or override, DataFog allows access to your home directory. Narrow this to the folders you need. Allowed roots and owner policy →

3. Connect Claude Code.

claude mcp add datafog --scope user -- "$(command -v datafog-mcp)"

Start a new Claude Code session and ask:

Scan customers.csv with DataFog before opening it. Tell me what types of sensitive data you find, without reading the file into the conversation.

The MCP client must run on the machine that holds the files. A cloud-hosted agent cannot reach this local stdio server directly.

See it in action

These clips use fictional customer records. Each shows a real Claude Code interaction with DataFog MCP. Try the sample CSV and sample text file inside an allowed folder.

Scan a customer export

Check a customer export for emails and phone numbers without returning the matched values.

Claude Code checks customers.csv and reports three emails and three phone numbers.

Create a redacted copy

Replace emails and phone numbers with typed labels in a new copy. The original stays intact, and existing copies are never overwritten.

Claude Code creates customers_redacted.csv with three emails and three phone numbers redacted, keeping the original unchanged.

These demos select email and phone checks; phone detection is opt-in. An explicit selection replaces the defaults. Other columns remain unchanged.

Five tools, one local workflow

Tool Use it to
datafog_policy Discover allowed roots, routine scope, output destination, and workflow guidance.
datafog_scan Get finding types, counts, and locations.
datafog_redact Replace matched values with labels such as [EMAIL].
datafog_mask Replace each matched value character for character.
datafog_remove Delete matched values without leaving a marker.

Scans return individual locations for up to 700 findings. Above that, counts remain complete, but individual findings are omitted. Copies are saved beside the original by default, or in an owner-configured directory.

Detection coverage

  • On by default: email, SSN, credit card, labeled US routing numbers and NPIs, and supported credentials.
  • Opt in: phone, date, ZIP code, IP address, and labeled account numbers and street addresses.
  • Not detected: plain-text names and unlabeled street addresses.

Credential coverage includes GitHub and Stripe keys, bearer tokens, JWTs, password-bearing PostgreSQL URIs, and PEM private keys. Coverage varies by type; this is not a replacement for a dedicated secret scanner. Detection and copy behavior →

Supported files

UTF-8 text files up to 10 MB: CSV, TSV, JSON, logs, ENV, SQL, and plain text. CSV/TSV are processed as decoded cells; other formats use text matching with ENV/SQL email boundary handling.

CSV/TSV headers are preserved and not scanned by default. Use has_header=false when the first record should be processed as data. XLSX, PDF, DOCX, images, and archives are not parsed. A refused scan means the file was not checked. File formats and limits →

Privacy and control

File contents are processed locally. The running server makes no network requests, and neither successful nor failed tool responses include file contents or matched values. Installation downloads packages separately.

Responses do include paths and metadata, which enter the agent's context and may reach its model provider. Allowed roots restrict DataFog's access; they do not restrict other agent tools. Routine scope and workflow settings are advisory. Detection can miss values, and approved allowlist values remain in copies.

Core 1.8 fixes adjacent email addresses in unspaced Japanese and Chinese text. Mixed-script local parts and final domain labels can still be narrowed. Boundaries and limits →

Privacy boundaries → · Configure roots, scope, allowlists, and output folders →

Documentation and contributing

Report vulnerabilities through SECURITY.md, rather than a public issue.

License

MIT. Built by DataFog.

Metadata

Release files for datafog-mcp 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for datafog-mcp 1.2.0
File Size Uploaded Provenance Actions
datafog_mcp-1.2.0.tar.gz 31.5 kB With provenance Details for datafog_mcp-1.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for datafog-mcp 1.2.0
File Interpreter ABI Platform Actions
datafog_mcp-1.2.0-py3-none-any.whl Python 3 none any Details for datafog_mcp-1.2.0-py3-none-any.whl

Total release size: 70.0 kB

Release files / datafog_mcp-1.2.0.tar.gz

Download URL datafog_mcp-1.2.0.tar.gz
Size 31.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b5599866e8e9c0c6486714d4e186ce480fc2ec14dfba0d81eda7dedd04bae02c
BLAKE2b-256 checksum
How to use checksums
5d174bea479e55f235fd3534729af504df78bcd4198a87cfa7a5203802e257d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Release files / datafog_mcp-1.2.0-py3-none-any.whl

Download URL datafog_mcp-1.2.0-py3-none-any.whl
Size 38.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dad581376e3066c2309bda5260fdf3407a7aa3f8c4c3452d4bf2424bb198f9bb
BLAKE2b-256 checksum
How to use checksums
84b1790fe1da03954220001ca81f48fee2278dd630c4b22e57ce955d2673a8eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Security for datafog-mcp 1.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for datafog_mcp-1.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page