
Lovec
io.github.lovec-techPublished by GitHub account lovec-techv0.1.2Updated Oct 24, 2026
Prompt-injection detector for untrusted text before it reaches an LLM (RU/EN). BYO lovec.tech key.
Overview
Local MCP server that lets an assistant check untrusted text for prompt injection through the lovec.tech detection API before passing it to another LLM.
- What you can do
- Check a single piece of untrusted text (web page, document, tool result, email) for prompt injection with the check_prompt_injection tool, in Russian and English content. Scan a whole corpus of documents with the separate lovec-scan command-line tool, which chunks long documents, writes resumable results and a summary with coverage and score statistics. Read that summary in the client through the injection_scan_report prompt, which supplies report rules such as not calling a corpus clean and showing coverage gaps.
- When to use it
- Useful when an assistant ingests text from outside sources and you want a detection verdict before that text reaches another model, or when you need a corpus-level scan report for a RAG store or document base.
- Requirements
- Runs locally as a Python package (pip or uvx). Requires a lovec.tech API key in the LOVEC_KEY environment variable; optional LOVEC_BASE and LOVEC_TIMEOUT variables. Network access to the lovec.tech API is needed.
Installation
In SourceWeft
- Open Lovec in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
lovec-mcp
Локальный MCP-сервер поверх детектора промпт-инъекций lovec.tech.
Даёт агентам (Claude Desktop, Claude Code, любой MCP-клиент) тул check_prompt_injection —
проверка недоверенного текста (веб-страница, документ, результат тула, письмо) перед тем,
как отдать его в другую LLM.
Работает только с вашим собственным ключом — сервер сам ничего не хранит и не логирует, но проверяемый текст уходит в API lovec.tech для анализа. Это тонкий клиент поверх уже существующего API-ключа/баланса с сайта.
Установка
Из PyPI:
Из исходников:
Ключ выпускается на lovec.tech
Быстрая проверка руками
Подключение к MCP-клиенту
Claude Desktop (claude_desktop_config.json) или Claude Code (.mcp.json) — один и тот же формат:
Если ставили из исходников — вместо uvx укажите интерпретатор venv и путь к server.py:
Скан корпуса и отчёт
Тул проверяет одну строку за вызов. Для целого корпуса (RAG, база документов) так не выйдет:
каждый вердикт садится в контекст агента, а API отвечает от секунд до минут. Поэтому цикл
вынесен в CLI lovec-scan, а агент читает готовую сводку.
Разбивает длинные документы на чанки ≤5000 символов, ходит в API конкурентно, пишет
results.jsonl построчно — прогон резюмируемый, повторный запуск дочитывает остаток.
Упавшие чанки считаются пробелом в покрытии, а не чистым результатом; на 402 (кончился
баланс) скан останавливается и помечает сводку как неполную.
На выходе summary.json: покрытие, доля флагов с 95% ДИ Уилсона по документам (не по чанкам —
чанки одного документа не независимы), гистограмма баллов, топ флагов с цитатами.
Дальше в MCP-клиенте вызываете prompt injection_scan_report — он подставляет сводку и
правила отчёта: не называть корпус чистым (ноль флагов — это верхняя граница, а не справка о
здоровье), не считать precision/recall на неразмеченном корпусе, показывать пробелы покрытия,
подавать флаги как очередь на разбор. Цитаты из корпуса помечены как недоверенные данные.
Переменные окружения
Source: README.md at commit 50fa1c3
Tools
0Version history
1- v0.1.2LatestSep 17, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts