classifinder-mcp
OfficialAn MCP server that lets an agent detect and strip leaked secrets and prompt-injection markers from text before it reaches an LLM.
Scan text for secrets (
classifinder_scan): returns structured findings with type, severity, confidence, and remediation guidance for API keys, passwords, tokens, and credentials.Tune sensitivity via
min_confidence(0.0–1.0, default 0.5) to filter low-confidence matches.Redact text (
classifinder_redact): replaces detected secrets with placeholders usinglabel,mask, orhashstyle, returning text safe to forward to any model or log.Broad detection coverage: 455 secret types across cloud/infra, payment, VCS, comms/SaaS, database connection strings, private keys/JWTs, AI/LLM provider keys, DevOps/observability, data/analytics, and enterprise identity — plus 14 prompt-injection markers (jailbreaks, role hijack, zero-width/Unicode tricks), all in a single scan.
Local audit logging: writes metadata-only JSONL per tool call (no input text or secret values), disableable or redirectable via env vars.
Hosted or self-hosted: uses the hosted API by default or points at your own scanner via
CLASSIFINDER_BASE_URLto keep scanned text inside your network.Sandbox-friendly: two read-only tools, one egress destination, with Docker, Firejail, and Bubblewrap profiles, plus signed releases verifiable via PyPI attestations and Sigstore.
Detects and redacts 1Password account secret keys and credentials in text.
Detects and redacts Algolia API keys and search-only/admin credentials in text.
Detects and redacts Atlassian API tokens and credentials in text.
Detects and redacts Bitbucket account and app passwords in text.
Detects and redacts ClickHouse database credentials and connection strings in text.
Detects and redacts Cloudflare API tokens and keys in text.
Detects and redacts Contentful API tokens and credentials in text.
Detects and redacts Databricks personal access tokens in text.
Detects and redacts Datadog API keys and application keys in text.
Detects and redacts Deepgram API keys in text.
Detects and redacts Dropbox access tokens and app secrets in text.
Detects and redacts Dynatrace API tokens in text.
Detects and redacts ElevenLabs API keys in text.
Detects and redacts Fastly API tokens in text.
Detects and redacts Fly.io API tokens and access keys in text.
Detects and redacts Gitea access tokens in text.
Detects and redacts GitHub personal access tokens, OAuth tokens, and other credentials in text.
Detects and redacts GitLab tokens (personal, deploy, feed, runner, SCIM, etc.) in text.
Detects and redacts HubSpot API keys and tokens in text.
Detects and redacts Infracost API keys in text.
Detects and redacts JFrog/Artifactory access tokens and API keys in text.
Detects and redacts Linear API keys and tokens in text.
Detects and redacts Mailgun API keys in text.
Detects and redacts Mapbox access tokens in text.
Detects and redacts MongoDB connection strings and credentials in text.
Detects and redacts MySQL connection strings and credentials in text.
Detects and redacts Notion API tokens in text.
Detects and redacts Octopus Deploy API keys in text.
Detects and redacts OpenAI API keys in text.
Detects and redacts PagerDuty API tokens in text.
Detects and redacts PayPal API credentials and tokens in text.
Detects and redacts PlanetScale database credentials and connection strings in text.
Detects and redacts PostgreSQL connection strings and credentials in text.
Detects and redacts PostHog API keys in text.
Detects and redacts Postman API keys and tokens in text.
Detects and redacts Prefect API keys in text.
Detects and redacts Redis connection strings and credentials in text.
Detects and redacts Replicate API tokens in text.
Detects and redacts SendGrid API keys in text.
Detects and redacts Sentry auth tokens and DSNs in text.
Detects and redacts Shopify access tokens and credentials in text.
Detects and redacts Slack API tokens, webhook URLs, and session tokens in text.
Detects and redacts Snyk API tokens in text.
Detects and redacts Sonar/SonarQube tokens in text.
Detects and redacts Square access tokens and credentials in text.
Detects and redacts Stripe API keys and secret tokens in text.
Detects and redacts Sumo Logic access IDs and keys in text.
Detects and redacts Supabase service role keys and connection strings in text.
Detects and redacts Twilio API keys and auth tokens in text.
Detects and redacts HashiCorp Vault tokens in text.
Detects and redacts Vercel API tokens (including the 2024+ prefixed taxonomy) in text.
Detects and redacts Weights & Biases API keys in text.
Detects and redacts Zendesk API tokens in text.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@classifinder-mcp Scan this config file for any leaked secrets"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ClassiFinder MCP Server
An MCP server that gives AI agents the ability to scan text for leaked secrets and redact them before they reach an LLM.
Installation
pip install classifinder-mcpRelated MCP server: zentric-protocol-mcp
Setup
Get a free API key at classifinder.ai, then add to your agent config:
Claude Code
{
"mcpServers": {
"classifinder": {
"command": "classifinder-mcp",
"env": {
"CLASSIFINDER_API_KEY": "ss_live_your_key_here"
}
}
}
}Cursor
Add to .cursor/mcp.json in your project:
{
"mcpServers": {
"classifinder": {
"command": "classifinder-mcp",
"env": {
"CLASSIFINDER_API_KEY": "ss_live_your_key_here"
}
}
}
}Self-hosted server
To keep scanned text inside your network, run the open-source scanner yourself (classifinder.ai/self-host) and point the MCP server at it with CLASSIFINDER_BASE_URL. Use one of the keys you set in CLASSIFINDER_API_KEYS on the server:
docker run -d -p 8000:8000 -e CLASSIFINDER_API_KEYS=change-me ghcr.io/classifinder/classifinder:latest{
"mcpServers": {
"classifinder": {
"command": "classifinder-mcp",
"env": {
"CLASSIFINDER_BASE_URL": "http://localhost:8000",
"CLASSIFINDER_API_KEY": "change-me"
}
}
}
}The same env block works in Claude Code, Claude Desktop, and Cursor. Leave CLASSIFINDER_BASE_URL unset to use the hosted API.
classifinder_scan
Scan text for leaked secrets and credentials. Returns findings with type, severity, confidence, and remediation guidance.
Agent: "Check this config for secrets"
→ classifinder_scan(text="AWS_ACCESS_KEY_ID=AKIAJGKJHSKLDJFH3284")
→ Found 1 secret: aws_access_key (critical, confidence 0.95)classifinder_redact
Replace all detected secrets with safe placeholders. Returns clean text safe to forward to any LLM.
Agent: "Clean this before sending to the model"
→ classifinder_redact(text="key=sk_live_EXAMPLE_KEY_HERE")
→ "key=[STRIPE_LIVE_SECRET_KEY_REDACTED]"What It Detects
469 detection patterns:
455 secret types across 10 categories: cloud/infra keys (AWS, GCP, Azure, Vercel including the 2024+ prefixed taxonomy vcp_/vci_/vca_/vcr_/vck_, Fly.io, Doppler, HashiCorp Vault, Cloudflare, Dropbox, JFrog/Artifactory and more); payment (Stripe, PayPal, Shopify with 4 token types, credit cards Luhn-validated, Square); VCS (GitHub, GitLab with 10 token types covering deploy/feed/runner/SCIM/k8s-agent/OAuth/feature-flag, Bitbucket); comms/SaaS (Slack including config/session/legacy variants, Twilio, SendGrid, Mailgun, Datadog, Sentry, PagerDuty, Notion, Linear and more); database connection strings (PostgreSQL/MySQL/MongoDB/Redis/Supabase); generic SSH/PEM private keys and JWTs; AI/LLM provider keys (OpenAI, Anthropic user + admin, Cohere, xAI, Mistral, DeepSeek, HuggingFace user + organization, Replicate, Groq, ElevenLabs, AssemblyAI, Deepgram, LangFuse, AWS Bedrock long + short-lived, Vercel AI Gateway, Weights & Biases); DevOps/CI-CD/observability (Databricks, Dynatrace, LaunchDarkly, Harness, Octopus Deploy, Fastly, Gitea, TravisCI, Prefect, Infracost, Sumo Logic, Snyk, Sonar, Sourcegraph); data/analytics (ClickHouse, PlanetScale, PostHog, Postman, Algolia, Contentful); and enterprise identity (Atlassian, 1Password, HubSpot, Mapbox, MaxMind, Zendesk).
14 prompt-injection markers for LLM input scanning — 4 phase-1 high-precision (chat-template role-hijack tokens like
<|im_start|>and[INST], tool-call tag injection, known jailbreak personas like DAN/AIM, Unicode bidirectional override / Trojan Source) + 6 phase-2 medium-precision (zero-width Unicode smuggling, fake "Assistant:" turns, system-prompt extraction, instruction override like "ignore previous instructions", persona override (context-gated), encoded-payload markers) + 4 phase-3 SAFE-MCP-derived markers cross-referenced to the SAFE-MCP technique catalog. Catches 20.6% of in-the-wild jailbreaks (validated against theverazuo/jailbreak_llmscorpus). Severity caps athigh— these are attack markers, not credentials.
One scan returns both secret findings and injection markers — no second vendor, no separate pipeline.
Hardening — Sandbox Profiles
The MCP server is intentionally minimal: ~180 lines, two read-only tools, a single egress destination (api.classifinder.ai:443, or your own server when CLASSIFINDER_BASE_URL is set), and the API key as the only secret in scope. That makes it cheap to run under a sandbox. Three documented profiles:
Docker
docker run --rm -i \
--read-only \
--tmpfs /tmp \
-v ~/.classifinder:/root/.classifinder \
-e CLASSIFINDER_API_KEY \
python:3.12-slim sh -c "pip install -q classifinder-mcp && classifinder-mcp"--read-only— container filesystem is read-only--tmpfs /tmp— writable scratch space for pip / Python-v ~/.classifinder:/root/.classifinder— only persistent mount, used for the audit log-e CLASSIFINDER_API_KEY— key passed via env, never written to diskSelf-hosted: add
-e CLASSIFINDER_BASE_URL=http://host.docker.internal:8000(or your server's in-network address)-i— keeps stdin attached (MCP transport is stdio)
For a faster invocation in production, build a thin image with classifinder-mcp pre-installed.
Firejail (Linux)
firejail \
--noroot \
--caps.drop=all \
--seccomp \
--private-tmp \
--whitelist=~/.classifinder \
--read-only=~ \
--read-write=~/.classifinder \
classifinder-mcpDrops all capabilities + applies a default seccomp filter
Filesystem: home is read-only, only
~/.classifinder/writableProcess runs without root privilege escalation
Network egress remains open (required for
api.classifinder.ai) — pair with host-level egress filtering (ufw,iptables, ornftables) if you want network restriction
Bubblewrap (Linux)
bwrap \
--ro-bind / / \
--bind ~/.classifinder ~/.classifinder \
--proc /proc --dev /dev --tmpfs /tmp \
--unshare-pid --unshare-uts --new-session --die-with-parent \
--setenv CLASSIFINDER_API_KEY "$CLASSIFINDER_API_KEY" \
classifinder-mcpRead-only bind mount of
/; writable bind only for~/.classifinder/Fresh PID + UTS namespaces; new session
--die-with-parentensures the sandbox tears down if the host process exitsAPI key passed via setenv, no file mount needed
Verification
These profiles are documented starting points. None are exercised in this repo's CI — they're correctness-by-construction (read-only bind mounts, dropped caps, single-purpose tmpfs) rather than test-validated. If you run a sandbox in production and want me to roll a verified profile into a future release, open an issue with the exact invocation you're using.
Audit Log
The MCP server appends one JSONL line per tool call to a local audit file. Metadata only — the audit log never contains your input text or any detected secret values.
Default path: ~/.classifinder/mcp-audit.log
Fields per line:
{
"timestamp": "2026-05-22T15:30:42.123456Z",
"tool": "classifinder_scan",
"input_byte_count": 142,
"finding_count": 1,
"latency_ms": 87.4
}Configuration (env vars):
Variable | Default | Purpose |
|
| Set to |
|
| Override the log path |
The audit log is observability for your own use — useful for compliance (proving the MCP server ran), debugging (correlating latency spikes), and forensic review (which tool ran when). Write failures are silent; the tool call always succeeds even if the audit cannot be written.
Verifying a Release
Every published release is signed twice:
PyPI attestations (PEP 740) — minted by PyPI from this repo's OIDC identity during publish. Verified automatically by
pipwhen installing from PyPI; you don't need to do anything.Sigstore bundles — published as GitHub Release assets (
*.sigstore.jsonnext to the sdist + wheel). Verify withsigstore-python:
pip install sigstore
gh release download v0.1.4 --repo ClassiFinder/classifinder-mcp \
--pattern '*.whl' --pattern '*.sigstore.json'
sigstore verify identity \
--bundle classifinder_mcp-0.1.4-py3-none-any.whl.sigstore.json \
--cert-identity 'https://github.com/ClassiFinder/classifinder-mcp/.github/workflows/release.yml@refs/tags/v0.1.4' \
--cert-oidc-issuer 'https://token.actions.githubusercontent.com' \
classifinder_mcp-0.1.4-py3-none-any.whlThe signing identity binds the artifact to this repo's release.yml workflow at a specific tag — an attacker can't forge a valid bundle without compromising GitHub's OIDC token issuance.
See Also
For CLI scanning instead of MCP, see cfsniff — a command-line tool that scans files, shell history, and configs for secrets (pipx install cfsniff).
Disclaimer
ClassiFinder is a detection aid, not a guarantee. No scanner catches 100% of secrets in 100% of formats. See our Terms of Service for full details.
License
MIT
Available Tools
2 toolsclassifinder_redactA
Scan text and replace all detected secrets with safe placeholders.
Returns clean text safe to forward to any LLM or logging system. Use this before sending user input to a model.
Args: text: The text to redact. redaction_style: How to replace secrets. Options: "label" - [AWS_ACCESS_KEY_REDACTED] (default) "mask" - AKIA************** "hash" - [REDACTED:sha256:a1b2c3d4]
Inputs: text (required), redaction_style. Returns: result
classifinder_scanA
Scan text for leaked secrets and credentials.
Returns structured findings with type, severity, confidence, and remediation guidance. Use this to check if text contains API keys, passwords, tokens, or other sensitive credentials.
Args: text: The text to scan for secrets. min_confidence: Minimum confidence threshold (0.0-1.0). Default 0.5.
Inputs: text (required), min_confidence. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools have clearly distinct purposes: scan detects secrets, redact replaces them. There is no overlap in functionality.
Both tools follow the consistent pattern 'classifinder_<verb>', using snake_case and descriptive verbs (scan, redact).
With only two tools, the set is minimal but appropriate for a focused secrets-handling utility. Could potentially include a 'classify' tool, but current scope is clear.
The pair covers the full workflow: scanning for secrets and redacting them. No obvious missing operations for the stated purpose.
Maintenance
Related MCP Connectors
Find and redact leaked secrets, wallet keys and PII before an AI agent sends text.
Scan web pages, mails, PDFs and tool output for prompt injection before your agent reads them.
Detect and redact PII and secrets (API keys, tokens) in text, HTML or PDF before it reaches an LLM.
Prompt-injection scanner for AI agents. Check untrusted content before your agent acts on it.
Related MCP Servers
- AlicenseAqualityCmaintenanceProtects AI agents from threats like prompt injection, jailbreaks, and SQL injection through a multi-layer scanning pipeline. It also enables PII redaction and rehydration to ensure data privacy during LLM interactions.12154 npm2Apache 2.0
- FlicenseNot gradedqualityDmaintenanceSecurity middleware for LLM apps and AI agent pipelines. Detects prompt injection attacks (22 signatures, 7 languages) and anonymizes PII (17 entity types). Deterministic, sub-25ms, GDPR Art.30 compliant.-
- AlicenseNot gradedqualityBmaintenanceInput/output safety gate for AI agents: detect prompt-injection/jailbreak, leaked secrets/PII, and URL/IP reputation. Deterministic, no LLM.1MIT
- AlicenseAqualityCmaintenanceEnables LLM application builders and security teams to detect and strip prompt injections, scan for secrets, obfuscate PII, and audit synthetic datasets for bias using deterministic tools.5MIT