MCP GitHub Validator
A server that validates GitHub repositories against configurable rules for React applications, enabling structure, configuration, dependency, and naming checks.
README
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
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/ 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 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
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.