llmsecurity-mcp
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., "@llmsecurity-mcp scan my CLAUDE.md for prompt injection patterns"
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.
llmsecurity-mcp
A local, dependency-free MCP (Model Context Protocol) server exposing LLMSecurity.dev's security checks as tools an AI coding agent (Claude Code, Claude Desktop, Codex, or any other MCP-capable client) can call directly — no network access, no API key, nothing leaves your machine.
Everything here runs on the Python standard library only. No pip install
of third-party packages is required to use it.
Tools
Tool | What it does |
| Scans |
| Classifies a proposed tool call (command + path) as |
| Runs the same jailbreak/injection pattern detectors LLMSecurity.dev's hosted scanner uses, against arbitrary text. |
| Scans local RAG source documents for indirect prompt injection, secrets, and PII before you chunk/embed them. |
| Maps a scan report's findings to OWASP LLM Top 10 (2025) / NIST AI RMF / MITRE ATLAS — evidence for a review, not a certification. |
| Inventories skills and MCP package manifests ( |
| Analyzes model-API telemetry (bursts, cost drains, repeated probes, auth failures) for abuse signals — no prompt bodies required or accepted. |
| Evaluates a proposed MCP tool call against a local allowlist/approval/destination policy. |
Related MCP server: agent-security-scanner-mcp
Install
git clone https://github.com/afterdarksys/llmsecurity-mcp
cd llmsecurity-mcp
python3 -m pytest tests/ -q # optional: confirm it works in your environment (51 tests)No dependencies to install — every tool here is pure standard-library Python (3.10+).
Configure
Claude Code
claude mcp add llmsecurity -- python3 -m workers.agent_security.mcp_serverRun that from inside your llmsecurity-mcp checkout (or pass --cwd /path/to/llmsecurity-mcp
if you're not there).
Claude Desktop (or any client using claude_desktop_config.json-style config)
{
"mcpServers": {
"llmsecurity": {
"command": "python3",
"args": ["-m", "workers.agent_security.mcp_server"],
"cwd": "/absolute/path/to/llmsecurity-mcp"
}
}
}Standalone CLIs
Each pillar also has its own CLI, usable without any MCP client at all:
python3 -m workers.agent_security.cli scan-config .
python3 -m workers.agent_security.cli scan-prompt --file instructions.txt
python3 -m workers.agent_security.cli check-tool --tool-name Bash --input-json '{"command":"rm -rf /"}'
python3 -m workers.supply_chain.cli --mode trust .
python3 -m workers.supply_chain.cli --mode secrets .
python3 -m workers.data_security.cli ./docs
python3 -m workers.governance.cli path/to/scan-report.json
python3 -m workers.model_security.cli model-events.jsonl
python3 -m workers.mcp_security.cli --policy mcp-policy.json --tool send_email --arguments '{"to":"vendor@example.com"}'Run --help on any of them for exact flags — they're independent, small
argparse wrappers around the same functions the MCP server calls.
What's deliberately not here
This is a subset of the full LLMSecurity.dev platform, extracted specifically because it has zero third-party dependencies and needs no network access or API key:
PII anonymization/deanonymization (
workers.data_security.anonymize) needspresidio-analyzer+ a spaCy model and is not included — it lives in the main platform.Active scanning (Garak/Promptmap/PyRIT against a live model target) is a hosted/authenticated service, not a local tool — see llmsecurity-cli for the CLI that talks to it.
Output-side response scanning (refusal/banned-content/malicious-URL detection on a model's reply) is part of the hosted prompt-scanner API, also reachable from
llmsecurity-cli.
Related
llmsecurity.dev — the hosted platform (dashboard, community prompt library, active scanning).
llmsecurity-cli — the
adllmseccommand-line client for the hosted API.
License
MIT — see LICENSE.
Available Tools
8 toolsanalyze_model_abuseB
Analyze customer-controlled model API telemetry for burst, cost-drain, repeated-query, and auth-failure signals. Never supply prompt bodies.
Inputs: events (required).
check_mcp_policyC
Evaluate an MCP tool call against a local allowlist/approval/destination policy.
Inputs: policy (required), arguments (required), tool_name (required).
check_tool_call_safetyC
Classify a proposed tool call as allow, ask, or deny before execution.
Inputs: tool_name (required), tool_input (required).
map_security_coverageB
Map a LLMSecurity scan report to OWASP LLM 2025, NIST AI RMF, and MITRE ATLAS coverage evidence. This is not a compliance certification.
Inputs: report (required).
scan_agent_configA
Scan AGENTS.md, CLAUDE.md, SKILL.md, .claude, and .codex files locally for prompt injection.
Inputs: path.
scan_prompt_for_injectionC
Run existing PromptGuard patterns against supplied instructions.
Inputs: text (required).
scan_rag_sourceA
Scan local RAG source documents for prompt injection, secrets, and PII before indexing.
Inputs: path.
scan_skill_trustC
Build a local trust inventory for skills, MCP package manifests, and risky install scripts.
Inputs: path.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Most tools have clear targets (config files, prompts, RAG docs, skills, telemetry), but check_tool_call_safety and check_mcp_policy both evaluate tool calls against policy, so an agent could easily pick the wrong one.
All tools follow snake_case verb_object naming (scan_*, check_*, map_*, analyze_*) with no mixed conventions, making the set predictable and easy to navigate.
Eight tools is well within the ideal range, and each tool covers a distinct security workflow without feeling bloated or too thin.
The set covers scanning, policy enforcement, trust inventory, and abuse detection, but lacks a remediation/response tool and some scans only apply to pre-indexing or pre-execution stages.
Related MCP Connectors
Security scanner for AI agents: prompt injection, leaked secrets, PII, and SSRF-risk URL detection.
Prompt-injection scanner for AI agents. Check untrusted content before your agent acts on it.
Security scanner for AI agents and MCP servers: injection, jailbreak, tool abuse.
Scan web pages, mails, PDFs and tool output for prompt injection before your agent reads them.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceFull-stack security for AI agents — static analysis + MCP runtime interception. 31 rules detect prompt injection, data exfiltration, backdoors, tool poisoning, and cross-file attack chains. Includes MCP proxy for real-time blocking, Python AST taint tracking, multi-language injection detection (8 languages), and AI-powered deep analysis. Free, offline, zero-config.83 npm17MIT
- AlicenseAqualityCmaintenanceA security scanner for AI coding agents and autonomous assistants that scans code for vulnerabilities, detects hallucinated packages, blocks prompt injection, and provides LLM-powered semantic code review via MCP or CLI.221,046 npm124MIT
- AlicenseNot gradedqualityCmaintenanceProvides security checks for AI agents, including secret scanning, CVE lookup, and dependency vulnerability scanning, all running locally except for CVE lookups.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to locally scan untrusted third-party tool descriptions, configurations, and content for security threats before installing or trusting them, returning structured verdicts without network access.4MIT