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
- In the Maskflare console, open Settings > API clients and create a client. Choose the role it should have, for example
auditorfor 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, thenopenssl pkey -in maskflare-mcp.pem -pubout) and paste only the public key. Note the client id and token URL. - 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.1by 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-Afterthe 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.0
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 | Actions |
|---|---|---|---|---|
| maskflare_mcp-0.1.0.tar.gz | 14.8 kB | With provenance | Details for maskflare_mcp-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| maskflare_mcp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for maskflare_mcp-0.1.0-py3-none-any.whl |
Total release size: 31.3 kB
Release files / maskflare_mcp-0.1.0.tar.gz
| Download URL | maskflare_mcp-0.1.0.tar.gz |
|---|---|
| Size | 14.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6cad6b728c5707b36bb37a89e42877e20930e17bb2e12bfdc9b5ed2e599fa17a
|
|
BLAKE2b-256 checksum How to use checksums |
846cfd1f4c2ce40ea8b707858f23f39e57e15c6a86f368a95cbad5f97ceb42fa
|
| 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 24, 2026.
Transparency logRelease files / maskflare_mcp-0.1.0-py3-none-any.whl
| Download URL | maskflare_mcp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 16.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
85face0d6c2219a81a2c857abf140f4da897484a7c3bb0f60f7e9996d7b4ef08
|
|
BLAKE2b-256 checksum How to use checksums |
bed109e507b89a4ca9500fd8cc285b814deae0f422a2d80ab83b7e15777baf1e
|
| 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 24, 2026.
Transparency logSecurity for maskflare-mcp 0.1.0
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.
Attestation for maskflare_mcp-0.1.0.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 24, 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.