MCP Server for analyzing technical debt across multiple programming languages
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
16 Tools Β· 2 Resources Β· 14 Languages Β· 10 Dependency Ecosystems
A Model Context Protocol (MCP) server for analyzing technical debt across multiple programming languages. Designed to integrate with GitHub Copilot, Claude, Cursor, and other MCP-compatible tools.
// techdebt-ignore-next-line or block comments.techdebtrc.json configuration files for schema correctness| Language | Extensions | Key Checks |
|---|---|---|
| JavaScript | .js, .mjs, .cjs, .jsx | console.log, debugger, eslint-disable, usage of dynamic code execution, 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, dynamic code execution |
| 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, dynamic code execution, global variables |
| PHP | .php | var_dump, print_r, die/exit, dynamic code execution, error suppression |
Claude Code (via Terminal):
Claude Desktop β add to your claude_desktop_config.json:
Claude Code plugin β add this repo's marketplace, then install the plugin:
The plugin runs npx -y tech-debt-mcp@latest under the hood β no source bundling, always tracks the published npm release. See plugin/README.md for plugin-user-facing docs (install flow, example transcripts, security posture).
Claude Desktop MCPB bundle β single-click install with bundled node_modules (no npx, no internet required at runtime).
Download tech-debt-mcp-<version>.mcpb from the latest GitHub Release and open it with Claude for macOS or Windows.
To build the bundle locally:
Add to your Windsurf MCP configuration (~/.codeium/windsurf/mcp_config.json):
Via AI Assistant β open Settings > Tools > AI Assistant > Model Context Protocol (MCP), click +, select As JSON, and paste:
Via GitHub Copilot for Xcode β open Settings > MCP tab > Edit Config (mcp.json):
Add to your MCP client config:
For development: npm run dev
Every tool declares a tool annotation β Read tools are side-effect-free (readOnlyHint: true); Write tools mutate server session state (destructiveHint: true).
| Category | Tool | Type | Description |
|---|---|---|---|
| Analysis | analyze_project | Read | Analyze entire project β filter by language, category, severity, maxFiles |
analyze_file | Read | Analyze a single file | |
get_debt_summary | Read | Quick summary with health score and issue counts | |
get_sqale_metrics | Read | SQALE rating, remediation time, debt ratio, breakdowns | |
| Filtering | get_recommendations | Read | Prioritized fix suggestions (configurable limit) |
get_issues_by_severity | Read | Issues filtered by severity level | |
get_issues_by_category | Read | Issues filtered by debt category | |
list_supported_languages | Read | All languages with their checks | |
| Custom Rules | add_custom_rule | Write | Add regex-based tech debt rule |
remove_custom_rule | Write | Remove a custom rule by ID | |
list_session_custom_rules | Read | List rules added via add_custom_rule this session (does not include .techdebtrc.json customPatterns) | |
execute_custom_rules | Read | Run custom rules against code or file | |
validate_custom_pattern | Read | Test a pattern before adding it | |
| Dependencies | check_dependencies | Read | Scan package manifests across 10 ecosystems |
get_vulnerability_report | Read | Offline dependency inventory for CVE review | |
validate_config | Read | Validate .techdebtrc.json schema |
Debt categories used throughout: dependency Β· code-quality Β· architecture Β· documentation Β· testing Β· security Β· performance Β· maintainability
| Tool | Parameter | Type | Required | Constraints / default | Description |
|---|---|---|---|---|---|
analyze_project | path | string | β | absolute filesystem path | Project root directory |
languages | string[] | Filter to specific languages | |||
categories | string[] | see categories above | Filter by debt categories | ||
severity | enum | low / medium / high / critical | Minimum severity level | ||
maxFiles | integer | min: 1 | Cap on files analyzed | ||
analyze_file | path | string | β | absolute filesystem path | File to analyze |
get_debt_summary | path | string | β | absolute filesystem path | Project root directory |
get_sqale_metrics | path | string | β | absolute filesystem path | Project root directory |
developmentTime | number | hours | Estimated dev time for debt-ratio calc |
get_sqale_metrics returns a SQALE rating (A-E) with star visualization, total remediation time, debt ratio, and breakdowns by severity and category.
| Tool | Parameter | Type | Required | Constraints / default | Description |
|---|---|---|---|---|---|
get_recommendations | path | string | β | absolute filesystem path | Project root directory |
limit | integer | default: 5, min: 1 | Max recommendations to return | ||
get_issues_by_severity | path | string | β | absolute filesystem path | Project root directory |
severity | enum | β | low / medium / high / critical | Severity to filter by | |
get_issues_by_category | path | string | β | absolute filesystem path | Project root directory |
category | enum | β | see categories above | Debt category to filter by | |
list_supported_languages | β | β | β | β | No parameters |
| Tool | Parameter | Type | Required | Constraints / default | Description |
|---|---|---|---|---|---|
add_custom_rule | id | string | β | Unique rule identifier | |
pattern | string | β | max 1,000 chars | Regex pattern to match | |
message | string | β | Issue title/message | ||
severity | enum | β | low / medium / high / critical | Severity level | |
category | enum | β | see categories above | Debt category | |
suggestion | string | How to fix the issue | |||
languages | string[] | Restrict to specific languages | |||
flags | string | allowed: d g i m s u v y; u / v mutually exclusive | Regex flags | ||
remove_custom_rule | id | string | β | Rule ID to remove | |
list_session_custom_rules | β | β | β | β | No parameters. Renamed from list_custom_rules (TEC-51) to clarify scope: only session-registered rules. |
execute_custom_rules | path | string | β | absolute path, max 500,000 bytes | File to analyze |
code | string | β | 1-500,000 chars | Source code to analyze directly | |
language | string | must be a supported language ID (same set as list_supported_languages) | Filter rules by language | ||
validate_custom_pattern | id | string | β | Unique rule identifier | |
pattern | string | β | max 1,000 chars | Regex to validate | |
message | string | β | Issue title/message | ||
severity | enum | β | low / medium / high / critical | Severity level | |
category | enum | β | see categories above | Debt category |
β execute_custom_rules requires either path or code, not both required. An empty string "" for path is treated the same as omitting the field.
| Tool | Parameter | Type | Required | Constraints / default | Description |
|---|---|---|---|---|---|
check_dependencies | path | string | β | absolute filesystem path | Project root directory |
includeDev | boolean | default: true | Include dev/test dependencies | ||
get_vulnerability_report | path | string | β | absolute filesystem path | Project root directory |
includeDev | boolean | default: false | Include dev dependencies | ||
validate_config | path | string | β | absolute filesystem path | Project root directory or direct path to .techdebtrc.json |
check_dependencies detects manifests for npm, pip, Maven/Gradle, Cargo, Go Modules, Composer, Bundler, NuGet, C/C++ (CMakeLists.txt, conanfile.txt/py, vcpkg.json), and Swift Package Manager. get_vulnerability_report produces an offline dependency inventory β see ROADMAP.md for planned online CVE lookup.
Two MCP resources expose read-only tech debt data as JSON. Both use RFC 6570 URI templates: the {+projectPath} syntax is reserved expansion, which allows the variable to contain the / characters of an absolute filesystem path without percent-encoding.
| URI template | Description |
|---|---|
debt://summary/{+projectPath} | Health score, debt score, issue counts, and SQALE metrics |
debt://issues/{+projectPath} | Filterable list of all tech debt issues; supports severity, category, and limit query params |
Concrete examples β substitute {+projectPath} with an absolute path. Note the double slash: the template's trailing / plus the path's leading / produce //, which is valid URI syntax.
Testing interactively β the easiest way to exercise tools and resources is the MCP Inspector:
Open the URL it prints, switch to the Resources tab, and read a template URI with your absolute project path.
Create a .techdebtrc.json file in your project root:
Override rules, severity, or file extensions on a per-language basis using languageOverrides. Keys must be valid supported language identifiers.
rules β per-language thresholds (override the top-level rules for matching files).severity β per-language rule severity overrides.extensions β additional file extensions (beyond the defaults) to attribute to this language.Use ruleExclusions to suppress specific rules for files matching glob patterns. Patterns use forward slashes (/) on all platforms. Use **/ prefixed patterns (e.g., **/src/analyzers/**) for reliable matching regardless of path format.
Suppress specific issues directly in source code. Both // and # comment prefixes are supported across all languages.
Single-line β suppresses the next line:
Block β suppresses all lines between start and end:
Without a rule name, all rules are suppressed. Blocks can be nested. Suppression comments must appear on their own line.
Scope note:
customPatternsdefined in.techdebtrc.jsonare applied only byanalyze_project, which loads the project config before scanning.analyze_fileinvokes the language analyzer directly without loading.techdebtrc.json, so config-defined patterns are not applied on that path. Useadd_custom_ruleat runtime (or callexecute_custom_rulesdirectly) to run custom patterns against a single file.
Define patterns in .techdebtrc.json under customPatterns, or register them at runtime via the add_custom_rule MCP tool:
Tech Debt MCP uses SQALE methodology to quantify technical debt:
| Rating | Debt Ratio | Quality |
|---|---|---|
| A | β€5% | Excellent |
| B | 6-10% | Good |
| C | 11-20% | Fair |
| D | 21-50% | Poor |
| E | >50% | Critical |
Effort-to-time mapping: trivial (β€5m) Β· small (5-30m) Β· medium (30m-2h) Β· large (2-4h) Β· xlarge (4h+)
14 specialized checks for SwiftUI apps covering state management (excessive @State, @ObservedObject misuse, environment value safety), memory & lifecycle (Combine retain cycles, timer cleanup, task cancellation, closure retain cycles), performance (missing .id() modifiers, expensive body calculations, deep nesting, GeometryReader misuse), and best practices (AnyView type erasure, deprecated NavigationLink, main thread safety).
Tech Debt MCP practices what it preaches β built with AI-assisted vibe coding, it maintains an A rating by regularly scanning itself. Internal refactors (e.g., nesting reduction in customRulesEngine.validatePattern via extracted helper β #146) are driven by self-scan findings.
Down from 118 issues / 42.4 health in the v2.0.1 baseline after the v2.0.2 security hardening,
ruleExclusionsconfig, nesting refactors (#113, #118, #131, #146), and custom-rules handler extraction (#145). Remaining debt: 5 nesting hotspots (4 in server / core modules + 1 ineslint.config.mjs), 7 type-assertion usages at system boundaries, and 1 non-null assertion. See TECH_DEBT_SCAN.md for per-issue detail.
Tech Debt MCP runs entirely on your machine. Once installed, it reads files you pass it, returns issues to your MCP client over the local stdio transport, and does nothing else β the server itself makes no outbound network calls, has no telemetry, no analytics, and uses no third-party services. Installation via npm/npx does contact the npm registry as standard package-manager behavior; the MCPB bundle ships pre-installed and needs no further network access. See PRIVACY.md or the hosted policy at https://pierrejanineh.github.io/TechDebtMCP/privacy for details.
Contributions are welcome! Please see CONTRIBUTING.md for guidelines and CODE_OF_CONDUCT.md for our community standards.
escapeRegExp() (src/utils/regexUtils.ts) must be used when interpolating captured strings into new RegExp() β see issue #128; handler output uses basename() / getRelativePath() to prevent absolute filesystem path leakage in intentional messages, and raw err.message strings from filesystem operations are sanitized before being returned to clients β see issue #129MIT
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/tech-debt-mcp)<a href="https://allmcps.com/mcp/tech-debt-mcp"><img src="https://allmcps.com/api/badge/tech-debt-mcp?style=directory" alt="Tech Debt Mcp on AllMCPs" /></a>