MCP GitHub Validator
Validates GitHub repositories against configurable rules for React applications, including structure, configuration, dependency, and naming checks.
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., "@MCP GitHub Validator List all my React repositories"
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.
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 all React repositories from your GitHub account |
| Get file/folder structure of a repository |
| Validate a single repo against best practices |
| Batch validate multiple repositories |
| List all available validation rules |
Validation Rules
Structure Rules
structure/has-src-folder- Project should have a src/ folderstructure/has-components-folder- React apps need a components folderstructure/has-domain-folder- Domain-driven apps should have domain/features/modulesstructure/has-hooks-folder- Custom hooks should be in a hooks folderstructure/has-services-folder- API layer should be organized
Configuration Rules
config/has-typescript- Project should use TypeScriptconfig/has-eslint- Project should have ESLint configuredconfig/has-prettier- Project should have Prettier configured
Dependency Rules
dependencies/has-state-management- Check for state management librariesdependencies/has-testing- Check for testing librariesdependencies/react-version- Ensure React 18+
Naming Rules
naming/component-files- Component files should use PascalCase
Installation
cd mcp-github-validator
npm install
npm run buildConfiguration
Environment Variables
Create a .env file or set the environment variable:
GITHUB_TOKEN=your_github_personal_access_tokenA 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 typecheckProject 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.mdAvailable Tools
5 toolsget_repo_structureB
Get the file/folder structure of a GitHub repository. Useful for understanding project organization before validation.
Inputs: repoName (required), maxDepth.
list_react_reposB
List all React repositories from the configured GitHub account. Returns repo names, descriptions, and whether they are React apps.
Inputs: includeNonReact.
list_rulesA
List all available validation rules with their descriptions and severity levels.
Inputs: category.
validate_all_reposA
Validate multiple repositories at once. If no repos specified, validates all React repositories found in the account.
Inputs: repoNames, categories.
validate_repoA
Validate a single GitHub repository against React best practices and domain pattern rules. Returns pass/fail for each rule with suggestions.
Inputs: repoName (required), ruleIds, categories.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogā¦
TDQS
Scored across 5 tools
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.
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.
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.
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
Related MCP Connectors
Screens public GitHub repos and PRs to generate risk maps, findings, and merge-readiness signals.
Evaluates any GitHub repository for license risk, maintenance velocity, stars/forks, and security.
GitHub security scanning, code audit, and workflow automation for repositories.
Designs React sites with animated components fitted to your brand, then checks each page.
Related MCP Servers
- AlicenseAqualityDmaintenanceA lightweight, configurable server that fetches coding guidelines, security rules, and validation patterns from external sources to help development teams maintain code quality standards in WordPress projects.35MIT
- FlicenseAqualityDmaintenanceA deterministic, network-free MCP server for validating repository release hygiene and version alignment in local projects. It enables automated repository health checks and generates standardized release checklists based on project state.1-
- FlicenseNot gradedqualityDmaintenanceA TypeScript MCP server that validates codebases against configurable rules. It analyzes files for violations and generates JSON reports, supporting custom rule definitions and file extensions.-
- FlicenseCqualityDmaintenanceA configurable MCP server for managing multiple GitHub repositories, branches, pull requests, and files, with built-in company documentation and validation.3-