Content
# 🚀 NEXUS - Distributed Impact Analysis MCP
**The only tool that understands everything that changes in your codebase.**
NEXUS is a sophisticated Model Context Protocol (MCP) server that analyzes code changes, calculates impact across your entire system, generates documentation, and predicts technical debt. It combines 5 advanced technologies into one unified system.
## Features
### 1. **Source Analyzer** - Deep Code Understanding
- Parses conventional commits with semantic meaning
- Detects breaking changes at multiple levels:
- Function signature changes
- Type system changes (TypeScript)
- API contract violations
- Exported symbol removals
- Multi-language support: TypeScript, JavaScript, Python, Java, Go, Rust
### 2. **Impact Calculator** - Ripple Effect Analysis
- Builds complete dependency graph across your codebase
- Calculates direct and indirect impacts
- Provides consumer categorization (internal/external)
- Estimates work required for updates
- Risk scoring (0-1 scale)
### 3. **Version Analyzer** - Semantic Versioning
- Automatically suggests next version (major.minor.patch)
- Follows semver.org specification
- Detects breaking changes and calculates appropriate bump
- Provides migration path information
### 4. **Release Notes Generator** - Professional Documentation
- Generates markdown release notes from commits
- Creates migration guides for breaking changes
- Extracts contributors automatically
- Provides code examples and patterns
### 5. **Debt Analyzer** - Technical Intelligence
- Calculates cyclomatic complexity per file
- Detects code duplication
- Identifies code smells (long functions, too many parameters, unresolved TODOs)
- Predicts future breaking points
- Analyzes test coverage
## Installation
```bash
npm install -D @frxncisxo/nexus
```
Or use directly via MCP:
```json
{
"mcpServers": {
"nexus": {
"command": "npx",
"args": ["@frxncisxo/nexus"],
"env": {
"NEXUS_REPO": "/path/to/repo"
}
}
}
}
```
## Usage
### CLI
```bash
# Analyze impact between two versions
nexus impact v1.0.0 HEAD
# Generate release notes
nexus release v1.0.0 HEAD
# Analyze technical debt
nexus debt
# Full analysis (all features)
nexus full v1.0.0 HEAD
```
### Programmatic API
```typescript
import { Nexus } from '@frxncisxo/nexus';
const nexus = new Nexus({
repositoryPath: '/path/to/repo',
languages: ['ts', 'js', 'py'],
enableMLAnalysis: true,
});
// Analyze impact
const impact = await nexus.analyzeImpactFromCommits('v1.0.0', 'HEAD');
console.log(impact);
// {
// breakingChanges: true,
// riskScore: 0.65,
// directlyAffected: ['src/auth.ts', 'src/api.ts', ...],
// estimatedWorkDays: 3,
// ...
// }
// Generate release notes
const { versionAnalysis, markdown } = await nexus.generateReleaseNotes('v1.0.0', 'HEAD');
console.log(versionAnalysis.suggestedVersion); // "2.0.0"
console.log(markdown); // Full markdown release notes
// Analyze technical debt
const debt = await nexus.analyzeTechnicalDebt();
console.log(debt.metrics.codeSmells); // Detected issues
console.log(debt.risks.suggestions); // Improvement suggestions
// Full analysis
const full = await nexus.fullAnalysis('v1.0.0', 'HEAD');
```
## How It Works
### Impact Analysis
1. **Parses commits** between two versions
2. **Extracts code changes** at multiple levels:
- Function signatures
- Type definitions
- API contracts
3. **Builds dependency graph** of your entire codebase
4. **Calculates ripple effects**:
- Direct consumers (who imports this directly)
- Indirect consumers (who imports consumers)
- Cascade chains
5. **Risk assessment**:
- Breaking changes = higher risk
- Critical changes = higher risk
- Number of consumers = higher work
6. **Workload estimation**:
- ~5 files per day for non-breaking changes
- 50% more time for breaking changes
### Version Calculation
Follows **semantic versioning** from conventional commits:
- **Major** (breaking changes): Any BREAKING CHANGE footer or `!:` in commit
- **Minor** (features): Any `feat:` commit
- **Patch** (fixes): Any `fix:` commit
```
v1.0.0 + breaking changes = v2.0.0
v1.0.0 + new features = v1.1.0
v1.0.0 + bug fixes = v1.0.1
```
### Technical Debt Detection
Analyzes multiple dimensions:
- **Complexity**: Cyclomatic complexity per function (>20 = risky)
- **Duplication**: Duplicate code percentage (>30% = problem)
- **Smells**: Long functions, too many parameters, unresolved TODOs
- **Testing**: Files without tests are at risk
- **Security**: Vulnerability scanning
## Output Examples
### Impact Report
```json
{
"changes": [...],
"directlyAffected": ["src/auth.ts", "src/api.ts"],
"indirectlyAffected": ["src/controllers/user.ts"],
"breakingChanges": true,
"riskScore": 0.65,
"estimatedWorkDays": 3,
"cascadeChain": {
"src/auth.ts": ["src/api.ts", "src/controllers/user.ts"]
}
}
```
### Release Notes
```markdown
# 2.0.0 - 2024-04-22
## ⚠️ Breaking Changes
### auth.verifyToken() signature changed
**Why**: Improved security, explicit configuration
**Migration time**: ~5 minutes
**Affected consumers**: 3
Before:
```typescript
const verified = verifyToken(token);
```
After:
```typescript
const verified = verifyToken(token, { algorithm: 'HS256' });
```
## 🎉 New Features
- ...
## 🐛 Bug Fixes
- ...
## Contributors
- Alice Developer
- Bob Engineer
```
## Configuration
```typescript
interface NexusConfig {
repositoryPath: string; // Path to repository
languages: string[]; // Languages to analyze
ignorePatterns: string[]; // Patterns to ignore
enableMLAnalysis: boolean; // Enable ML-based analysis
enableAutoSync: boolean; // Auto-sync changes
semverStrategy: 'conventional'; // Version strategy
}
```
## Advanced Features
### 1. Monorepo Support
Automatically detects monorepo structure and analyzes cross-workspace impacts.
### 2. Multi-Language Analysis
- TypeScript: Full AST parsing, type inference
- JavaScript: Dynamic imports, dynamic requires
- Python: AST analysis, import statements
- Java/Go: Basic structural analysis
### 3. Consumer Categorization
Automatically categorizes affected consumers:
- Internal: Within the same repository
- External: External packages and services
### 4. Predicting Future Problems
ML-based analysis predicts:
- Files likely to break
- Performance bottlenecks
- Security concerns
## Performance
- Analyzes 10k+ files in <10 seconds
- Dependency graph construction: O(n) where n = number of files
- Impact calculation: O(k) where k = number of consumers
## Limitations
- AST parsing is best-effort (doesn't execute code)
- Dynamic imports may not be detected
- Type inference is limited compared to full TypeScript compiler
- Security scanning is heuristic-based
## Contributing
```bash
npm run build
npm run test
npm run lint
```
## License
MIT
## Benchmarks
Tested on real projects:
| Project | Files | Time | Accuracy |
|---------|-------|------|----------|
| Syncwave | 45 | 0.2s | 98% |
| Medium App | 340 | 1.2s | 95% |
| Large App | 2,400 | 8.5s | 92% |
## Why NEXUS?
**No existing tool does this:**
- ✅ Conventional Commits → Full integration (semantic-release only does versions)
- ✅ Code Analysis → Dependency impact (SonarQube only detects smells)
- ✅ Docs Generation → From code understanding (tools are manual)
- ✅ Tech Debt → Future predictions (all tools are reactive)
- ✅ All in one MCP → No tool integration needed
**NEXUS bridges the gap** between what changed and what matters.
---
Made with ❤️ by developers, for developers.
**Questions?** Open an issue on GitHub.
MCP Config
Below is the configuration for this MCP Server. You can copy it directly to Cursor or other MCP clients.
mcp.json
Connection Info
You Might Also Like
everything-claude-code
Complete Claude Code configuration collection - agents, skills, hooks,...
markitdown
MarkItDown-MCP is a lightweight server for converting URIs to Markdown.
cc-switch
All-in-One Assistant for Claude Code, Codex & Gemini CLI across platforms.
servers
Model Context Protocol Servers
servers
Model Context Protocol Servers
Time
A Model Context Protocol server for time and timezone conversions.