Need2Know
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Need2Know
privacy layer for AI prompts
Need2Know is a local FastMCP server that sits between your files and Claude. Read tools replace private values with placeholders before Claude sees them; write tools swap the real values back in locally before saving.
Need2Know is a best-effort privacy layer. It hides the values its detectors recognize before Claude sees them. It is not a security boundary: detection can miss things, and a determined or prompt-injected model can recover some hidden values. Read Limitations before relying on it.
notes.txt on disk what Claude reads what Claude writes saved to disk
Jane Doe <jane@x.io> → [PERSON_1] <[EMAIL_1]> → Hi [PERSON_1], → Hi Jane Doe,
owns Project Falcon owns [CODENAME_1] re: [CODENAME_1] re: Project FalconHow detection works
Presidio is the framework, with three kinds of recognizer:
Regex recognizers for structured data: emails, phone numbers, card numbers, IPs, IBANs, US SSNs, crypto wallets (Presidio built-ins) and API keys/tokens/private keys (
SecretRecognizer: AWS, GitHub, Anthropic, OpenAI-style, Stripe, Slack, Google, JWTs, PEM keys,api_key=...andBearer ...). Secret detection is pattern-based: prefixed variable names such asDB_PASSWORD=,AWS_SECRET_ACCESS_KEY=andOPENAI_API_KEY=, and credentials inside URLs (postgres://user:pass@host), are not detected yet. Don't point Need2Know at.envor other credential files.GLiNER as the NER model for people, organizations and locations, in place of Presidio's default spaCy model. Presidio runs with its no-op NLP engine, so no spaCy model is downloaded.
Custom terms you list yourself: internal codenames, client names. See
terms.example.txt.
Where spans overlap, custom terms win, then secrets, then the highest score.
Related MCP server: filesystem-mcp
Placeholder mappings
Each value gets a stable placeholder ([PERSON_1] stays Jane Doe for the whole
conversation), so a read and a later write line up. Mappings:
live only in the server process's memory, scoped to the MCP session (over stdio that is the server process, which the client starts per conversation; over HTTP it is the
mcp-session-id);expire after
NEED2KNOW_MAPPING_TTLseconds without use (sliding, default 1 hour);are never written to disk or logs, and their
reprhides values.
If a write contains a placeholder the server no longer knows (for example after
expiry), it refuses to save rather than write [PERSON_1] literally.
Storage sits behind MappingStore (src/need2know/store.py). Encrypted local
persistence can be added as another implementation without touching the tools.
Tools
Tool | What it does |
| Read a UTF-8 file, redacted. |
| List a folder; file names are redacted too. |
| Restore placeholders, then save. |
| Replace one exact match; both sides may use placeholders. |
| Something private got through. It is redacted from then on in this conversation and logged for training. |
| A placeholder hides something that is not private (or has the wrong type). Without |
| Counts per type, expiry, NER model. No values. |
File tools only work inside NEED2KNOW_ROOT.
Always set NEED2KNOW_ROOT to a dedicated work folder. Never use your home
folder: it would expose ~/.ssh, the fingerprint key and the correction log.
Write tools can change anything under the root, including .git/hooks, so
don't use a git repository you care about as the root.
Limitations
Context-only detection. A value detected only because of what's around it (
api_key=..., some names) can come back unredacted if Claude writes its placeholder somewhere else and reads that file.Guess confirmation. Claude can test a guess, for example by writing a candidate value and seeing whether it reads back as an existing placeholder, or from the match count
edit_filereports.Wrong-redaction reports reveal values.
report_wrong_redactionwithoutcorrect_typemakes the value readable in later reads. A prompt injection in a file could trigger it.Literal placeholders. If a file already contains text shaped like
[EMAIL_1], a rewrite swaps in that session's real value.Correction log.
corrections.jsonlstores no values, but its context lines may contain private details the detector missed. Review it before sharing it.Other paths to your files. If Claude also has a shell or another filesystem tool for the same folder, none of this protection applies.
See SECURITY.md to report a problem.
Correction log
Corrections go to ~/.need2know/corrections.jsonl so the model can be
fine-tuned over time, without storing raw sensitive text. Each line has the
kind of mistake, the expected and predicted types, a keyed HMAC fingerprint of
the value (to group repeats; the key is created once in
~/.need2know/fingerprint.key with owner-only permissions on macOS and Linux; on Windows your user folder's access rules protect it), its length and
character shape (Xxxxx Xxxxx), and optional context with the value replaced
by «TARGET» and everything else sensitive replaced by its type:
{"kind": "missed", "entity_type": "CODENAME", "fingerprint": "9f2c...", "length": 8, "shape": "Xxxxx", "context": "[PERSON] said «TARGET» ships Friday", ...}To fine-tune GLiNER, fill each «TARGET» with synthetic values matching the
type and shape, and train on the result.
Install and run
New to this? Follow GETTING_STARTED.md for a step-by-step walkthrough.
pip install -e '.[ner]' # GLiNER pulls in PyTorch; CPU-only torch is enough
need2know # stdio MCP serverThe GLiNER model (urchade/gliner_multi_pii-v1 by default) downloads from
Hugging Face on first start. If GLiNER is not installed the server refuses to
start, because names would otherwise go through unredacted. Set
NEED2KNOW_NER=off to run deliberately with regex and custom terms only.
Claude Code
claude mcp add need2know --env NEED2KNOW_ROOT=$HOME/work --env NEED2KNOW_TERMS_FILE=$HOME/.need2know/terms.txt -- need2knowClaude Desktop
{
"mcpServers": {
"need2know": {
"command": "need2know",
"env": {
"NEED2KNOW_ROOT": "/Users/you/work",
"NEED2KNOW_TERMS_FILE": "/Users/you/.need2know/terms.txt"
}
}
}
}For the privacy guarantee to hold, Claude must reach those files only through Need2Know, so don't also give it a filesystem server or shell over the same folder.
Settings
Variable | Default | |
| current directory (always set it) | Folder the file tools may use |
| none | Custom terms file |
|
| Seconds a mapping lives without use |
|
| Minimum detector score |
|
|
|
|
| Any GLiNER model |
|
| GLiNER confidence |
|
| Correction log and key |
|
| Logs carry counts only |
Development
pip install -e '.[dev]'
pytestTests use a stand-in for GLiNER, so they need no model download.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Securely search and manage workspace context files for AI agents and teams.
Safe folder access for ChatGPT and Claude: read, write and search files, risky tools opt-in.
Let ChatGPT and Claude read and edit files, search and run commands on your own computer.
Hosted file storage for agents: upload, list, download, share by link, expire, scratch.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to safely explore directories, read files, search content by pattern or filename, and edit files with checksum verification and dry-run preview within sandboxed filesystem access.76MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to read, write, and manage files on the local system with security features like path restrictions and optional read-only mode.92MIT
- AlicenseNot gradedqualityCmaintenanceProvides safe filesystem access for AI clients with root confinement, read-only mode, and file operations like read, write, search, copy, move, delete.MIT
- AlicenseNot gradedqualityDmaintenanceEnables 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.78 npmMIT