Skip to main content
Glama

repo-guardian

리포지토리 상태(repo-health) 도구를 제공하는 MCP 서버로, 모든 에이전트가 리포지토리를 보호할 수 있습니다 — 고정(pinned) 또는 비고정(unpinned) 의존성, 라이선스 준수 문제, 하드코딩된 비밀값, 데드 코드를 감지합니다.

기능

  • audit_dependenciespyproject.toml, requirements*.txt, setup.py를 파싱하고, 보안 패치를 놓칠 수 있는 정확한 고정 버전(pin) 및 버전 제약이 없는 의존성을 표시합니다.

  • check_licenses — 선언된 의존성 라이선스에서 준수 문제(GPL/AGPL 카피레프트, 알 수 없는 라이선스, 프로젝트 라이선스와의 비호환성)를 검사합니다.

  • scan_for_secrets — AWS 키, GitHub 토큰, Slack 토큰, Google API 키, Stripe 키, 개인 키 블록, 비밀번호 할당, Bearer 토큰, 높은 엔트로피 문자열을 검색합니다.

  • find_dead_code — 사용되지 않는 Python 임포트, 사용되지 않는 함수, 고아 파일(orphaned files)을 감지합니다.

모든 스캐너는 외부 의존성이 없으며(표준 라이브러리만 사용) 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

A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

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