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
Install Server
F
license - not found
A
quality
D
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

  • Screens public GitHub repos and PRs to generate risk maps, findings, and merge-readiness signals.

  • Scan any public GitHub MCP-server repo for security issues. 37 MCP-specific L1 rules, 8 languages.

  • GitHub project health, package dependency risk, trending repos, license & package comparison.

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

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