Skip to main content
Glama
guille-gallo

MCP GitHub Validator

by guille-gallo

MCP GitHub Validator

An MCP (Model Context Protocol) server that validates GitHub repositories against configurable rules. Designed for React applications with support for domain pattern checking, code structure validation, and dependency analysis.

Features

  • šŸ” List React Repos - Discover all React applications in your GitHub account

  • šŸ“ Inspect Structure - View file trees and project organization

  • āœ… Validate Repos - Run configurable rules against repositories

  • šŸ“Š Batch Validation - Validate multiple repos at once with summary reports

Related MCP server: mcp-policy-guardian

Available Tools

Tool

Description

list_react_repos

List all React repositories from your GitHub account

get_repo_structure

Get file/folder structure of a repository

validate_repo

Validate a single repo against best practices

validate_all_repos

Batch validate multiple repositories

list_rules

List all available validation rules

Validation Rules

Structure Rules

  • structure/has-src-folder - Project should have a src/ folder

  • structure/has-components-folder - React apps need a components folder

  • structure/has-domain-folder - Domain-driven apps should have domain/features/modules

  • structure/has-hooks-folder - Custom hooks should be in a hooks folder

  • structure/has-services-folder - API layer should be organized

Configuration Rules

  • config/has-typescript - Project should use TypeScript

  • config/has-eslint - Project should have ESLint configured

  • config/has-prettier - Project should have Prettier configured

Dependency Rules

  • dependencies/has-state-management - Check for state management libraries

  • dependencies/has-testing - Check for testing libraries

  • dependencies/react-version - Ensure React 18+

Naming Rules

  • naming/component-files - Component files should use PascalCase

Installation

cd mcp-github-validator
npm install
npm run build

Configuration

Environment Variables

Create a .env file or set the environment variable:

GITHUB_TOKEN=your_github_personal_access_token

A GitHub token is recommended to avoid rate limits. Create one at: https://github.com/settings/tokens

Claude Desktop

Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS or %APPDATA%\Claude\claude_desktop_config.json on Windows):

{
  "mcpServers": {
    "github-validator": {
      "command": "node",
      "args": ["/path/to/mcp-github-validator/dist/index.js"],
      "env": {
        "GITHUB_TOKEN": "your_github_token"
      }
    }
  }
}

VS Code with Copilot

Add to your VS Code settings or workspace .vscode/mcp.json:

{
  "servers": {
    "github-validator": {
      "type": "stdio",
      "command": "node",
      "args": ["${workspaceFolder}/../mcp-github-validator/dist/index.js"],
      "env": {
        "GITHUB_TOKEN": "${env:GITHUB_TOKEN}"
      }
    }
  }
}

Usage Examples

Once configured, you can ask Claude or Copilot:

  • "List all my React repositories"

  • "Show me the structure of the mapland repo"

  • "Validate the films repository"

  • "Validate all my React repos and show me a summary"

  • "What validation rules are available?"

  • "Check if user-lens follows domain patterns"

Adding Custom Rules

Create a new rule in src/rules/index.ts:

const myCustomRule: RuleDefinition = {
  id: "custom/my-rule",
  name: "My Custom Rule",
  description: "Description of what this rule checks",
  severity: "warning", // 'error' | 'warning' | 'info'
  category: "structure", // or 'config', 'dependencies', 'naming', 'domain-pattern'
  async validate(ctx: ValidationContext): Promise<RuleResult> {
    // Your validation logic here
    const passed = pathExists(ctx.fileTree, "some/path");
    
    return {
      ruleId: this.id,
      passed,
      severity: this.severity,
      message: passed ? "Check passed" : "Check failed",
      suggestions: passed ? undefined : ["How to fix this"],
    };
  },
};

// Add to allRules array
export const allRules: RuleDefinition[] = [
  // ... existing rules
  myCustomRule,
];

Development

# Install dependencies
npm install

# Build
npm run build

# Watch mode
npm run dev

# Type check
npm run typecheck

Project Structure

mcp-github-validator/
ā”œā”€ā”€ src/
│   ā”œā”€ā”€ index.ts        # MCP server entry point
│   ā”œā”€ā”€ github.ts       # GitHub API utilities
│   ā”œā”€ā”€ types.ts        # TypeScript type definitions
│   ā”œā”€ā”€ tools.ts        # MCP tool implementations
│   ā”œā”€ā”€ validator.ts    # Validation engine
│   └── rules/
│       └── index.ts    # Validation rule definitions
ā”œā”€ā”€ package.json
ā”œā”€ā”€ tsconfig.json
└── README.md

Available Tools

5 tools
get_repo_structureB

Get the file/folder structure of a GitHub repository. Useful for understanding project organization before validation.

ParametersJSON Schema
NameRequiredDescriptionDefault
maxDepthNoMaximum depth for file tree traversal (default: 3)
repoNameYesName of the repository to inspect

TDQS

B3.4/5.0
Behavior2/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 of behavioral disclosure. The description does not state whether this is a read-only operation, whether it makes network calls, how large the output could be, or how the structure is returned (which is significant given no output schema exists). For a tool with zero annotation coverage, this is a notable gap.

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

Conciseness4/5

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

Two concise sentences that front-load the core purpose and add a usage hint. No wasted words. Slightly more detail on behavior could improve it, but it is efficiently written.

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

Completeness3/5

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

For a relatively simple two-parameter inspection tool with full schema coverage, this is reasonably complete. However, with no output schema and no annotations, the description doesn't clarify return format or behavioral characteristics (read-only nature, network dependency). Given the tool's simplicity, this is adequate but not rich.

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%, so both parameters (repoName, maxDepth) are documented in the schema itself. The description adds no parameter-level information beyond what the schema provides. Since the schema fully covers parameters, baseline 3 is appropriate.

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

Purpose4/5

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

The description states a specific verb+resource ('Get the file/folder structure of a GitHub repository') and adds context about understanding project organization. It distinguishes from siblings — 'validate_repo' and 'list_react_repos' clearly serve different purposes. Could name the repo-required precondition but otherwise purpose is clear.

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 provides clear context for when to use this tool ('before validation'), which frames its role in a workflow. It doesn't explicitly mention alternatives or exclusions, but the second sentence gives useful situational guidance relative to sibling tools like validate_repo.

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

list_react_reposB

List all React repositories from the configured GitHub account. Returns repo names, descriptions, and whether they are React apps.

ParametersJSON Schema
NameRequiredDescriptionDefault
includeNonReactNoInclude non-React repositories in the listing

TDQS

B3/5.0
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. It does state the return content (names, descriptions, React status), which is helpful, but it doesn't disclose how the 'configured GitHub account' is determined, whether this makes network calls that could be slow/fail, whether results are paginated, or any idempotency/caching behavior. For a tool that appears to be a read-only listing operation, some behavioral transparency is missing.

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

Conciseness4/5

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

Two sentences, no filler, front-loaded with the core purpose immediately. Each sentence earns its place: the first states the function, the second states what's returned. It could arguably add usage guidance, but as written it's compact and free of waste. Loses one point for being slightly under-specified rather than elegantly concise.

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?

For a listing tool with only one param, high schema coverage, no output schema, and no annotations, the description is adequate but thin. It doesn't explain pagination, ordering, error behavior, or how the 'configured' account is established, and with no output schema the agent has to infer the return structure from the prose. Given the tool's apparent simplicity (list repos), a 2 reflects that it meets minimum expectations but doesn't fully equip the agent.

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

Parameters4/5

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

Schema coverage is 100% and there's only one parameter (includeNonReact), which the schema already describes as 'Include non-React repositories in the listing.' The description's phrase 'from the configured GitHub account' adds context about the source scope, and the parameter is straightforward. Since schema fully covers the param, baseline is 3, but the description's mention of the configured-account source adds marginal value relevant to the listing scope, justifying a 4.

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

Purpose4/5

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

The description uses a specific verb+resource combination ('List all React repositories') that clearly states the tool's function. It names what it returns (repo names, descriptions, React status), distinguishing it from siblings. However, it doesn't explicitly contrast with sibling tools like get_repo_structure or validate_all_repos, so it loses a point for sibling differentiation.

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?

No usage context is provided. There's no guidance on when to use this tool vs alternatives, no prerequisites mentioned (e.g., needing a configured account already in place), and no exclusions stated. The context signals show no annotations to help, and the description gives only an implicit 'use this to list React repos' which is self-evident.

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

list_rulesA

List all available validation rules with their descriptions and severity levels.

ParametersJSON Schema
NameRequiredDescriptionDefault
categoryNoFilter rules by category

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 disclosing behavior. 'List' implies read-only, but the description does not explicitly state that it has no side effects, requires no special permissions, or how it handles large result sets. It adds some value by mentioning the output content, but lacks explicit behavioral guarantees.

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, well-structured sentence that front-loads the primary action and includes essential output details. No filler words, and every word contributes to understanding the tool's purpose.

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 simple tool with one optional parameter and no output schema, the description is largely complete. It lacks a note that the category filter is optional and does not specify the exact return format (e.g., array of objects), but the overall context from siblings and schema is sufficient.

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 description does not mention the optional 'category' parameter, but the schema covers it fully with an enum and description ('Filter rules by category'). Schema coverage is 100%, so the baseline is 3; the description adds no extra semantic value beyond what the schema already provides.

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 ('List') and resource ('all available validation rules'), and specifies the output includes descriptions and severity levels. This clearly distinguishes it from sibling tools like validate_repo or list_react_repos, which perform different actions.

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 context is clear: this is a read-only listing tool for validation rules. However, it does not explicitly state when to use it over alternatives or mention exclusions (e.g., 'use validate_repo to run validations'). The sibling names provide context, but the description itself lacks direct guidance.

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

validate_all_reposA

Validate multiple repositories at once. If no repos specified, validates all React repositories found in the account.

ParametersJSON Schema
NameRequiredDescriptionDefault
repoNamesNoList of repository names to validate. Defaults to all React repos if not specified.
categoriesNoFilter rules by category

TDQS

A3.5/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. It discloses the default behavior (validates all React repos if unspecified) which is useful, but doesn't state whether validation is read-only, what happens on partial failures, whether it's a long-running operation, or what the output format is. The description adds value but leaves significant behavioral questions unanswered.

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?

Extremely concise — two sentences that cover purpose and default behavior with zero wasted words. Effectively front-loaded and to the point.

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

Completeness3/5

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

For a 2-parameter batch validation tool with 100% schema coverage, the description covers the core purpose and default behavior adequately. However, with no annotations and no output schema, some additional detail about validation outcomes, error handling across repos, or scope of validation categories would improve completeness. The categories parameter's impact on filtering also isn't fully connected to behavior.

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 description coverage is 100%, so the schema already documents both parameters. The description adds the default-repo behavior context but doesn't add meaningful nuance to parameters beyond what the schema provides. The categories enum values are self-explanatory in the schema. Baseline 3 is appropriate.

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

Purpose4/5

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

The description clearly states the tool validates multiple repositories at once and has a sensible default behavior (validates all React repos if none specified). It distinguishes itself from the sibling validate_repo by covering batching/multi-repo validation, though it doesn't explicitly contrast with the sibling.

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 when to use it (validating multiple repos) and states the default behavior when no repos are specified. However, it doesn't explicitly state when to use validate_repo instead (single repo case) or reference the sibling tools, which would clarify trade-offs between batching validations.

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

validate_repoA

Validate a single GitHub repository against React best practices and domain pattern rules. Returns pass/fail for each rule with suggestions.

ParametersJSON Schema
NameRequiredDescriptionDefault
ruleIdsNoSpecific rule IDs to run
repoNameYesName of the repository to validate
categoriesNoFilter rules by category

TDQS

A4/5.0
Behavior3/5

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

No annotations exist, so the description carries full burden. It discloses that the tool runs validation rules and returns pass/fail per rule with suggestions, which is the core behavior. However, it doesn't disclose whether validation triggers side effects, requires network access/auth, has rate limits, or whether results are cached. For a validation tool this is reasonably transparent but not exhaustive.

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?

Two sentences, zero waste. States the operation, scope, and output format efficiently. Every word earns its place.

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?

The tool is moderate complexity (three params, validation logic), but with 100% schema coverage and no output schema to document, the description covers the essentials: what it does and what it returns. It could mention how to restrict which rules run (via ruleIds/categories), but the schema already documents those. Slightly incomplete for a validation tool that might have nuanced behavior, but adequate.

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%, so the baseline is 3. The description mentions 'best practices and domain pattern rules' which hints at what categories/ruleIds might correspond to, but doesn't explain the relationship between ruleIds and categories (e.g., whether they're mutually exclusive or combinable, or what format rule IDs take). Schema descriptions already cover each parameter's basic meaning, so the description adds minimal extra value.

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 verb (Validate), the resource (single GitHub repository), the scope (React best practices and domain pattern rules), and the outcome (returns pass/fail with suggestions). It effectively distinguishes itself from sibling tools: validate_all_repos (plural validation) and the read-only get_repo_structure/list_react_repos tools.

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 phrase 'single' explicitly signals this is for one repository at a time, distinguishing it from validate_all_repos. The description implies this runs rule-based checks vs structural inspection (get_repo_structure), but it doesn't explicitly name alternatives or provide exclusions (e.g., 'use validate_all_repos for bulk' or 'do not use for structural inspection').

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

TDQS

A3.7/5.0
Disambiguation4/5

Tools are mostly distinct: list_rules shows available validations, validate_repo and validate_all_repos are clearly scoped by single vs. batch, and list_react_repos/get_repo_structure serve supporting roles. The two validation tools could overlap in purpose but are differentiated by their descriptions.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern: list_rules, validate_repo, validate_all_repos, list_react_repos, get_repo_structure. The naming is predictable and easy to navigate.

Tool Count5/5

With 5 tools, the server is well-scoped for its stated purpose of validating React repositories. Each tool has a clear role, and the count feels neither thin nor bloated.

Completeness4/5

The tool set covers the core workflow: list rules, list React repos, inspect structure, validate single or multiple repos. Minor gaps like rule management (add/update/delete) or a dedicated get-validation-history tool exist, but these are not essential for the primary validation use case.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

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/guille-gallo/mcp-github-validator'

If you have feedback or need assistance with the MCP directory API, please join our Discord server