repo-guardian
Detects hardcoded GitHub tokens in scanned repositories so agents can identify exposed credentials before they leak.
Detects exposed Google API keys in source files to help prevent unauthorized use of Google APIs.
Detects exposed Slack tokens in source files to help prevent unauthorized access to Slack workspaces.
Detects exposed Stripe keys in source files to help prevent unauthorized payment operations.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@repo-guardianScan this repo for hardcoded secrets before I commit it"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
repo-guardian
MCP server exposing repo-health tools so any agent can guard repositories — detect pinned/unpinned dependencies, license compliance issues, hardcoded secrets, and dead code.
Features
audit_dependencies — Parse
pyproject.toml,requirements*.txt, andsetup.py; flag exact pins that may miss security patches and dependencies with no version constraints.check_licenses — Scan declared dependency licenses for compliance issues (GPL/AGPL copyleft, unknown licenses, license incompatibilities with the project license).
scan_for_secrets — Search for AWS keys, GitHub tokens, Slack tokens, Google API keys, Stripe keys, private key blocks, password assignments, bearer tokens, and high-entropy strings.
find_dead_code — Detect unused Python imports, unused functions, and orphaned files.
All scanners are dependency-free (stdlib only) and never crash the MCP session — errors are returned as tool results.
Related MCP server: scopeguard-mcp
Installation
pip install repo-guardianFor development:
git clone https://github.com/prem-the-dev/repo-guardian.git
cd repo-guardian
pip install -e ".[dev]"Quickstart (Claude Desktop / Cursor / Windsurf)
Add to your MCP client config:
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)
Same config as Cursor above.
Gemini CLI (gemini/.gemini/.mcp.json)
{
"mcpServers": {
"repo-guardian": {
"command": "python",
"args": ["-m", "repo_guardian"]
}
}
}Hermes Agent
Copy the bundled mcp.json into your Hermes profile or merge it with your
existing MCP server config:
cp mcp.json ~/.hermes/profiles/mcp-specialist/mcp.json
hermes profile reload{
"mcpServers": {
"repo-guardian": {
"command": "python",
"args": ["-m", "repo_guardian"]
}
}
}Usage Examples
Once configured, any agent can call the tools:
Audit Dependencies
audit_dependencies(path="/path/to/my-project")Returns:
{
"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
check_licenses(path="/path/to/my-project")Returns:
{
"status": "ok",
"project_license": "MIT",
"restricted_licenses": [],
"unknown_licenses": [...],
"potential_issues": []
}Scan for Secrets
scan_for_secrets(path="/path/to/my-project", max_file_size_mb=5)Returns:
{
"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
find_dead_code(path="/path/to/my-project")Returns:
{
"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": [...]
}Running Tests
python -m pytest tests/ -vArchitecture
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]License
MIT
Available Tools
4 toolsaudit_dependenciesA
Audit Python project dependencies for outdated, missing or pinned-to-fixed-version packages. Reads pyproject.toml, requirements*.txt and setup.py/setup.cfg.
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Repository or project root directory. | . |
TDQS
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.
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.
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.
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.
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.
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).
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Repository or project root directory. | . |
TDQS
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.
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.
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.
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.
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.
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).
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Python package or project directory. | . |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Repository or directory to scan. | . |
| max_file_size_mb | No | Skip files larger than this (default 5 MB). |
TDQS
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.
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.
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.
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.
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.
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.
4 tool updates
v0.1.0- First observed
audit_dependencies - First observed
check_licenses - First observed
find_dead_code - First observed
scan_for_secrets
TDQS
Scored across 4 tools
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.
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.
Four tools is a focused, well-scoped set for a repository auditing/guardian server. Each tool covers a meaningful area without redundancy or bloat.
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
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.
Scan any MCP server for tool-poisoning, security, auth & license. Trust score before install.
- gatewayOAuthai.sealgate
MCP gateway with runtime security policy, tool-call-level control, and audit of agent actions.
Related MCP Servers
- 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.413MIT
- AlicenseAqualityCmaintenanceEnables policy-first defensive security operations for MCP, providing repository and web-security analysis with controlled authorization, scoped execution, and auditability.9MIT
- AlicenseNot gradedqualityBmaintenanceEnables 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.40MIT

Celmis MCP Serverofficial
AlicenseNot gradedqualityAmaintenanceEnables querying indexed code across multiple repositories with file-level citations, reviewing pull requests, auditing dependencies, and exporting SBOMs and evidence packs through MCP tools.AGPL 3.0