Skip to main content

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

maskflow_mcp-0.1.0.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

maskflow_mcp-0.1.0-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file maskflow_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: maskflow_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for maskflow_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 708d6c956e990e40c42a3153096eb751241d5bb61947dc85648445d46393daee
MD5 44542aa2b73016ad9a1f50cb3a43dd64
BLAKE2b-256 a1383bc14822b756bd3cdabfbe4cc34a1bc5eed1cfc60e424826f9b336bfcff9

See more details on using hashes here.

Provenance

The following attestation bundles were made for maskflow_mcp-0.1.0.tar.gz:

Publisher: release-mcp.yml on maskflow/maskflow

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file maskflow_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: maskflow_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for maskflow_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 59dca3a9c991009835b255dc2584e3890fcdf8e32ae9eba2229f9ab0b07b796e
MD5 d9fc31f6a935f4457e02b717e278bdce
BLAKE2b-256 b8268078a0587e5ade487df80356fb821c9cf07033feaf6ee7d2223db9e81ec7

See more details on using hashes here.

Provenance

The following attestation bundles were made for maskflow_mcp-0.1.0-py3-none-any.whl:

Publisher: release-mcp.yml on maskflow/maskflow

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.1.2

2 files

0.1.1

2 files

This release

0.1.0 This release

2 files

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