repo-guardian
repo-guardian
MCP-сервер предоставляет инструменты для проверки состояния репозиториев, чтобы любой агент мог защищать репозитории — выявлять фиксированные и нефиксированные зависимости, проблемы с соблюдением лицензий, секреты, зашитые в код, и мёртвый код.
Возможности
audit_dependencies — Анализирует
pyproject.toml,requirements*.txtиsetup.py; помечает точные версии, которые могут не получать исправления безопасности, и зависимости без ограничения версий.check_licenses — Проверяет указанные лицензии зависимостей на соответствие требованиям (копилефт GPL/AGPL, неизвестные лицензии, несовместимость лицензий с лицензией проекта).
scan_for_secrets — Ищет ключи AWS, токены GitHub, токены Slack, ключи Google API, ключи Stripe, блоки приватных ключей, присвоения паролей, bearer-токены и строки с высокой энтропией.
find_dead_code — Обнаруживает неиспользуемые импорты Python, неиспользуемые функции и файлы-сироты.
Все сканеры не требуют дополнительных зависимостей (только стандартная библиотека) и никогда не вызывают сбой сеанса MCP — ошибки возвращаются как результаты вызова инструментов.
Related MCP server: sdlc-integrity-mcp
Установка
pip install repo-guardianДля разработки:
git clone https://github.com/prem-the-dev/repo-guardian.git
cd repo-guardian
pip install -e ".[dev]"Быстрый старт (Claude Desktop / Cursor / Windsurf)
Добавьте в конфигурацию вашего MCP-клиента:
Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"repo-guardian": {
"command": "python",
"args": ["-m", "repo_guardian"]
}
}
}Cursor (.cursor/mcp.json)
{
"mcpServers": {
"repo-guardian": {
"command": "python",
"args": ["-m", "repo_guardian"]
}
}
}Windsurf (.codeium/windsurf/mcp.json)
Та же конфигурация, что и для Cursor выше.
Gemini CLI (gemini/.gemini/.mcp.json)
{
"mcpServers": {
"repo-guardian": {
"command": "python",
"args": ["-m", "repo_guardian"]
}
}
}Hermes Agent
Скопируйте включённый mcp.json в ваш профиль Hermes или объедините его с существующей конфигурацией MCP-сервера:
cp mcp.json ~/.hermes/profiles/mcp-specialist/mcp.json
hermes profile reload{
"mcpServers": {
"repo-guardian": {
"command": "python",
"args": ["-m", "repo_guardian"]
}
}
}Примеры использования
После настройки любой агент может вызывать инструменты:
Аудит зависимостей
audit_dependencies(path="/path/to/my-project")Возвращает:
{
"status": "ok",
"scanned_files": ["pyproject.toml", "requirements.txt"],
"total_dependencies": 4,
"pinned_dependencies": [
{"name": "Django", "version_spec": "==4.2.7", "classification": "pinned"}
],
"potential_issues": [
{"type": "pinned_exact", "dependency": "Django", "message": "..."}
]
}Проверка лицензий
check_licenses(path="/path/to/my-project")Возвращает:
{
"status": "ok",
"project_license": "MIT",
"restricted_licenses": [],
"unknown_licenses": [...],
"potential_issues": []
}Поиск секретов
scan_for_secrets(path="/path/to/my-project", max_file_size_mb=5)Возвращает:
{
"status": "ok",
"total_findings": 3,
"findings": [
{"type": "aws_access_key", "file": ".env", "line": 2, "confidence": "high"},
{"type": "github_token", "file": "config.py", "line": 5, "confidence": "high"}
]
}Обнаружение мёртвого кода
find_dead_code(path="/path/to/my-project")Возвращает:
{
"status": "ok",
"unused_imports": [
{"type": "unused_import", "file": "main.py", "line": 3, "name": "unused_module"}
],
"unused_functions": [
{"type": "unused_function", "file": "main.py", "line": 12, "name": "unused_function"}
],
"orphaned_files": [...]
}Запуск тестов
python -m pytest tests/ -vАрхитектура
graph TD
A[MCP Client<br/>Claude/Cursor/Windsurf/Hermes] -->|stdio JSON-RPC| B[MCP Server<br/>repo_guardian]
B --> C[Tool Registry<br/>tools/list + tools/call]
C --> D[audit_dependencies]
C --> E[check_licenses]
C --> F[scan_for_secrets]
C --> G[find_dead_code]
D --> D1[pyproject.toml parser]
D --> D2[requirements.txt parser]
D --> D3[setup.py parser]
E --> E1[SPDX license DB<br/>offline lookup]
E --> E2[Project license<br/>detect]
F --> F1[Pattern matchers<br/>AWS/GH/Slack/etc]
F --> F2[Shannon entropy<br/>high-entropy scan]
G --> G1[AST parser<br/>imports + defs]
G --> G2[Cross-file<br/>usage tracker]Лицензия
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables hybrid code audits using MCP tools across 12 domains, producing structured, scored, and actionable code quality reports.61MIT
- AlicenseAqualityAmaintenanceMCP server that provides audit and safety-check tools for enterprise SDLC code integrity, enabling AI agents to scan workspaces for lifecycle gaps, mock-theater tests, DRY violations, and language-specific issues in shell, JavaScript/HTML, and Python.4376MIT
- AlicenseAqualityCmaintenanceEnables policy-first defensive security operations for MCP, providing repository and web-security analysis with controlled authorization, scoped execution, and auditability.9MIT
- AlicenseAqualityCmaintenanceMCP server providing diagnostic tools to analyze software architecture, security, REST API compliance, and dependencies for multiple programming languages. Enables AI agents to run scans and audits on codebases.7MIT
Related MCP Connectors
Remote MCP for tool license checks, vendor policy review, alternatives, and license receipts.
Scan any public GitHub MCP-server repo for security issues. 37 MCP-specific L1 rules, 8 languages.
Generate AGENTS.md, AP2 compliance docs, checkout rules, debug playbook & MCP configs from any repo.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/prem-the-dev/repo-guardian'
If you have feedback or need assistance with the MCP directory API, please join our Discord server