MCP Secure Agents
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
MCP Secure Agents
Практический репозиторий про безопасных AI-агентов: минимальные права, allowlist, валидация, Human-in-the-Loop, sandbox и аудит.
Главная идея: модель может ошибаться — система не обязана позволять ей выполнить опасное действие.
Базовая схема
USER → AGENT → POLICY → TOOL → RESULT
↓
BLOCKАгент выбирает действие, но выполнение контролируется отдельным слоем политик.
Prompt ≠ Security Boundary.
Related MCP server: Kali MCP Security Lab
Что здесь есть
минимальные права;
allowlist инструментов;
валидация параметров;
блокировка опасных операций;
Human-in-the-Loop для чувствительных действий;
журналирование решений;
простой policy engine.
Демо-сценарий
Пользователь ставит задачу анализа пакета. Агент может читать разрешённые данные и искать сведения об уязвимостях, но изменение данных и произвольные shell-команды запрещены политикой.
READ DATA → ALLOWED
SEARCH DATA → ALLOWED
EXPORT RESULT → approval / policy
WRITE DATA → BLOCKED
RUN SHELL → BLOCKEDЭто демонстрирует принцип из доклада: границы задаются архитектурой и политиками, а не обещанием модели вести себя безопасно.
Security controls
Allowlist
Агент видит только явно разрешённые инструменты.
Least privilege
Каждый инструмент получает минимально необходимые права.
Validation
Параметры tool-call проверяются до выполнения.
Human-in-the-Loop
Чувствительное действие можно остановить до исполнения и передать решение человеку.
Sandbox
Код и потенциально опасные операции выполняются в изолированной среде.
Audit
Решения, разрешения и блокировки фиксируются для последующего анализа.
Быстрый старт
Требования
Python 3.10+
uvилиpip
git clone https://github.com/TopskiyPavelQwertyGang/mcp-secure-agents.git
cd mcp-secure-agents
uv sync
uv run python demo.pyMCP server:
uv run mcp dev server.pyЧто попробовать руками
Запустить
demo.py.Посмотреть разрешённые действия.
Попробовать запрещённое действие и увидеть
BLOCKED.Изменить
policies/agent-policy.yaml.Запустить пример повторно и увидеть, как политика меняет поведение системы.
Структура
.
├── README.md
├── QUICKSTART.md
├── demo.py
├── server.py
├── policy.py
├── validators.py
├── audit.py
├── pyproject.toml
├── policies/
│ └── agent-policy.yaml
├── examples/
└── docs/
├── threat-model.md
└── controls.mdLearning path
mcp-protocol-guide — понять MCP.
mcp-secure-agents — понять границы и policy enforcement.
mcp-use-cases — применить подход к своим сценариям.
Важно
Это учебный security lab, а не production-ready security framework. Примеры намеренно абстрактны и не описывают внутреннюю архитектуру, политики или процессы какой-либо организации.
Для production потребуются собственная модель угроз, IAM, управление секретами, наблюдаемость, rate limits, аудит и другие контроли в зависимости от сценария.
Prompt ≠ Security Boundary
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
One MCP server for all your MCP servers: code mode, per-tool permissions, approvals and audit.
Security scanner for MCP servers. Detect vulnerabilities, prompt injection, and tool poisoning.
The MCP server that vets MCP servers: identity, risk grade and per-tool risk before you install.
MCP gateway with runtime security policy, tool-call-level control, and audit of agent actions.
Related MCP Servers
- AlicenseAqualityCmaintenanceSecurity-hardened MCP server that runs only allowlisted commands with no shell, jailed to a single directory, and bounded execution.2MIT
- AlicenseNot gradedqualityDmaintenanceA safety-constrained MCP server that exposes selected Kali Linux and Nmap capabilities within an authorized lab network, enforcing strict scope limitations and audit logging.MIT
- AlicenseBqualityCmaintenanceMCP server for AI-driven VAPT orchestration, enabling agents to plan and execute authorized security scans through a control plane that enforces scope, sanitization, budget, rate limits, human approval, and audit logging.127MIT
- FlicenseNot gradedqualityAmaintenanceA safety-first MCP server enabling file inspection/editing, allowlisted command execution, process listing, and optional desktop automation. It emphasizes security with disabled writes/commands/GUI by default and local feature gates.1-