mcpField
M
MaskFlow PII proxy

MaskFlow PII proxy

Local
github.com/maskflowSecurity2Updated 2w ago

About MaskFlow PII proxy

MaskFlow PII proxy wraps other MCP servers, masking personal information in tool-call arguments before they reach a backend and restoring matching placeholders in results. Detection covers general PII and Indian identifiers such as Aadhaar, PAN, and GSTIN.

Key features

  1. 01Mask PII in tool-call arguments
  2. 02Restore placeholders in tool results
  3. 03Detect Indian identifiers
  4. 04Keep placeholder maps per connection
  5. 05Optionally mask PII added by tools
  6. 06Support stdio and HTTP

Use cases

  1. 01Send PII-containing arguments to third-party MCP servers
  2. 02Process Aadhaar or PAN in tool calls
  3. 03Prevent tool-added PII from reaching an agent
  4. 04Wrap an existing MCP backend

MCP support

This MCP proxy wraps stdio or HTTP backends, masking `tools/call` arguments before they reach the backend and restoring placeholders in results. Requests for `tools/list`, prompts, and resources pass through unchanged.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"maskflow": {
"command": "uvx",
"args": [
"maskflow-mcp"
]
}
}
}
Run commanduvx maskflow-mcp

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
pypimaskflow-mcp0.1.2

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

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

FlagDefaultMeaning
--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-confidence0.5Detection threshold
--patterns-onlyoffSkip the spaCy NER pass (faster; drops bare-name / address detection)
--mask-tool-resultsoffAlso mask PII the tool introduced in its result, not just unmask placeholders it echoed
--session-ttl3600Lifetime 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.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.