RepoMind
Integrates with the GitHub REST API to search existing issues (to avoid duplicates) and create new issues in a repository, using an optional GITHUB_TOKEN for authentication. The create_github_issue tool enforces an automated preflight duplicate check unless creation is explicitly confirmed.
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., "@RepoMindanalyze this repo and show the health score and churn hotspots"
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.
RepoMind π§
RepoMind is a production-quality Model Context Protocol (MCP) server that provides AI coding assistants (such as Claude Code, Cursor, and Windsurf) with structured, bounded, and defensive intelligence about software repositories.
Rather than dumping raw directory trees or unvetted file dumps into client context windows, RepoMind analyzes repository topology, enforces robust security sandboxing, inspects dependency manifests, evaluates Git revision churn, calculates transparent heuristic health scores, and enables safe GitHub issue workflows.
Why RepoMind Exists
Large language model (LLM) coding agents frequently struggle with:
Context Bloat: Feeding multi-megabyte directories or bundled minified files directly into context windows.
Security Leakage: Accidentally reading
.envfiles, SSH keys, or cloud credentials during autonomous repository scans.Superficial Project Context: Lacking high-level architectural awareness (such as high-churn hotspot files, misplaced dependencies, or lack of test density).
Accidental Duplicate Issues: Creating unvetted remote GitHub issues without checking existing records.
RepoMind solves these challenges by acting as a hardened analytical intelligence layer between your AI assistant and your local or remote codebases.
Related MCP server: Code Search, Read & PR Analysis
Architecture
RepoMind adheres to a layered architecture that strictly separates MCP transport bindings from repository analysis engines and security sandboxing.
graph TD
Client["AI Assistant / MCP Client (e.g. Claude Code)"]
subgraph RepoMind ["RepoMind MCP Server"]
Transport["Stdio Transport (JSON-RPC 2.0)"]
Dispatcher["McpServer Dispatcher"]
subgraph SecurityBoundary ["Security & Sandboxing Layer"]
PathVal["Path Traversal & Symlink Sandbox"]
Filter["Sensitive File & Key Blocker"]
Sniffer["Binary Content & Size Limiter"]
end
subgraph ToolAdapters ["Tool Adapters"]
T_Overview["get_project_overview"]
T_File["get_file"]
T_Search["search_code"]
T_Structure["analyze_structure"]
T_Deps["analyze_dependencies"]
T_Git["git_history"]
T_Report["analyze_project"]
T_GhSearch["search_github_issues"]
T_GhCreate["create_github_issue"]
end
subgraph AnalysisEngines ["Analysis Engines"]
Scanner["RepositoryScanner"]
Searcher["CodeSearcher"]
DepAnalyzer["DependencyAnalyzer"]
GitAnalyzer["GitAnalyzer"]
HealthScorer["HealthScorer"]
GhService["GitHubService"]
end
end
LocalFS[("Sandboxed Local Repository")]
GitCLI["Git CLI (execFile, no-shell)"]
GitHubAPI["GitHub REST API"]
Client <--> |stdio| Transport
Transport <--> Dispatcher
Dispatcher --> ToolAdapters
ToolAdapters --> SecurityBoundary
SecurityBoundary --> AnalysisEngines
AnalysisEngines <--> LocalFS
AnalysisEngines <--> GitCLI
AnalysisEngines <--> GitHubAPIKey Features
π‘οΈ Defensive Path Sandboxing: Prevents
../traversal, URL-encoded path attacks, absolute-path escapes, and symlink directory breakouts.π Sensitive File & Credential Shield: Automatically denies access to
.env,.env.*,credentials.json,*.pem,*.key,id_rsa,id_ed25519, and cloud configuration folders (.aws/,.kube/). Permits safe public templates like.env.example.π¦ Binary Content Detection: Sniffs the first 1024 bytes of files for null bytes (
0x00) and excessive control characters to prevent binary corruption in LLM context.π Bounded Code Search: Recursively searches source code with customizable surrounding context lines, automatically ignoring
.git,node_modules,dist,coverage, and temporary build directories.π Static Dependency Audit: Discovers duplicate resolved package versions, flags misplaced development tooling declared in production dependencies, and identifies unused candidate dependencies.
π Git Churn & Hotspot Analysis: Safely invokes Git CLI to uncover files with high revision frequency and active author distributions without shell execution vulnerabilities.
π― Transparent Heuristic Health Scoring (0β100): Evaluates architecture, maintainability, dependencies, testing, and security hygiene with explicit mathematical point contributions and actionable recommendations.
π Safe Two-Step GitHub Issue Integration: Enforces automated duplicate preflight checks before creating remote GitHub issues.
MCP Tool Reference
RepoMind exposes 10 tools to MCP clients:
Tool Name | Description | Key Inputs |
| Verifies server connectivity, uptime, version, and Node runtime. |
|
| High-level summary of languages, frameworks, package managers, and entry points. |
|
| Sandboxed file content reader with line count, size limits, and binary checks. |
|
| Recursive, bounded source code text search with surrounding context lines. |
|
| Hierarchical directory tree, file type breakdown, largest files and directories. |
|
| Audits manifests and lockfiles for duplicate packages and misplaced dev dependencies. |
|
| Commits, active authors, and code churn hotspots. Gracefully handles non-git repos. |
|
| Showcase tool: Synthesizes a unified engineering report with health score. |
|
| Searches existing issues in a GitHub repository to prevent duplicates. |
|
| Creates a new GitHub issue. Enforces preflight duplicate check if |
|
Installation
Prerequisites
Node.js
v20.0.0or higherGit installed on system path
Clone and Build
git clone https://github.com/your-username/repomind.git
cd repomind
npm install
npm run buildConfiguration
Copy .env.example to .env if using GitHub issue integration:
cp .env.example .envSet your personal access token:
GITHUB_TOKEN=ghp_yourPersonalAccessTokenHereNote: GitHub integration is optional. Local repository inspection tools function completely without any environment variables or network access.
Claude Code Integration
To integrate RepoMind with Claude Code or the Claude Desktop application, add RepoMind to your MCP server configuration:
Configuration in claude_desktop_config.json
{
"mcpServers": {
"repomind": {
"command": "node",
"args": ["/path/to/repomind/dist/index.js"],
"env": {
"GITHUB_TOKEN": "ghp_optional_token"
}
}
}
}On Windows, use absolute paths:
{
"mcpServers": {
"repomind": {
"command": "node",
"args": ["D:\\MCP Server Project\\dist\\index.js"]
}
}
}Usage Examples
1. Maintainability Audit Walkthrough
User: "Analyze this repository and identify the three biggest maintainability problems."
Claude's Execution Flow:
Calls
get_project_overviewto understand languages and framework conventions.Calls
analyze_structureto find oversized files and directory sprawl.Calls
git_historyto locate high-churn files that change frequently.Synthesizes a grounded report highlighting volatile hotspot modules and file size distribution.
2. Comprehensive Health Assessment
User: "Run a full architecture and health inspection on my codebase."
Claude calls: analyze_project with { "repositoryPath": "." }
Output snippet:
{
"repositoryName": "demo-project",
"executiveSummary": "RepoMind analyzed repository 'demo-project' (4 files). The project scored 88/100 in heuristic health with strongest performance in architecture and highest improvement potential in dependencies.",
"healthScore": {
"overall": 88,
"categories": {
"architecture": 100,
"maintainability": 90,
"dependencies": 70,
"testing": 100,
"security": 100
},
"findings": [
{
"category": "dependencies",
"type": "warning",
"impactPoints": -10,
"title": "Suspicious or Misplaced Dependencies",
"description": "Detected 1 dependency issue(s), including: Package '@types/node' is a build/type/test tool but is declared in production 'dependencies'.",
"recommendation": "Move '@types/node' to 'devDependencies'."
}
]
}
}3. Safe GitHub Issue Reporting
User: "File a GitHub issue for this maintainability problem."
Claude's Safe Workflow:
Claude calls
create_github_issuewith{ "owner": "myorg", "repo": "myapp", "title": "Move @types/node to devDependencies", "body": "...", "confirmCreate": false }.RepoMind runs a preflight duplicate check and returns:
{ "status": "confirmation_required", "message": "Preflight check completed with no existing duplicate issues detected. To proceed and create this issue, invoke create_github_issue again with 'confirmCreate: true'.", "similarIssues": [] }Claude asks the user: "No duplicate issues found. Would you like me to proceed with creating this issue?"
User responds: "Yes, create it."
Claude calls
create_github_issuewith"confirmCreate": true.
Security Model & Sandboxing
RepoMind treats all repository paths supplied by clients as untrusted:
Sandboxed Root Containment: Every relative path is resolved and validated to ensure the resulting canonical physical path (
fs.realpathSync.native) cannot escape the designated repository root.Path Traversal Rejection: Rejects
../,..\, null bytes\0, and encoded traversal sequences (%2e%2e).Sensitive File Denylist: Intercepts requests for
.env,credentials.json,secrets.json, SSH keys (id_rsa,id_ed25519), certificates (*.pem,*.key,*.pfx), and cloud directories (.aws,.kube).Binary Content Sniffing: Automatically identifies binary files by extension and header byte inspection, returning structured errors instead of corrupting model memory.
No Shell Execution: Git commands execute directly using
execFilewith immutable argument arrays, eliminating shell injection vectors.Stdio Protocol Hygiene: All logging, diagnostics, and errors write strictly to
stderr.stdoutis dedicated exclusively to valid JSON-RPC 2.0 frames.
Testing
RepoMind maintains a strict test suite powered by Vitest, covering path sandboxing, search bounding, dependency analysis, Git history, and MCP tool handlers:
# Run unit and integration tests
npm test
# Run TypeScript compiler
npm run build
# Run ESLint (Strict, zero-any rule)
npm run lint
# Run Prettier code formatting check
npm run formatProject Structure
repomind/
βββ src/
β βββ index.ts # Stdio transport entry point & signal handling
β βββ server/
β β βββ createServer.ts # McpServer initialization & tool registrations
β βββ tools/ # MCP tool definitions & schema validation
β β βββ ping.ts
β β βββ projectOverview.ts
β β βββ getFile.ts
β β βββ searchCode.ts
β β βββ analyzeStructure.ts
β β βββ analyzeDependencies.ts
β β βββ gitHistory.ts
β β βββ analyzeProject.ts
β β βββ githubIssues.ts
β βββ services/ # Core analytical business logic
β β βββ repositoryScanner.ts
β β βββ codeSearcher.ts
β β βββ dependencyAnalyzer.ts
β β βββ gitAnalyzer.ts
β β βββ healthScorer.ts
β β βββ projectAnalyzer.ts
β β βββ githubService.ts
β βββ security/ # Defensive path & file sandboxing
β β βββ limits.ts
β β βββ pathValidator.ts
β β βββ sensitiveFiles.ts
β βββ types/ # Strict TypeScript interfaces
β β βββ server.ts
β β βββ repository.ts
β β βββ analysis.ts
β β βββ github.ts
β βββ utils/ # Shared formatting & ignore helpers
β βββ fileUtils.ts
β βββ ignorePatterns.ts
βββ tests/ # Vitest test suites (12 files, 70+ tests)
βββ examples/
β βββ demo-project/ # Sample runnable codebase for verification
βββ docs/
β βββ architecture.md # Detailed design specification
βββ package.json
βββ tsconfig.json
βββ eslint.config.js
βββ prettier.config.js
βββ LICENSELimitations
Heuristic Nature: Health scoring is a heuristic estimation based on structural indicators; it is not a certified compliance audit or formal security verification.
Vulnerability Data: Static dependency analysis detects misplaced tooling and duplicate tree versions, but does not query active CVE vulnerability databases.
Language Deep Inspection: Abstract Syntax Tree (AST) parsing is not currently implemented; import detection relies on high-speed regex pattern matching.
Future Improvements
AST-based import resolution using
@babel/parseror Tree-sitter for non-JavaScript languages.Integration with OSV / GitHub Advisory Database for direct CVE vulnerability lookups.
Support for Monorepos with multiple workspace packages (pnpm workspaces, Turborepo).
Optional Streamable HTTP transport mode for remote deployment.
License
MIT Β© RepoMind Contributors. See LICENSE for details.
This server cannot be deployed
Maintenance
Related MCP Connectors
Screens public GitHub repos and PRs to generate risk maps, findings, and merge-readiness signals.
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Code intelligence platform for AI agents. 20 tools for architecture, security & impact analysis.
Deep security scans of repos you own from your editor: dependency CVEs, SAST, git-history secrets.
Related MCP Servers
- -licenseNot gradedqualityNot gradedmaintenanceEnables AI assistants to automatically analyze GitHub repositories and set up development environments by detecting tech stacks, installing dependencies, and verifying project builds. Provides safe tools for repository cloning, file system operations, package installation, and build verification through an allowlisted command system.-
- FlicenseBqualityDmaintenanceEnables LLMs to search and read files in local and GitHub repositories, analyze pull request diffs, and grep code content with built-in security protections.6-
- AlicenseAqualityBmaintenanceConnects AI assistants to GitHub repositories, pull requests, issues, commits, and code search while enabling repository visibility controls, CI/CD monitoring, sandboxed local filesystem access, and code quality/security analysis.131MIT
- AlicenseAqualityCmaintenanceEnables AI assistants to search and inspect code repositories, manage issues and pull requests, and analyze user contributions.13MIT