@blursec/mcp
v1.0.0
Published
Official Model Context Protocol (MCP) server for @blursec/sdk — lets AI agents check credentials, tokens, and sessions against live stealer-log threat intel.
Maintainers
Readme
@blursec/mcp
Official Model Context Protocol server for
@blursec/sdk — lets AI agents
(Claude, GitHub Copilot, Cursor, custom agents) check credentials, session
tokens, and hashes against live stealer-log threat intel.
TL;DR — one
npxcommand turns Blursec into five agent tools. All hashing happens locally; only a 10-character k-anonymity prefix ever leaves the machine. Zero runtime dependencies — the protocol core is hand-rolled.
Install & run
npm i -g @blursec/mcp @blursec/sdk # or run via npx, see belowThe server reads its configuration from the environment:
| env var | purpose |
|-----------------------|----------------------------------------------|
| BLURSEC_API_KEY | API key (required) |
| BLURSEC_ENVIRONMENT | production (default) / staging / local |
Never pass the API key as prompt text or argv — use the host's env block.
Claude Desktop / Claude Code
{
"mcpServers": {
"blursec": {
"command": "npx",
"args": ["-y", "@blursec/mcp"],
"env": { "BLURSEC_API_KEY": "bsk_live_..." }
}
}
}VS Code (GitHub Copilot)
.vscode/mcp.json:
{
"servers": {
"blursec": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@blursec/mcp"],
"env": { "BLURSEC_API_KEY": "${input:blursec-api-key}" }
}
}
}Tools
| Tool | Wraps | Use it for |
|------|-------|------------|
| blursec_check_credential | credentials.check | "Is this email+password leaked?" |
| blursec_check_token | credentials.checkToken | Session cookie / bearer token triage |
| blursec_check_hash | credentials.checkHash | Pre-hashed checks — most private, the raw secret never enters the conversation |
| blursec_verify_session | sessions.verify | Incident response on live sessions (auto-detects JWT vs opaque) |
| blursec_whoami | auth.whoami | Verify connectivity + key scope |
Deliberately not exposed: auth.rotate — it invalidates the live API key
immediately, which is far too destructive to hand to an autonomous agent.
Security model
- K-anonymity preserved — hashing happens inside the server process via the SDK; only the 10-hex-char prefix is transmitted to the Blursec API.
- No secret echo — tool results never repeat the input credential/token, so secrets are not duplicated into the model context.
- Fail-open is explicit — results carry
failedOpen: truewhen the database was unreachable. The server'sinitializeinstructions tell the model to treat that as unknown, never as safe. - Zero runtime dependencies — like the SDK itself, this package ships no third-party code. The MCP protocol subset (stdio framing, initialize, tools) is implemented in ~200 audited lines.
Embedding in-process
The protocol core is exported for hosts that want a custom transport:
import { BlursecMcpServer, createBlursecFromEnv } from "@blursec/mcp";
const server = new BlursecMcpServer(createBlursecFromEnv());
// Feed it newline-delimited JSON-RPC; undefined means "notification, no reply".
const reply = await server.handleLine(line);License
MIT © Blursec
