Skip to main content
Glama

repo-guardian

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

기능

  • audit_dependencies — pyproject.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: Celmis MCP Server

설치

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

Available Tools

4 tools
audit_dependenciesA

Audit Python project dependencies for outdated, missing or pinned-to-fixed-version packages. Reads pyproject.toml, requirements*.txt and setup.py/setup.cfg.

NameRequiredDescriptionDefault
pathNoRepository or project root directory..

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden of behavioral disclosure. It does disclose that the tool 'Reads' specific manifest files, which strongly implies a non-mutating operation. However, it does not mention whether the tool makes network calls to check for outdated versions, what side effects may occur, or how results are returned.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two efficient sentences with no filler. The primary audit purpose is front-loaded, followed by concrete file-format details, and every clause adds useful information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with one optional parameter and no output schema, the description is nearly complete: it defines the audit scope, names the file types inspected, and implies a read-only operation. The main gap is not describing the result format or whether it consults an external package index, but the tool remains straightforward to invoke correctly with just a path.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already documents the single 'path' parameter as 'Repository or project root directory' with 100% coverage, so the description adds little parameter-level meaning. It reinforces that the path points to a Python project root, but this is not a significant addition beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('audit'), a clear resource ('Python project dependencies'), and the exact conditions it checks (outdated, missing, or pinned-to-fixed-version packages). It also names the manifest files it reads, making it easy to distinguish from sibling tools like check_licenses, scan_for_secrets, and find_dead_code.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description clearly signals when to use the tool: when auditing Python project dependency health. The scope is explicit enough that an agent can tell it apart from license, secrets, and dead-code tools, but it does not explicitly name alternatives or state exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

check_licensesA

Scan declared dependency licenses for potential compliance issues (e.g. GPL, AGPL, or missing license metadata).

NameRequiredDescriptionDefault
pathNoRepository or project root directory..

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. 'Scan' and 'potential compliance issues' convey a read-only intent and the kind of findings produced, but the description does not disclose what files are inspected, whether network access is needed, or what the output looks like. It is adequate but thin on behavioral detail.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, tightly written sentence that front-loads the purpose and provides concrete examples. Every word contributes value; there is no fluff or redundant restating of the tool name.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with one optional parameter, no output schema, and no annotations, the description is reasonably complete: it says what is scanned and what kinds of findings are surfaced. It does not describe the result format or exactly which dependency files are considered, but these are minor gaps for an agent deciding whether and how to invoke the tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already documents the single path parameter with 100% coverage ('Repository or project root directory'). The description's phrase 'declared dependency licenses' reinforces that the path points at a project, but it adds no meaningful parameter-level detail beyond the schema. Baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Scan') and a specific resource ('declared dependency licenses'), and it cites concrete issue examples (GPL, AGPL, missing license metadata). This clearly distinguishes it from siblings like scan_for_secrets and find_dead_code, and separates it from audit_dependencies by focusing on license compliance rather than general dependency auditing.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies the tool is for license compliance checks, but it does not explicitly state when to prefer this over audit_dependencies or any other sibling. No exclusions or alternative routing are provided, leaving the agent to infer appropriate usage from the tool name and summary.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

find_dead_codeA

Detect unused Python imports, unused functions and orphaned files (e.g. files never imported or referenced).

NameRequiredDescriptionDefault
pathNoPython package or project directory..

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must carry the behavioral load. 'Detect' implies a read-only analysis, and the description enumerates what is searched for, but it does not explicitly state that no files are modified, how the scan traverses the path, or the nature of the returned results.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence that states the tool's core purpose immediately, with an inline clarifying example for 'orphaned files'. There is no filler or redundant restatement of the tool name.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a one-optional-param read-only detector with no output schema, the description defines the scope and gives an illustrative example. It is complete enough for selection and invocation, though it stops short of describing the output format or limitations such as dynamic code detection.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the lone 'path' parameter is already described as a Python package or project directory. The description adds no extra parameter-level meaning, so the schema is doing the work; baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb ('Detect') and a well-defined resource: unused Python imports, unused functions, and orphaned files with a clarifying example. This scope is clearly distinct from sibling tools like audit_dependencies and scan_for_secrets, so an agent can identify when this tool applies.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied: call this when you need to find dead code in a Python project. However, it does not explicitly state when to prefer it over the listed alternatives or mention any exclusions/preconditions, so guidance is adequate but not robust.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

scan_for_secretsB

Search the repository for hardcoded secrets, high-entropy tokens and other potential credential leaks.

NameRequiredDescriptionDefault
pathNoRepository or directory to scan..
max_file_size_mbNoSkip files larger than this (default 5 MB).

TDQS

B3.3/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

There are no annotations or descriptions of behavior beyond the simple verb 'search.' It does not disclose side effects, return format, limitations (e.g., false positives, scanning methods), or any performance implications. The description is minimal and lacks transparency about what the tool actually does after the search.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence with no filler or redundancy. It efficiently conveys the tool's purpose without unnecessary detail, making it easy to parse and understand.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description omits any mention of the output or results. Since there is no output schema, the agent has no idea what will be returned (e.g., a list of findings, a summary, error messages). It also doesn't specify any preconditions or edge cases, leaving the tool's overall behavior incomplete from an agent's perspective.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Both parameters are fully described in the schema. 'path' is explained as 'Repository or directory to scan' and 'max_file_size_mb' as 'Skip files larger than this (default 5 MB).' These descriptions provide clear meaning and default values, giving complete semantic coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action (search) and the specific resource (repository) as well as the specific goal (finding hardcoded secrets, high-entropy tokens, credential leaks). It distinguishes itself from sibling tools (audit_dependencies, check_licenses, find_dead_code) by focusing on secret scanning.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description does not explicitly state when to use this tool versus alternatives. While the purpose is clear, there is no guidance on contextual triggers, such as 'use this when you need to check for exposed credentials' or when not to use it. The distinction from siblings is implicit but not spelled out.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 4 tool updatesv0.1.0
    • First observedaudit_dependencies
    • First observedcheck_licenses
    • First observedfind_dead_code
    • First observedscan_for_secrets

TDQS

A3.9/5.0

Scored across 4 tools

Disambiguation5/5

Each tool targets a clearly distinct concern: dependency hygiene, license compliance, secrets, and dead code. There is no meaningful overlap between them, so an agent can confidently select the right tool for a given task.

Naming Consistency5/5

All four tool names follow the same imperative verb_noun pattern: audit_dependencies, check_licenses, scan_for_secrets, find_dead_code. The naming is uniform, predictable, and easy to extend with additional checks.

Tool Count5/5

Four tools is a focused, well-scoped set for a repository auditing/guardian server. Each tool covers a meaningful area without redundancy or bloat.

Completeness4/5

The set covers the main repository health/security concerns: dependencies, licenses, secrets, and dead code. Minor gaps exist, such as no vulnerability/CVE scanning or remediation/generation tools, but the core read-only auditing surface is coherent and usable.

Maintenance

ActivityStale
ResponsivenessNo recent community issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables MCP-compatible AI agents to scan code for leaked secrets, copyleft licenses, unprotected routes, missing privacy policies, and risky card handling before committing or shipping.
    73 npm
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables MCP clients to scan codebases, persist and prioritize security findings against SLAs, retrieve CVE details, propose fixes, and create tickets through its tools. It also supports agent-assisted remediation drafting while enforcing human approval and preventing auto-merge.
    1
    MIT