maskflow-mcp
A Model Context Protocol proxy that
wraps any MCP server and keeps PII out of your agent's tool traffic. It
masks PII in outbound tools/call arguments before they reach the backend
tool, and restores the originals in the results, with placeholders that
stay consistent for the whole agent run.
Agents routinely pass user PII (names, emails, PAN, Aadhaar, phone numbers) straight into third-party MCP servers as tool arguments. This proxy is a drop-in shim that stops the real values at the boundary. It runs MaskFlow's detection engine, so the Indian identifiers (Aadhaar, PAN, GSTIN, UPI, IFSC, ABHA, Indian names / addresses) are covered alongside the generic PII.
MIT, no gates, no telemetry.
Install
pip install maskflow-mcp
# or, no install:
uvx maskflow-mcp stdio --backend "npx -y @modelcontextprotocol/server-github"
Pulls fastmcp (the 2.x line, which does not bundle LLM vendor SDKs). The
first detection run downloads a small spaCy model; pass --patterns-only
to skip it.
Use it
stdio (Claude Desktop, most agents)
Point the agent at maskflow-mcp and give it the real server as --backend:
// claude_desktop_config.json
{
"mcpServers": {
"github": {
"command": "maskflow-mcp",
"args": ["stdio", "--backend", "npx -y @modelcontextprotocol/server-github",
"--pass-env", "GITHUB_TOKEN"]
}
}
}
Or wrap a server already defined in a config file:
maskflow-mcp stdio --config ./claude_desktop_config.json --backend-name github
HTTP
maskflow-mcp http --backend https://example.com/mcp --host 127.0.0.1 --port 9000
Options
| Flag | Default | Meaning |
|---|---|---|
--backend |
– | Backend command line, or a URL |
--config / --backend-name |
– | Read the backend from a Claude-Desktop-style JSON file |
--pass-env VAR |
– | Forward an env var to a stdio backend (repeatable) |
--min-confidence |
0.5 |
Detection threshold |
--patterns-only |
off | Skip the spaCy NER pass (faster; drops bare-name / address detection) |
--mask-tool-results |
off | Also mask PII the tool introduced in its result, not just unmask placeholders it echoed |
--session-ttl |
3600 |
Lifetime of a per-connection session |
What is masked
tools/call arguments are walked (string and numeric values only, keys
never) and masked through the connection's session. The result's text and
structured content is unmasked, restoring placeholders the tool echoed. By
default raw PII that the tool adds to a result passes through untouched;
--mask-tool-results masks that too, so the agent never sees it.
tools/list, prompts/*, and resources/* pass through unchanged
(resource content masking is not on by default).
PII safety
The token-to-value map lives in memory per connection and is never logged.
Only masked values cross the wire to the backend. See docs/mcp.md in the
MaskFlow repo for the design.
Metadata
Release files for maskflow-mcp 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| maskflow_mcp-0.1.2.tar.gz | 11.9 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| maskflow_mcp-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.4 kB
Release files / maskflow_mcp-0.1.2.tar.gz
| Download URL | maskflow_mcp-0.1.2.tar.gz |
|---|---|
| Size | 11.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ac3e04da07341f280aacdb9f4ef6fe874c5d7736dbee328d7c97d93c42ba902c
|
|
BLAKE2b-256 checksum How to use checksums |
52c5582d35279644304769a5c7c8070b9be7f37bdffcd4668f99fa0e6d7cf427
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 12, 2026.
Transparency logRelease files / maskflow_mcp-0.1.2-py3-none-any.whl
| Download URL | maskflow_mcp-0.1.2-py3-none-any.whl |
|---|---|
| Size | 10.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9bba573556d4eccb8dd5a0a9ff224cdd68d95b137732b2486acbc95d297106ea
|
|
BLAKE2b-256 checksum How to use checksums |
ee8a56f87c9cdfe2d624d6d7fae41c92dcb6fdc635599730b26478fc418f3d17
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 12, 2026.
Transparency logSecurity for maskflow-mcp 0.1.2
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
All 2 files in this release have been uploaded with provenance metadata.
Attestation for maskflow_mcp-0.1.2.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 Sep 12, 2026.
Transparency logA 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.