Add to Claude

Add Sift to your agent.

Sift runs on your own machine as an MCP server. Nothing is hosted, and no file leaves your computer.

Built and tested with Claude Code. Other MCP clients should work. Plain-text version: /docs.md.

Sift is new. The first release was on 28 November 2026 and one person maintains it. Check it against the answer key in step 3, and cross-check any number that matters.

1. Install

Needs Node 18 or newer. Nothing else: Claude starts Sift with npx, which fetches the published package (@heyife/siftdata) the first time.

The config pins a version (@0.8.2), so Sift only changes when you change that number. Read the changelog first. Leave the version off and npx fetches the newest release on any start.

2. Connect Claude

Claude Code. Add .mcp.json to the folder you work in, then approve sift in a new session.

{
  "mcpServers": {
    "sift": {
      "command": "npx",
      "args": ["-y", "@heyife/siftdata@0.8.2"]
    }
  }
}

Claude Desktop. Settings, Developer, Edit Config. Add the same "sift" entry inside mcpServers, then restart.

From source instead: clone the repo, npm install, npm run agent:build, and point "node" at dist-agent/sift-mcp.mjs.

3. Try it on the test files

The repo ships fake files and an answer key in test-data/. Clone it or download that folder, then paste this to Claude and check its numbers against the key.

Use Sift to match test-data/crm_companies.csv on customer_id to test-data/product_accounts.csv on account_id. Tell me matched, CRM only, product only and the match rate.

1,010matched
41CRM only
140product only
96.1%match rate

The tools

sift_profileRows, columns, blanks, values not in standard form, and on request the most common values in each column
sift_countDuplicates, blank key fields, values not on an allowed list, rows meeting a condition with a sum
sift_matchMatched, left only, right only, match rate, and rows, customers, sums, averages and days between two dates for checks across the join
sift_reshapeProposes a mapping to another system's layout; with the agreed mapping, writes a new CSV in it, with readiness counts and a receipt
sift_prepare_importRows to hold back before an import, with a reason each. Can write ready and held files
sift_checkPass or fail against your limits, and what moved since the last run
sift_sampleA repeatable sample of customers, traced through every file: found, missing, and what each holds
sift_fix_dry_runWhat would change, and how many rows each reason flagged. Writes every flagged row to a file only when asked
sift_fix_applyWrites a new copy, a receipt and a changes file, or says why it stopped
sift_fix_undoWrites the restored original and checks it matches
sift_check_landedAfter an import, which changes reached the CRM, by record ID
sift_measuresHealth measures for every complete month: active share, activation, repeat, win-back
sift_holdoutPicks a hold-out group by seed, or tops one up, and writes the list for the email tool
sift_liftLift against the hold-out: each group, the difference with a 95% range, and the same before the start

A fix needs a rules file with a share-of-rows limit, or it refuses. A match check counts rows and customers, says how keys were compared, and warns when a customer is on several rows of the other file. topValues on sift_profile lists a column's common values, never a one-row value, and never a personal field unless allowed.

Most work uses profile, count, match, prepare, check and the fixes. sift_measures, sift_holdout and sift_lift are for one narrower job, measuring a lifecycle programme. Skip them unless that is your job.

When to use it, and when not

Use it for a file over a few hundred rows, a count you will quote to someone, and any change to customer data. You don't need it for:

A short listAt twenty rows, let Claude read the file
A query's numberA warehouse or dashboard query is already exact and repeatable. Keep one source for each number
A quick lookWhere a wrong count costs nothing

Sift or a script. Claude can also write a pandas or DuckDB script and get an exact count. That is the real alternative, and it is often fine. Sift adds what a fresh script doesn't have:

Tested rulesWhat counts as a duplicate, a blank or a valid UK phone number is fixed and checked against an answer key, not written again each time
Rows stay outA script returns whatever it prints. Sift returns counts and row IDs
A way backA dry run, a receipt and an exact undo for every change

What Sift can't do. It can't choose the question. Claude still picks the columns and the condition, and can pick the wrong ones. Sift makes the answer exact, not the question right, so have Claude say which columns and condition it used before you quote the number.

Before an import

For a list headed into a sending tool, one prompt does the whole run:

Use Sift with rules.contacts.json on prospects.csv. Dry run the email fix and apply it if it's under the limit. Then prepare the fixed file for import, holding back anyone already in sending_tool_export.csv, Lost in crm.csv, or unsubscribed in comms.csv. Write the ready and held files and check the ready file against the limits.

Email fixCapitals, spaces, mailto:, a name around the address. A missing @ or a typo like gmial.com is flagged, never guessed
Hold backBlank or unusable emails, repeats, and anyone in the files you name, each with its reason
Two filesReady to import, and held with a sift_reason column. Every row in exactly one
CheckPass or fail for the ready file against your limits

On the test list: 96 emails fixed, 21 flagged, 149 rows held back, 651 ready, and the ready file passes.

Checks that can fail, and over time

Limits in the rules file are the largest share of rows allowed. Over a limit fails. With a history file, each run says what moved since the last one.

"limits": {
  "duplicates": 0.01,
  "missing": { "email": 0.02, "first_name": 0.05 },
  "not_standard": { "email": 0.05 }
}

The same check runs without an agent, for n8n, cron or CI. Exit code 1 on a fail, so a pipeline can stop the import:

npx @heyife/siftdata@0.8.2 check prospects.csv --rules rules.contacts.json --history runs.jsonl

Point it at a warehouse table with --source and run it on a schedule to watch the source, not just one export.

What Sift reads

FilesCSV, TSV, Excel, JSON, JSON Lines, Parquet. A match can join two formats. Fixes are CSV only, which keeps undo exact
Big filesThe DuckDB engine runs the same checks as SQL, past what fits in memory. Same numbers: 1.2 million test rows gave exactly 1,000 times the answer key
WarehousesExport from Snowflake or BigQuery as Parquet, and point Sift at the file
DatabasesA DuckDB file, or Postgres and MySQL. Read-only, one SELECT at most

A live database is the one thing Sift reaches over the network, so it is off until you turn it on. Keep the connection string in Sift's MCP config; the agent only sees its name.

"sift": {
  "command": "npx",
  "args": ["-y", "@heyife/siftdata@0.8.2"],
  "env": {
    "SIFT_ALLOW_DATABASES": "1",
    "CRM_DB": "postgres://readonly_user:password@host:5432/crm"
  }
}

Then a tool takes {"type": "postgres", "connection": "env:CRM_DB", "table": "public.companies"} in place of a file. Use a read-only database user as well.

The rules file

Sift knows generic moves. What matters to your company goes in a rules file, one per record type. Your agent can draft it; you approve it once.

{
  "as_of": "2026-11-01",
  "key_fields": ["customer_id", "owner", "stage", "email"],
  "allowed_stages": ["New", "Active", "Sleeping", "Lost"],
  "hands_off": ["record_id", "customer_id", "created_date"],
  "guardrails": {
    "stop_if_share_of_rows_changed_over": 0.2,
    "report_only_on_first_run": true
  }
}

Files Sift writes

Next to your file, or in the output folder you set. Never over your file.

crm.sift-phone-<id>.csvThe fixed copy
crm.sift-phone-<id>.receipt.jsonEvery change, old and new
crm.sift-phone-<id>.changes.csvOne row per change: record ID, field, old, new
crm.sift-undo-<id>.csvThe original, rebuilt
list.sift-ready-<id>.csvRows to import
list.sift-held-<id>.csvRows held back, with the reason
crm.sift-sample-<id>.csvA sample's trace

The receipt and changes file hold real values from your file. Treat them like the data.

One folder. Set SIFT_OUTPUT_DIR in the config's env, or pass outputDir to one call, to keep every job's files in one place. Values left out. With SIFT_MASK_RECEIPTS=1, or maskReceipt on one fix, the receipt keeps record IDs but each value becomes a salted hash, and the changes file leaves the old values out. The landed check still works; undo doesn't, so keep the original export until you're done. A hash hides a value, but anyone who already knows one can test for it, so it is not encryption.

"sift": {
  "command": "npx",
  "args": ["-y", "@heyife/siftdata@0.8.2"],
  "env": { "SIFT_OUTPUT_DIR": "/Users/you/sift-output", "SIFT_MASK_RECEIPTS": "1" }
}

Cleared after. The first command lists the files Sift wrote; --yes deletes them. Your own files and any folders inside are left alone. --older-than 7 keeps anything newer, for a cron job.

npx @heyife/siftdata@0.8.2 clean /Users/you/sift-output
npx @heyife/siftdata@0.8.2 clean /Users/you/sift-output --yes

What leaves your machine

Sift for agentsNothing, unless you turn on the usage ping. No network calls apart from a live database you turn on, and the ping. Your agent gets counts and record IDs, not rows. sift_sample is the one tool that returns values, and it refuses personal fields unless allowed.
Usage pingOff unless you set SIFT_TELEMETRY=1 in Sift's MCP config ("env": { "SIFT_TELEMETRY": "1" }). Each call sends the tool's name, Sift's version, whether it worked, the row count in a band such as 1k-5k, and your agent's name. Nothing from your files: no paths, column names or values. DO_NOT_TRACK=1 turns it off whatever else is set.
Your agentCan still open an export with its own file tools if asked. In Claude Code, block that in .claude/settings.json, below. For every other shell command and script, also turn on Claude Code's sandbox. Sift runs as its own process, so it can still read the folder. These guard against accidents; they are not a wall. Claude Desktop has no such setting.
siftdata.appCookieless, EU-hosted usage analytics, never file contents. The browser cleaner works inside your tab. Rather not trust a hosted page? Run it from the source: npm install, then npm run dev.
Each releaseBuilt from the repository by GitHub Actions, with npm provenance, so npm shows the commit it came from. It goes live only after the maintainer approves it with two-step sign-in.
{ "permissions": { "deny": ["Read(./exports/**)"] } }

Back to your CRM

Sift fixes a copy. The changes file is how the fix gets back to where the data lives: the record ID, the field, the old value and the new one, one row per change. Import it with your CRM's update import, matched on the record ID, or let an agent connected to the CRM push the same rows. Then export again and run sift_check_landed to see every change arrived.

Import the file as it is. Opening it in Excel first can turn +44 numbers into formulas.

Tracing a sample

An audit follows a few real customers through every tool, end to end. sift_sample picks them and does the following.

RepeatableRanked by the SHA-256 of a seed and each ID. Same seed, same customers, whatever the row order
Per customerFound or missing in each file, how many rows, and up to five values per field you name
PrivateThe one tool that returns values from single records, so it refuses email, phone, names and addresses unless you allow them

On the test files: one won customer has no comms record, and one is still New in the CRM after 21 orders.

Format fixes and duplicates

postcodeUK postcode in capitals, one space before the last three characters. Anything not a postcode shape is flagged
company_nameRe-cases a name written all in capitals. Keeps acronyms, codes, & and your keep_capitals list
mark_duplicatesNever merges or deletes: adds a sift_duplicate_of column naming each duplicate's first copy. Undo takes it off
trimAny column: spaces off both ends, double spaces collapsed
caseAny column: upper, lower, title or sentence case
map_valuesAny column: swaps values by an exact lookup table. Anything not in the table is flagged, not guessed
numberAny column: add, multiply or round with exact decimals. Text and currency symbols are flagged
date_formatAny column: rewrites dates in one format. A date that could be either way round is flagged unless you set the order
strip_currencyAny column: takes off currency symbols and thousands separators. Mixed currencies are flagged
set_ifAny column: sets a value where a condition on the same file holds
blank_toAny column: fills blank cells with a value, and only blank cells

Fix mode

Two more fixes put each customer's records straight. Both take a second rules file, passed as fixRules.

statusSets each record's status from rules you agree once, first fit wins. Anything no rule fits is flagged, not guessed
fill_idFills a blank customer ID from a match on email. Only ever fills blanks; an ambiguous match is flagged
sift_check_landedAfter the import, checks a fresh export against the receipt: landed, still old, or gone

Advanced: health measures

sift_measures works out active share, activation rate and time, repeat rate and win-back rate for every complete month, from your accounts and orders exports and a definitions file. With a history file it keeps every run. Definitions.

Advanced: lift against a hold-out

A change after a build goes live isn't proof the build caused it. A hold-out is: a small random group who get no lifecycle messages.

sift_holdoutPicks the group by the SHA-256 of a seed and each ID. Same seed, same group. Topping up never moves anyone
sift_liftEach group's number, the lift and a 95% range, the same before the start, and held-out customers messaged anyway
HonestA range that includes zero is said in words: the hold-out can't tell it from no lift

On the test files: 37.7% of messaged customers ordered and 28.9% of the hold-out, 8.7 points higher (range 4.6 to 12.6).

Updates and feedback

Sift doesn't ask who you are, so I only hear how it's used if you tell me.

Follow releases. On GitHub, choose Watch, then Custom, then Releases. Or add the release feed to an RSS reader.

Tell me how you use it. Post in Show and tell on GitHub, which is public, or message me on LinkedIn, which isn't. Describe what you do; never paste customer data.