How it all works
A plain-language tour of the Blursec ecosystem: what the SDK does, what the Replit and MCP packages add on top, and exactly what to do to connect each one. No prior security knowledge required.The problem in one paragraph
Most account takeovers don’t involve anyone “hacking” your platform. Infostealer malware infects a user’s device and silently harvests every credential it can find — saved browser passwords and session cookies for your app, their SaaS tools, email, banking, and every other provider they use. Those credentials are packaged into stealer-log databases sold on the dark web, and an attacker simply logs into your platform with the user’s genuinely valid email + password (or replays a stolen session token). Your code never sees anything wrong — the credentials are correct. Blursec’s job is to answer one question before you accept a login: “Is this credential already in the wild?”How a check works (step by step)
When your server callsblursec.checkCredential(email, password):
blursec.verifySession(req).
Two more guarantees you get for free:
- Fail-open — if the Blursec API is slow, down, or unreachable, checks
return
{ leaked: false, recommendedAction: "allow", failedOpen: true }instead of throwing. An outage on our side never locks your users out. - Fast — checks are budgeted at 1500 ms worst-case and typically answer in under 50 ms.
The three pieces
Rule of thumb: the SDK protects your
/login endpoint in production
code; the MCP server is for humans-with-AI-assistants investigating
things. Never put an LLM in the login hot path.
Using the SDK (2 minutes)
Using the Replit adapter (3 minutes)
If your app lives on Replit, the adapter removes the remaining boilerplate:- Open your Repl’s Secrets pane (lock icon) and add
BLURSEC_API_KEY. npm i @blursec/sdk @blursec/replit- Wire the middlewares:
Connecting the MCP server (5 minutes)
The MCP server lets an AI assistant call Blursec as tools:blursec_check_credential, blursec_check_token, blursec_check_hash,
blursec_verify_session, and blursec_whoami.
You need two things: your Blursec API key and a one-block config in
your AI client. The key is passed as an environment variable only — it
never appears in prompts or chat history.
Claude Desktop / Claude Code
Add toclaude_desktop_config.json (Claude Desktop → Settings →
Developer → Edit Config), or .mcp.json for Claude Code:
VS Code (GitHub Copilot agent mode)
Create.vscode/mcp.json in your workspace:
Cursor and other MCP clients
Any client that speaks MCP over stdio works with the same shape: commandnpx, args ["-y", "@blursec/mcp"], and BLURSEC_API_KEY in env.
Try it
Ask your assistant:Is the credentialThe agent calls[email protected]/hunter2in any stealer log?
blursec_check_credential, and you get back leaked,
severity, and a recommendedAction — with the same k-anonymity guarantee
as the SDK (only the 10-character hash prefix leaves your machine).
Full tool reference and troubleshooting: AI agents & MCP.

