-brightgreen) A Model Context Protocol (MCP) server for analyzing technical debt across multiple programming languages. Designed to integrate with GitHub Copilot and other MCP-compatible tools. - Multi-language support: JavaScript, TypeScript, Python, Java, Swift, Kotlin, Objective-C, C++, C, C, Go, Rust, Ruby, PHP - Comprehensive analysis: Detects various types of tech debt including code quality
Add this skill
npx mdskills install PierreJanineh/techdebtmcpComprehensive multi-language technical debt analyzer with SQALE metrics, custom rules, and dependency parsing
A Model Context Protocol (MCP) server for analyzing technical debt across multiple programming languages. Designed to integrate with GitHub Copilot and other MCP-compatible tools.
Built with Vibe Coding - This project was developed using AI-assisted "vibe coding" techniques, leveraging GitHub Copilot to rapidly prototype and iterate on features while maintaining code quality and test coverage.
Quality Assurance - This project practices what it preaches! Tech Debt MCP maintains an A rating (3.4% debt ratio) by regularly scanning itself and following strict code quality standards. See Code Quality for details.
.techdebtrc.json configuration files for schema correctness| Language | Extensions | Key Checks |
|---|---|---|
| JavaScript | .js, .mjs, .cjs, .jsx | console.log, debugger, eslint-disable, eval, var usage |
| TypeScript | .ts, .tsx, .mts, .cts | any type, @ts-ignore, non-null assertions, type assertions |
| Python | .py, .pyw, .pyi | bare except, print statements, global usage, eval/exec |
| Java | .java | System.out, printStackTrace, empty catch, @SuppressWarnings |
| Swift | .swift | force unwrap (!), force cast (as!), force try, retain cycles, SwiftUI patterns |
| Kotlin | .kt, .kts | !!, lateinit abuse, @Suppress, unchecked casts |
| Objective-C | .m, .mm, .h | NSLog, retain cycles, deprecated methods, massive view controllers |
| C++ | .cpp, .cc, .hpp, .h | raw pointers, C-style casts, goto, using namespace std |
| C | .c, .h | malloc without free, goto, unsafe functions, null checks |
| C# | .cs | Console.WriteLine, async void, empty catch, dispose pattern |
| Go | .go | ignored errors, blank imports, fmt.Print, panic, global variables |
| Rust | .rs | unwrap, expect, unsafe, allow attributes, panic, println |
| Ruby | .rb | puts, binding.pry, rubocop disable, eval, global variables |
| PHP | .php | var_dump, print_r, die/exit, eval, error suppression |
VS Code (via Terminal):
code --add-mcp '{"name":"tech-debt-mcp","command":"npx","args":["-y","tech-debt-mcp@latest"]}'
Cursor (via Terminal):
cursor --add-mcp '{"name":"tech-debt-mcp","command":"npx -y tech-debt-mcp@latest"}'
Claude Code (via Terminal):
claude mcp add tech-debt-mcp -- npx -y tech-debt-mcp@latest
Claude Desktop — add to your claude_desktop_config.json:
{
"mcpServers": {
"tech-debt-mcp": {
"command": "npx",
"args": ["-y", "tech-debt-mcp@latest"]
}
}
}
Add to your Windsurf MCP configuration (~/.codeium/windsurf/mcp_config.json):
{
"mcpServers": {
"tech-debt-mcp": {
"command": "npx",
"args": ["-y", "tech-debt-mcp@latest"]
}
}
}
Via AI Assistant — open Settings > Tools > AI Assistant > Model Context Protocol (MCP), click +, select As JSON, and paste:
{
"mcpServers": {
"tech-debt-mcp": {
"command": "npx",
"args": ["-y", "tech-debt-mcp@latest"]
}
}
}
Via GitHub Copilot for Xcode — open Settings > MCP tab > Edit Config (mcp.json):
{
"servers": {
"tech-debt-mcp": {
"command": "npx",
"args": ["-y", "tech-debt-mcp@latest"]
}
}
}
Add to your MCP client config:
{
"mcpServers": {
"tech-debt-mcp": {
"command": "npx",
"args": ["-y", "tech-debt-mcp@latest"]
}
}
}
Start the MCP server:
tech-debt-mcp
Or for development:
npm run dev
analyze_projectAnalyze an entire project for technical debt.
Parameters:
path (required): Absolute path to the project rootlanguages (optional): Array of languages to analyzecategories (optional): Filter by debt categoriesseverity (optional): Minimum severity level (low, medium, high, critical)maxFiles (optional): Maximum files to analyzeanalyze_fileAnalyze a single file for technical debt.
Parameters:
path (required): Absolute path to the fileget_debt_summaryGet a quick summary of technical debt in a project.
Parameters:
path (required): Absolute path to the project rootget_sqale_metricsGet SQALE technical debt metrics including remediation time, debt ratio, and rating.
Parameters:
path (required): Absolute path to the project rootdevelopmentTime (optional): Estimated development time in hours (for debt ratio calculation)Output includes:
Example:
get_sqale_metrics --path=/path/to/project --developmentTime=2080
Returns:
# SQALE Technical Debt Metrics
**Overall Rating:** B ⭐⭐⭐⭐
**Total Remediation Time:** 4 hours 30 minutes
**Debt Ratio:** 8.5%
## Breakdown by Severity
| Severity | Time |
|----------|------|
| Critical | 30m |
| High | 1h 45m |
| Medium | 2h |
| Low | 15m |
list_supported_languagesList all supported programming languages with their checks.
get_recommendationsGet prioritized recommendations for addressing technical debt.
Parameters:
path (required): Absolute path to the project rootlimit (optional): Maximum recommendations to returnget_issues_by_severityGet all issues of a specific severity level.
Parameters:
path (required): Absolute path to the project rootseverity (required): low, medium, high, or criticalget_issues_by_categoryGet all issues of a specific category.
Parameters:
path (required): Absolute path to the project rootcategory (required): dependency, code-quality, architecture, documentation, testing, security, performance, or maintainabilityadd_custom_ruleAdd a custom pattern-based tech debt rule.
Parameters:
id (required): Unique identifier for the rulepattern (required): Regex pattern to matchmessage (required): Issue title/messageseverity (required): low, medium, high, or criticalcategory (required): One of the debt categoriessuggestion (optional): How to fix the issuelanguages (optional): Apply only to specific languagesflags (optional): Regex flags (g, i, m, s, etc.)remove_custom_ruleRemove a custom rule by ID.
Parameters:
id (required): ID of the rule to removelist_custom_rulesList all active custom rules with their statistics.
execute_custom_rulesExecute all custom rules against code or a file.
Parameters:
path (optional): Path to the file to analyzecode (optional): Code content to analyze directlylanguage (optional): Programming language for filtering rulesNote: Either path or code must be provided.
validate_custom_patternValidate a custom pattern before adding it as a rule.
Parameters:
id (required): Unique identifier for the rulepattern (required): Regex pattern to validatemessage (required): Issue title/messageseverity (required): low, medium, high, or criticalcategory (required): One of the debt categoriesPhase 2 adds comprehensive dependency parsing across multiple ecosystems and a new MCP tool check_dependencies that scans a project for package manifests and returns a structured dependency report.
Key capabilities:
includeDev parametercheck_dependenciesScan a project for package manifests and return a structured dependency report.
Parameters:
path (required): Absolute path to the project rootincludeDev (optional): boolean (default: true) — include dev/test dependenciesvalidate_configValidate a .techdebtrc.json configuration file for schema correctness.
Parameters:
path (required): Absolute path to the project root directory or directly to a .techdebtrc.json fileget_vulnerability_reportGenerate an offline dependency inventory for vulnerability review. Lists all dependencies by ecosystem in a tabular format. Online CVE lookup is planned for Phase 2b.
Parameters:
path (required): Absolute path to the project rootincludeDev (optional): boolean (default: false) — include dev dependencies in the reportTech Debt MCP uses SQALE (Software Quality Assessment based on Lifecycle Expectations) methodology to quantify technical debt:
Tech Debt MCP includes 14 specialized checks for SwiftUI applications, detecting common anti-patterns, memory leaks, and performance issues.
// ❌ Excessive @State - should use ViewModel
struct UserView: View {
@State private var firstName = ""
@State private var lastName = ""
@State private var email = ""
@State private var phone = ""
@State private var address = ""
@State private var city = "" // 6+ @State variables!
// ...
}
// ❌ @ObservedObject with initialization
struct ContentView: View {
@ObservedObject var viewModel = UserViewModel() // Should be @StateObject!
// ...
}
// ❌ Missing Timer cleanup
struct TimerView: View {
var body: some View {
Text("Hello")
.onAppear {
Timer.scheduledTimer(...) // Missing .onDisappear cleanup!
}
}
}
// ❌ Retain cycle in Combine
publisher
.sink { value in
self.updateUI(value) // Missing [weak self]!
}
All SwiftUI checks follow Apple's best practices and help prevent common bugs in production apps.
Define your own tech debt checks using regex patterns. Create rules in .techdebtrc.json:
{
"customPatterns": [
{
"id": "no-console-log",
"pattern": "console\\.log",
"severity": "low",
"category": "code-quality",
"message": "Remove console.log() statements",
"suggestion": "Use proper logging library instead",
"languages": ["javascript", "typescript"]
},
{
"id": "no-eval",
"pattern": "\\beval\\s*\\(",
"severity": "critical",
"category": "security",
"message": "eval() is dangerous",
"suggestion": "Refactor to avoid dynamic code execution",
"flags": "g"
}
]
}
id (required): Unique identifier for the rulepattern (required): Regex pattern to matchmessage (required): Issue title/messageseverity (required): low, medium, high, or criticalcategory (required): One of the debt categoriessuggestion (optional): How to fix the issuelanguages (optional): Apply only to specific languagesflags (optional): Regex flags (g, i, m, s, etc.){
"customPatterns": [
{
"id": "no-magic-numbers",
"pattern": "=\\s*\\d{3,}",
"severity": "medium",
"category": "maintainability",
"message": "Magic number detected",
"suggestion": "Extract to named constant"
},
{
"id": "forbidden-library",
"pattern": "import.*moment.*from",
"severity": "medium",
"category": "dependency",
"message": "moment.js is deprecated",
"suggestion": "Use native Date or date-fns instead",
"languages": ["javascript", "typescript"]
}
]
}
Create a .techdebtrc.json file in your project root:
{
"ignore": ["vendor/**", "generated/**"],
"rules": {
"maxFileLines": 500,
"maxFunctionLines": 50,
"maxComplexity": 10,
"maxNestingDepth": 4
},
"severity": {
"todo-comment": "low",
"console-log": "medium"
}
}
# Tech Debt Analysis Report
## Health Score: 72/100
### Issues by Severity
| Severity | Count |
|----------|-------|
| 🔴 Critical | 2 |
| 🟠 High | 15 |
| 🟡 Medium | 45 |
| 🟢 Low | 120 |
## Top Recommendations
1. **Address Critical Issues Immediately**
Fix 2 critical security issues including eval() usage.
2. **Clean Up TODO/FIXME Comments**
Found 45 TODO comments - consider creating tracked issues.
# Install dependencies
npm install
# Build
npm run build
# Run in development
npm run dev
# Watch mode
npm run watch
# Run tests
npm test
Tech Debt MCP practices what it preaches! 🎯
.techdebtrc.json configuration reduced false positives by 20 issues (-19.8%).We maintain high code quality through:
any types, strict TypeScript modeProject-specific rules are defined in .techdebtrc.json:
{
"ignore": ["**/node_modules/**", "**/dist/**", "**/__tests__/**"],
"rules": {
"maxFileLines": 500,
"maxNestingDepth": 4
}
}
Impact of Configuration:
See ARCHITECTURE.md for detailed metrics and refactoring targets.
Contributions are welcome! Please see CONTRIBUTING.md for guidelines and CODE_OF_CONDUCT.md for our community standards.
Tech Debt MCP uses automated releases via GitHub Actions:
MIT
Install via CLI
npx mdskills install PierreJanineh/techdebtmcpTech Debt MCP Server is a free, open-source AI agent skill. -brightgreen) A Model Context Protocol (MCP) server for analyzing technical debt across multiple programming languages. Designed to integrate with GitHub Copilot and other MCP-compatible tools. - Multi-language support: JavaScript, TypeScript, Python, Java, Swift, Kotlin, Objective-C, C++, C, C, Go, Rust, Ruby, PHP - Comprehensive analysis: Detects various types of tech debt including code quality
Install Tech Debt MCP Server with a single command:
npx mdskills install PierreJanineh/techdebtmcpThis downloads the skill files into your project and your AI agent picks them up automatically.
Tech Debt MCP Server works with Claude Code, Claude Desktop, Cursor, Vscode Copilot, Windsurf, Continue Dev, Gemini Cli, Amp, Roo Code, Goose. Skills use the open SKILL.md format which is compatible with any AI coding agent that reads markdown instructions.