Skip to main content

Maskflare admin MCP server

Ask an assistant (Claude Code, Claude Desktop, Cursor, any MCP client) about your Maskflare organization: which devices are unprotected, how much traffic was blocked this week, which masking rules are on, what changed in the audit trail.

It talks to the Maskflare platform API as an API client, so it sees exactly one organization with that client's role.

  • Read-only by default. Write tools are offered only when you list them (MASKFLARE_MCP_WRITE_TOOLS). A tool you don't list is never shown to the model.
  • Rule changes are proposals. Changes to masking rules, packs and modes become pending changes that a person approves in the console. An API client can't approve them, and neither can whoever holds its credentials.
  • Deletes need confirmation. A delete runs only on a second call with the one-time code the first call returned. The code is valid for 5 minutes, works once, and only for the same target.
  • Audited. Every call is logged as one JSON line: time, tool, read/write/delete, target ids and outcome. Argument values are not logged, so preview text never reaches the log. The platform keeps its own audit trail of every change too.

Tools

Read (always) Write (opt-in, MASKFLARE_MCP_WRITE_TOOLS)
whoami, get_organization propose_rule_pack: turn a detector pack on or off (proposal)
get_traffic_usage: requests, success rate, blocked, p95 latency, tokens propose_rule_update: enable or disable a rule, change its action or mode (proposal)
list_devices: endpoint agents and their protection state set_browser_dlp_apps: which AI web apps browser DLP inspects
list_masking_rules, list_rule_packs, get_masking_scope, get_volume_thresholds revoke_device (confirmed)
list_rule_changes, list_change_sets: the approvals inbox revoke_api_key (confirmed)
get_masking_settings, get_browser_dlp, list_mcp_servers revoke_enrollment_token (confirmed)
list_api_keys, list_enrollment_tokens: metadata only, never secrets delete_mcp_server (confirmed)
list_audit_events
preview_masking: mask sample text with an environment's rules and explain each match

What a tool may do is also limited by the API client's role. An auditor client reads, a security client can propose rule changes, and only admin can revoke API keys.

Set up

  1. In the Maskflare console, open Settings > API clients and create a client. Choose the role it should have, for example auditor for a read-only assistant, and how it authenticates: a client secret (shown once), or a private key - generate one (openssl genpkey -algorithm EC -pkeyopt ec_paramgen_curve:P-256 -out maskflare-mcp.pem, then openssl pkey -in maskflare-mcp.pem -pubout) and paste only the public key. Note the client id and token URL.
  2. Run the server:
uvx maskflare-mcp            # stdio
uvx maskflare-mcp --transport http --host 127.0.0.1 --port 8765   # streamable HTTP at /mcp

Configuration, from the environment:

Variable
MASKFLARE_CLIENT_ID The API client's id.
MASKFLARE_CLIENT_SECRET or MASKFLARE_CLIENT_PRIVATE_KEY_FILE How it authenticates: its secret, or (better) the PEM private key whose public key the client was created with. With a key (private_key_jwt), each token request carries a 60-second assertion signed with it (RS256, or ES256/384/512 by curve) and no shared secret exists anywhere.
MASKFLARE_TOKEN_URL The token URL shown when the client was created.
MASKFLARE_API_URL Default https://api.maskflare.com/api/platform/v1 (self-hosted: your gateway's /api/platform/v1).
MASKFLARE_MCP_WRITE_TOOLS Comma-separated write tools to offer, or all. Empty (default): read-only. An unknown name stops the server.
MASKFLARE_MCP_AUDIT_LOG File to append the audit log to. Default: stderr.

Claude Code

/plugin marketplace add maskflare/maskflare-mcp-server
/plugin install maskflare-admin@maskflare-mcp

The plugin asks for the client id, secret, token URL and API URL, plus any write tools to enable. The secret is stored in your OS keychain.

Other clients

{
  "mcpServers": {
    "maskflare": {
      "command": "uvx",
      "args": ["maskflare-mcp"],
      "env": {
        "MASKFLARE_CLIENT_ID": "maskflare-client-...",
        "MASKFLARE_CLIENT_SECRET": "...",
        "MASKFLARE_TOKEN_URL": "https://id.maskflare.com/realms/maskflare/protocol/openid-connect/token"
      }
    }
  }
}

Notes

  • HTTP transport: it binds to 127.0.0.1 by default and has no authentication of its own. Anyone who can reach it acts with the API client's role, so don't expose it beyond the machine without a proxy that authenticates.
  • Rate limits: the API allows each client 600 requests a minute by default. A refused call returns the Retry-After the API sent.
  • Credentials: the client's token is cached in memory and renewed shortly before it expires. When a client is rotated or revoked, the next call gets a new token or fails with api_client_inactive.

Development

uv sync
uv run pytest
uv run ruff check . && uv run ruff format --check . && uv run pyright

Versioning and releases

The package follows Semantic Versioning. Until 1.0, a minor version may change the tools or their arguments; every change is listed in CHANGELOG.md. Releases are published to PyPI from a vX.Y.Z tag.

Other Maskflare packages: the Python SDK maskflare and the TypeScript SDK @maskflare/sdk.

License

MIT

Metadata

Release files for maskflare-mcp 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for maskflare-mcp 0.1.1
File Size Uploaded Provenance Actions
maskflare_mcp-0.1.1.tar.gz 14.9 kB With provenance Details for maskflare_mcp-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for maskflare-mcp 0.1.1
File Interpreter ABI Platform Actions
maskflare_mcp-0.1.1-py3-none-any.whl Python 3 none any Details for maskflare_mcp-0.1.1-py3-none-any.whl

Total release size: 31.3 kB

Release files / maskflare_mcp-0.1.1.tar.gz

Download URL maskflare_mcp-0.1.1.tar.gz
Size 14.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a045fc90e24a5fe28686c44c1446585f4e6bfc22571fbe8308b08f79e2b40d7b
BLAKE2b-256 checksum
How to use checksums
c1e7132632e87d21d64fe538439b424005689fee59c8d050f114fafda8c9f8d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 27, 2026.

Transparency log

Release files / maskflare_mcp-0.1.1-py3-none-any.whl

Download URL maskflare_mcp-0.1.1-py3-none-any.whl
Size 16.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a3859655785d26d9352e2f5215c490f696a439baa0456244d513b11085d4c3c1
BLAKE2b-256 checksum
How to use checksums
25300a62980b2fa9fc8dc73a8e91e0251cab4fc925b96dd9c2b639defb6124e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 27, 2026.

Transparency log

Security for maskflare-mcp 0.1.1

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for maskflare_mcp-0.1.1.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 Nov 27, 2026.

Transparency log

A 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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

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