Skip to main content
Glama
╔══════════════════════════════════════════════════════════════╗
║                                                              ║
║   ██████╗  █████╗  ██████╗██╗  ██╗███████╗███╗   ██╗██████╗ ║
║   ██╔══██╗██╔══██╗██╔════╝██║ ██╔╝██╔════╝████╗  ██║██╔══██╗║
║   ██████╔╝███████║██║     █████╔╝ █████╗  ██╔██╗ ██║██║  ██║║
║   ██╔══██╗██╔══██║██║     ██╔═██╗ ██╔══╝  ██║╚██╗██║██║  ██║║
║   ██████╔╝██║  ██║╚██████╗██║  ██╗███████╗██║ ╚████║██████╔╝║
║   ╚═════╝ ╚═╝  ╚═╝ ╚═════╝╚═╝  ╚═╝╚══════╝╚═╝  ╚═══╝╚═════╝║
║                                                              ║
║           ███╗   ███╗ █████╗ ██╗  ██╗                        ║
║           ████╗ ████║██╔══██╗╚██╗██╔╝                        ║
║           ██╔████╔██║███████║ ╚███╔╝                         ║
║           ██║╚██╔╝██║██╔══██║ ██╔██╗                         ║
║           ██║ ╚═╝ ██║██║  ██║██╔╝ ██╗                        ║
║           ╚═╝     ╚═╝╚═╝  ╚═╝╚═╝  ╚═╝                        ║
║                                                              ║
╚══════════════════════════════════════════════════════════════╝

🩺 AI-Powered Backend Diagnostics for Claude Code

The backend bugs your linter can't see. The contract drift your tests don't cover. Caught before deploy.

MIT License Version Node TypeScript MCP

Quick Start · Features · Tools · Roadmap

🤔 What Is This?

Backend Max is a Model Context Protocol (MCP) server that gives Claude deep diagnostic vision into your backend. It statically analyzes your codebase — both frontend and backend — to surface bugs, contract drift, missing validation, security gaps, and performance anti-patterns that no other single tool catches.

Think of it as a senior backend engineer that reviews every route, checks every contract, and never goes on vacation.

Related MCP server: checkyourself

🔭 How It Works

┌─────────────────────────────────────────────────────────────────────┐
│                                                                     │
│   📂 Your Codebase          🩺 Backend Max           📋 Report     │
│                                                                     │
│   ┌───────────┐             ┌──────────────┐        ┌───────────┐  │
│   │ Frontend   │────────▶   │  Cross-       │        │ Health    │  │
│   │ API Calls  │            │  Boundary     │──────▶ │ Score     │  │
│   └───────────┘             │  Analysis     │        ├───────────┤  │
│                             │              │        │ Issues    │  │
│   ┌───────────┐             │  ┌──────────┐ │        ├───────────┤  │
│   │ Backend   │────────▶   │  │ 6 Audit  │ │──────▶ │ API Docs  │  │
│   │ Routes    │            │  │ Engines  │ │        ├───────────┤  │
│   └───────────┘             │  └──────────┘ │        │ Fixes     │  │
│                             │              │        │ Guide     │  │
│   ┌───────────┐             │  ┌──────────┐ │        └───────────┘  │
│   │ Config    │────────▶   │  │ Intent   │ │                       │
│   │ & Env     │            │  │ Engine   │ │                       │
│   └───────────┘             │  └──────────┘ │                       │
│                             └──────────────┘                       │
│                                                                     │
└─────────────────────────────────────────────────────────────────────┘

⚡ Why Backend Max?

Existing tools catch syntax errors and type mismatches. Backend Max catches the bugs that ship to production.

Bug Category

TypeScript

ESLint

Jest/Vitest

Backend Max

Frontend calls /api/user but backend exposes /api/users

❌

❌

❌

✅

Frontend sends { name } but backend expects { username }

❌

❌

❌

✅

Route handler missing try/catch

❌

❌

❌

✅

Zod schema missing on POST route

❌

❌

❌

✅

process.env.SECRET used but not in .env

❌

❌

❌

✅

Auth middleware missing on sensitive route

❌

❌

❌

✅

N+1 query in a loop

❌

❌

❌

✅

API docs out of date

❌

❌

❌

✅

💡 Backend Max doesn't replace your existing tools. It catches what they architecturally cannot — cross-boundary issues that require understanding both sides of the stack.

🚀 Quick Start

Install with your MCP client

claude mcp add backend-max -- npx -y backend-max

Done. Open any project and type /backendmax run a full diagnosis.

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "backend-max": {
      "command": "npx",
      "args": ["-y", "backend-max"]
    }
  }
}

Add to .vscode/settings.json:

{
  "mcp.servers": {
    "backend-max": {
      "command": "npx",
      "args": ["-y", "backend-max"]
    }
  }
}

Add to your MCP config:

{
  "mcpServers": {
    "backend-max": {
      "command": "npx",
      "args": ["-y", "backend-max"]
    }
  }
}
git clone https://github.com/rish-e/backend-max.git
cd backend-max
npm install && npm run build

Then add to your MCP client config:

{
  "command": "node",
  "args": ["/path/to/backend-max/dist/server.js"]
}

Run Your First Diagnosis

Open your MCP client in any project and ask:

/backendmax run a full diagnosis on my project

That's it. Backend Max will analyze your project and return a full diagnostic report with health score, issues, and fix suggestions.

4. CI/CD Mode (Optional)

Run diagnostics from the command line or GitHub Actions:

# Basic diagnosis
npx backend-max-cli diagnose ./my-project

# CI mode — fail if health score drops below 75 or critical issues found
npx backend-max-cli diagnose ./my-project --ci --min-score 75 --fail-on critical

# Output formats
npx backend-max-cli diagnose ./my-project --format markdown  # PR comments
npx backend-max-cli diagnose ./my-project --format sarif     # GitHub Code Scanning
npx backend-max-cli diagnose ./my-project --format json      # Raw data

🔬 Features Deep Dive

🆕 v2.4 — External Audit Suite (Black-Box Testing)

Audit any website with just a URL — no source code, no credentials, no access needed.

Tool

Description

🔒 audit_headers

HTTP security header analysis with A-F grading. Deep CSP parsing (unsafe-inline/eval, wildcards), HSTS validation (max-age, preload), COEP/COOP/CORP checks

🌐 audit_cors

CORS misconfiguration detection. Tests origin reflection, wildcard + credentials conflicts, overly permissive methods, missing preflight cache

🔐 audit_ssl

TLS/certificate analysis. Chain validation, expiry warnings, protocol version check (TLS 1.2+), cipher grading, HTTP→HTTPS redirect

🍪 audit_cookies

Cookie security flags audit. Checks Secure, HttpOnly, SameSite on all cookies. Detects exposed session tokens

🌍 audit_dns

DNS & infrastructure fingerprinting. CDN detection, SPF/DMARC/CAA records, email security posture

💥 probe_error_handling

Error response probing. Tests for stack trace leakage, framework disclosure, database errors, debug mode exposure

🔑 audit_auth_flow

Authentication surface analysis. Discovers login endpoints, detects auth mechanisms, tests rate limiting, checks account enumeration

🔍 scan_public_api

API surface discovery. Extracts endpoints from frontend JS bundles, maps auth requirements, finds unprotected APIs

# Audit any website — no source code needed
Use audit_headers on https://example.com
Use scan_public_api on https://example.com

v2.2 — Tier 2 Feature Drop

Feature

Description

⚡ Fastify Support

Full route analysis with built-in JSON Schema validation detection, error handler checks, param extraction

🔥 Hono Support

Route analysis with basePath resolution, zValidator detection, middleware arg parsing

🚦 Rate Limiting Audit

Detects rate limiting packages/patterns, flags unprotected auth endpoints, checks caching coverage

📐 API Versioning

Detects path/header versioning, finds version gaps, flags inconsistent versioning

🔗 Middleware Visualization

Maps global/inline middleware chains per route, checks ordering, generates markdown visualization

🔍 Multi-Layer Type Tracing

Traces types across frontend → route → service → repository → DB, finds cross-layer mismatches

v2.1 — Tier 1 Feature Drop

Feature

Description

🔧 Auto-Fix Engine

Generates real unified diff patches for common issues — try/catch wrapping, Zod validation, auth guards, pagination. Apply with git apply

👁️ Watch Mode

Incremental analysis — shows new issues, fixed issues, and health score delta since last run. No full re-scan needed

🔀 tRPC Support

Full router analysis — procedures, input validation, protected/public, queries vs mutations. 3 tRPC-specific checks

🕸️ GraphQL Analysis

Resolver scanning for Apollo, Yoga, Mercurius, type-graphql, NestJS. N+1 detection, auth checks, input validation

📦 Dependency Scanner

Built-in vulnerability database (12+ packages), deprecated package detection, lock file checks, npm audit integration

v2.0 Features

Feature

Description

🗄️ Prisma Schema Integration

Parses your .prisma schema and cross-references every database call — catches nonexistent models, fields, and missing indexes

🔍 Deep Type Flow Analysis

Traces frontend response variables to check property access against backend return types — catches data.user.firstName vs data.user.first_name

⚡ Server Actions

Full audit of Next.js Server Actions ('use server') — validation, auth, error handling, database patterns

🚀 CI/CD Mode

CLI entry point with --ci, --min-score, --fail-on, and 4 output formats (text, markdown, JSON, SARIF)

🟢 Express.js Support

Route scanning, middleware detection, Express-specific checks (error middleware, 404, helmet/CORS)

📄 Pages Router

Next.js Pages Router API routes (pages/api/) fully supported

🧪 Live Testing

Optional HTTP endpoint testing against running dev server (GET-only, safety-first)

🕸️ API Graph

Queryable relationship graph — ask "unprotected routes" or "routes writing to users"

📊 Pattern Learning

Local cross-project pattern tracking — identifies the most common issues across your projects

📋 SARIF Output

GitHub Code Scanning integration via SARIF format

🔗 Cross-Boundary Contract Verification

The #1 feature. No other tool does this.

Backend Max reads your frontend fetch/axios calls and your backend route handlers, then cross-references them to find:

  • URL mismatches — frontend calls /api/user, backend serves /api/users

  • Method mismatches — frontend sends POST, backend expects PUT

  • Payload drift — frontend sends { name, email }, backend expects { username, email }

  • Response shape drift — frontend destructures data.items, backend returns data.results

// Frontend: lib/api.ts
const user = await fetch('/api/user', {    // ← "/user" (singular)
  method: 'POST',
  body: JSON.stringify({ name: 'Alice' })  // ← sends "name"
});

// Backend: app/api/users/route.ts          // ← "/users" (plural)
export async function POST(req: Request) {
  const { username } = await req.json();    // ← expects "username"
  // ...
}
⚠️  CONTRACT DRIFT DETECTED

   Route Mismatch:
   Frontend calls  →  /api/user   (POST)
   Backend serves  →  /api/users  (POST)

   Payload Mismatch:
   Frontend sends  →  { name: string }
   Backend expects →  { username: string }

🧠 Intent-Aware Diagnosis

Backend Max doesn't just scan code — it understands what you're building. By analyzing your project structure, route names, and data models, it builds an intent map:

  • Identifies your domains (auth, billing, users, etc.)

  • Understands relationships between entities

  • Flags issues that are contextually wrong, not just syntactically wrong

🎯 "This route handles payments but doesn't validate the amount field" is more useful than "missing validation on line 47".


🛡️ Pre-Deploy Safety Net

Six audit engines run in parallel, each targeting a category of bugs that commonly ship to production:

#

Audit Engine

What It Catches

1

🔗 API Contract Drift

Frontend↔backend URL, method, payload, and response mismatches

2

🚨 Error Handling

Missing try/catch, inconsistent error response formats, unhandled promise rejections

3

✅ Input Validation

Routes without Zod schemas, raw req.body access, missing type coercion

4

🔑 Environment Variables

Undefined refs, missing .env entries, NEXT_PUBLIC_ prefix misuse

5

🔒 Security

Auth middleware gaps, permissive CORS, SQL/NoSQL injection patterns, exposed secrets

6

⚡ Performance

N+1 queries, unbounded SELECT *, large payload serialization, missing pagination

Each issue includes:

  • Severity — critical · warning · info

  • Location — exact file and line number

  • Explanation — what's wrong and why it matters

  • Fix suggestion — actionable code-level guidance


📖 Living API Documentation

Backend Max auto-generates API documentation by reading your actual route handlers. No annotations needed. No Swagger decorators. Just your code.

## POST /api/auth/login

Authentication endpoint for user login.

**Request Body:**
| Field    | Type   | Required | Validation       |
|----------|--------|----------|------------------|
| email    | string | ✅       | Valid email      |
| password | string | ✅       | Min 8 characters |

**Response (200):**
| Field | Type   |
|-------|--------|
| token | string |
| user  | object |

**Error Responses:** 401, 422, 500

The docs update every time you run a diagnosis. They can never go stale.


📒 Issue Lifecycle Tracking

Every issue is tracked through its full lifecycle:

Found → Acknowledged → Fixed → Verified → (Regressed?)

Backend Max maintains a ledger in .backend-doctor/history/ so you can:

  • See what was fixed and when

  • Detect regressions (issues that come back)

  • Track your backend health score over time

  • Review historical audit reports


💯 Health Score

A single number, 0–100, representing your backend's overall health:

╔══════════════════════════════════════╗
║  Backend Health Score: 73/100  📊   ║
╠══════════════════════════════════════╣
║  Contracts    ████████░░  80%       ║
║  Error Handling ██████░░░░  60%     ║
║  Validation   ███████░░░  70%       ║
║  Env Vars     █████████░  90%       ║
║  Security     ██████░░░░  60%       ║
║  Performance  ████████░░  80%       ║
╚══════════════════════════════════════╝

Track it over time to see your backend getting healthier with every commit.

🛠️ Available Tools

All tools are exposed via MCP and available directly in Claude Code:

Tool

Description

run_diagnosis

Full diagnostic pipeline — scans routes, checks contracts, runs all audits, generates docs, calculates health score

watch_diagnosis

Incremental analysis — compares against last report, shows new/fixed issues and health delta

check_changes

Quick check — shows changed files since last diagnosis without re-running analysis

init_context

Analyze project structure, identify domains, frameworks, and architecture

check_contracts

Cross-reference frontend API calls against backend routes

scan_routes

Discover all API routes/endpoints across all supported frameworks

audit_errors

Check error handling — try/catch coverage, consistent error formats

audit_env

Verify environment variables — missing refs, prefix misuse

audit_security

Security scan — auth gaps, CORS, injection patterns

audit_performance

Performance anti-patterns — N+1 queries, unbounded queries, missing pagination

audit_prisma

Prisma schema cross-referencing — nonexistent models/fields, missing indexes

audit_server_actions

Next.js Server Actions audit — validation, auth, error handling

scan_dependencies

Dependency vulnerability scanner — known CVEs, deprecated packages, lock file checks

fix_issue

Generate a unified diff patch for a specific issue

fix_all_issues

Batch-generate patches for all open issues

get_api_docs

Auto-generated living API documentation

get_ledger

Full issue lifecycle ledger — filter by status, severity, category

live_test

Optional HTTP endpoint testing (GET-only, localhost-only, safety-first)

query_api

Query the API relationship graph — "unprotected routes", "routes writing to users"

get_patterns

Cross-project pattern insights — most common issues by framework

audit_rate_limiting

Rate limiting & caching audit — detects packages, code patterns, flags unprotected auth endpoints

audit_versioning

API versioning detection — path/header versioning, version gaps, consistency checks

visualize_middleware

Middleware chain visualization — maps execution order, checks ordering, markdown output

trace_types

Multi-layer type tracing — traces types across frontend → route → service → DB layers

run_safety_check

Validate project safety constraints before diagnosis

Tool Usage Examples

// In Claude Code, these are called automatically.
// Direct MCP usage:

// Full diagnosis (the /doctor command runs this)
await client.callTool('diagnose', { projectPath: '.' });

// Just check contracts
await client.callTool('verify_contracts', { projectPath: '.' });

// Generate fresh API docs
await client.callTool('generate_docs', { projectPath: '.', outputFormat: 'markdown' });

🩺 The /doctor Command

The simplest way to use Backend Max. Just type /doctor in Claude Code.

What it does:

  1. 🧠 Scans your project to understand its intent and architecture

  2. 🔗 Verifies all frontend↔backend contracts

  3. 🔍 Runs all 6 audit engines

  4. 📖 Generates/updates API documentation

  5. 💯 Calculates your health score

  6. 📋 Returns a prioritized report

Example Output

🩺 Backend Max Diagnosis Complete
═══════════════════════════════════

📊 Health Score: 73/100 (↑ 5 from last run)

🚨 Critical Issues (2)
  ├─ AUTH_GAP: /api/billing/charge has no auth middleware
  │  → app/api/billing/charge/route.ts:1
  │
  └─ CONTRACT_DRIFT: Frontend calls DELETE /api/user/:id
     but backend only exposes GET, POST on /api/users
     → lib/api/users.ts:45 ↔ app/api/users/route.ts

⚠️  Warnings (5)
  ├─ VALIDATION: POST /api/posts missing input validation
  ├─ ERROR_FORMAT: 3 routes return inconsistent error shapes
  ├─ ENV_VAR: DATABASE_URL referenced but not in .env.example
  ├─ PERFORMANCE: N+1 query pattern in /api/users (line 23)
  └─ SECURITY: CORS allows * in production config

ℹ️  Info (3)
  ├─ 2 routes could benefit from response caching
  ├─ API docs regenerated (12 endpoints documented)
  └─ 1 previously fixed issue verified as resolved ✓

📖 API docs updated: .backend-doctor/api-docs.md
📒 Issue ledger updated: .backend-doctor/history/

📁 Project Structure

Backend Max creates a .backend-doctor/ directory in your project root:

.backend-doctor/
├── project-intent.json      # Understanding of your project's purpose & domains
├── api-docs.md              # Auto-generated API documentation
├── health-score.json        # Current & historical health scores
├── issues/
│   ├── current.json         # Active issues from latest run
│   └── ledger.json          # Full issue lifecycle history
├── contracts/
│   ├── frontend-calls.json  # Extracted frontend API calls
│   └── backend-routes.json  # Extracted backend route definitions
└── history/
    └── 2026-03-27.json      # Historical audit snapshots

📌 Add .backend-doctor/ to your .gitignore or commit it — your choice. Committing it gives your team shared visibility into backend health.

⚙️ Configuration

Create a backend-max.config.json in your project root to customize behavior:

{
  // Which audit engines to run (default: all)
  "audits": {
    "contracts": true,
    "errorHandling": true,
    "validation": true,
    "envVars": true,
    "security": true,
    "performance": true
  },

  // Paths to scan (globs)
  "include": ["app/api/**", "src/routes/**"],

  // Paths to ignore
  "exclude": ["**/*.test.ts", "**/__mocks__/**"],

  // Frontend paths for contract verification
  "frontendPaths": ["app/**", "components/**", "lib/**"],

  // Minimum severity to report: "info" | "warning" | "critical"
  "minSeverity": "info",

  // Custom environment variable file paths
  "envFiles": [".env", ".env.local", ".env.production"]
}

🛡️ Safety & Security

Backend Max is built with a safety-first philosophy. Every operation — from file scanning to report generation — passes through multiple safety layers. Your code is never executed, your secrets are never stored, and all output is sanitized before it touches disk. Backend Max is designed so that even in the worst case, it cannot leak sensitive data or damage your project.

Safety Systems

System

What It Does

Default

Path Guardian

Validates project paths, blocks sensitive directories (.ssh, .aws, .gnupg), prevents path traversal attacks

Always on

Output Sanitizer

Detects and redacts secrets in reports — AWS keys, GitHub tokens, Stripe keys, JWTs, connection strings, private keys, Slack tokens, and 12+ more patterns

Always on

Scope Limiter

Caps file count (5,000), file size (1MB), scan depth (15 levels). Prevents memory exhaustion on large monorepos

Configurable

Auto-Gitignore

Automatically adds .backend-doctor/ to .gitignore on first run. Prevents diagnostic data from being committed

On by default

Report Pruning

Auto-deletes diagnosis reports older than 30 days

Configurable

Env Value Stripping

Environment variable VALUES are never read or stored — only variable NAMES. Impossible to leak secrets through reports

Always on

Write Protection

Fix engine validates every write target: must be a source file, must be in project, must not be generated/config/lock files

Always on

Security Guarantees

  • ✅ Backend Max NEVER reads environment variable values — only names

  • ✅ Backend Max NEVER executes your code — pure static analysis

  • ✅ Backend Max NEVER sends data externally — everything stays local

  • ✅ All diagnostic output is scrubbed for 15+ secret patterns before writing to disk

  • ✅ .backend-doctor/ is auto-gitignored to prevent accidental commits

  • ✅ File writes (fix engine) are sandboxed to source files within the project only

Configuration

Safety limits can be tuned via backend-max.config.json:

{
  "maxFiles": 5000,
  "maxFileSizeBytes": 1048576,
  "maxScanDepth": 15,
  "reportRetentionDays": 30,
  "autoGitignore": true
}

🗺️ Roadmap

Phase 1 — Foundation ✅

  • MCP server with stdio transport

  • Next.js App Router support

  • 6 core audit engines

  • Cross-boundary contract verification

  • Auto-generated API documentation

  • Health score calculation

  • Issue lifecycle tracking

  • /doctor slash command

Phase 2 — Expansion ✅

  • Safety & sandboxing

  • Express.js support

  • CI/CD integration (GitHub Actions via SARIF)

  • Watch mode / incremental analysis

  • Auto-fix engine with code patches

  • tRPC support

  • GraphQL resolver analysis

  • Dependency vulnerability scanning

Phase 3 — Intelligence 🚧

  • Fastify + Hono framework support

  • Multi-layer type tracing (frontend → route → service → DB)

  • API versioning analysis

  • Rate limiting & caching audit

  • Middleware chain visualization

  • OpenAPI/Swagger spec generation

  • Dead code detection (unused routes/exports)

  • Test coverage mapping

Phase 4 — Ecosystem 🔮

  • VS Code extension — inline diagnostics

  • Monorepo support (Turborepo/Nx)

  • Database query complexity analyzer

  • API changelog between commits

  • Webhook/event auditor

  • Multi-service contract verification (microservices)

🤝 Contributing

Contributions are welcome! See CONTRIBUTING.md for guidelines.

Quick summary:

  1. Fork & clone

  2. npm install && npm run build

  3. Create a feature branch

  4. Write your code (TypeScript strict, ESM, JSDoc comments)

  5. Open a PR

📄 License

MIT © 2026 Rishi Kolisetty


Built with 🩺 by Rishi Kolisetty

Backend Max sees what your linter can't.

Star on GitHub

Available Tools

41 tools
audit_auth_flowA
Read-onlyIdempotent

Authentication surface analysis. Discovers login endpoints, detects auth mechanisms (password, OAuth, OTP), checks for CSRF tokens, tests rate limiting on auth endpoints, and probes for account enumeration. No source code needed.

Inputs: url (required).

audit_breaking_changesA
Idempotent

Compare current API routes against a saved baseline to detect breaking changes: removed endpoints, removed methods, changed parameters, removed validation or auth. Saves a baseline on first run.

Inputs: projectPath (required), saveBaseline.

audit_cookiesA
Read-onlyIdempotent

Cookie security audit. Checks Secure, HttpOnly, SameSite flags on all cookies. Detects session tokens without HttpOnly, SameSite=None without Secure, overly broad cookie scopes. No source code needed.

Inputs: url (required).

audit_corsA
Read-onlyIdempotent

CORS misconfiguration detection. Tests preflight requests, origin reflection, wildcard + credentials conflicts, overly permissive methods, and missing max-age. Catches the exact issue found on coach.tetr.com. No source code needed.

Inputs: url (required).

audit_dnsA
Read-onlyIdempotent

DNS and infrastructure analysis. Resolves A/AAAA/CNAME/MX/NS/TXT records, detects CDN provider, checks SPF/DMARC/CAA records for email and certificate security. No source code needed.

Inputs: url (required).

audit_envA
Read-onlyIdempotent

Scan environment variable usage. Cross-references process.env references against .env files, checks for missing NEXT_PUBLIC_ prefixes, and detects undefined variables.

Inputs: projectPath (required).

audit_errorsA
Read-onlyIdempotent

Audit error handling across all API routes. Checks for try/catch coverage, consistent error response formats, unhandled promise rejections, and missing global error handlers.

Inputs: projectPath (required).

audit_externalA
Read-onlyIdempotent

Audit a deployed website or API from the outside — checks security headers (HSTS, CSP, X-Frame-Options, etc.), server information leakage, caching configuration, HTTPS redirect, error page information disclosure, and response time. No source code needed.

Inputs: url (required).

audit_graphqlA
Read-onlyIdempotent

Deep GraphQL security audit — checks for introspection exposure, missing query depth/complexity limits, N+1 query patterns (DataLoader absence), missing field-level authorization, and batching attack vectors. Supports Apollo, Yoga, Mercurius, NestJS, and Pothos.

Inputs: projectPath (required).

audit_headersA
Read-onlyIdempotent

Deep HTTP security header analysis with A-F letter grading. Checks CSP (unsafe-inline/eval, wildcards), HSTS (max-age, includeSubDomains, preload), COEP, COOP, CORP, Permissions-Policy, and more. No source code needed — just a URL.

Inputs: url (required).

audit_migrationsA
Read-onlyIdempotent

Audit database migration files for destructive operations (DROP TABLE, DROP COLUMN, type changes), missing rollback/down migrations, and schema drift. Supports Prisma, Knex, Drizzle, TypeORM, and raw SQL.

Inputs: projectPath (required).

audit_performanceA
Read-onlyIdempotent

Detect performance anti-patterns. Finds N+1 queries, unbounded database calls, missing pagination, and payload bloat (backend returns more data than frontend uses).

Inputs: projectPath (required).

audit_prismaA
Read-onlyIdempotent

Audit Prisma schema and database usage. Parses schema.prisma, cross-references database calls against the schema to find nonexistent models/fields, suggests missing indexes, and checks for migration drift.

Inputs: projectPath (required).

audit_rate_limitingA
Read-onlyIdempotent

Audit rate limiting and caching patterns. Detects rate limiting packages and code patterns, finds auth endpoints without rate limiting, identifies GET endpoints with DB calls but no caching, and flags cacheable endpoints missing Cache-Control headers.

Inputs: projectPath (required).

audit_secretsA
Read-onlyIdempotent

Scan codebase for hardcoded API keys, tokens, passwords, private keys, and connection strings. Uses pattern matching for 25+ provider-specific secret formats (AWS, Stripe, GitHub, OpenAI, Anthropic, etc.) and checks .gitignore for env file exclusion.

Inputs: projectPath (required).

audit_securityB
Read-onlyIdempotent

Check security posture. Detects auth middleware gaps, CORS misconfigurations, missing input validation, and known vulnerability patterns.

Inputs: projectPath (required).

audit_server_actionsA
Read-onlyIdempotent

Audit Next.js Server Actions. Finds all 'use server' functions and checks for missing validation, error handling, auth checks, and unprotected database calls.

Inputs: projectPath (required).

audit_sslA
Read-onlyIdempotent

TLS/certificate analysis. Checks certificate chain, expiry (warns at 30 days, critical at 7), protocol version (TLS 1.2+), cipher strength, HTTP→HTTPS redirect, and HSTS preload. No source code needed.

Inputs: url (required).

audit_versioningA
Read-onlyIdempotent

Detect and audit API versioning patterns. Finds path-based (/v1/, /v2/) and header-based (X-API-Version) versioning, identifies version gaps (routes in v1 but not v2), and flags inconsistent versioning across endpoints.

Inputs: projectPath (required).

check_changesA
Read-onlyIdempotent

Quick check — shows which files changed since the last diagnosis and how long ago it ran. Does NOT re-run analysis. Use this to decide if a full re-run is needed.

Inputs: projectPath (required).

check_contractsA
Read-onlyIdempotent

Verify frontend-backend contracts. Finds all API calls in frontend code and cross-references them against backend route definitions. Detects mismatches, dead endpoints, and phantom calls.

Inputs: projectPath (required).

fix_all_issuesA
Idempotent

Generate code patches for all open issues in the ledger. Returns unified diffs that can be applied with git apply. Does NOT auto-apply — returns patches for review.

Inputs: projectPath (required).

fix_issueA
Idempotent

Apply a proposed fix for a specific issue. Only fixes backend code — never touches frontend files.

Inputs: issueId (required), projectPath (required).

get_api_docsA
Read-onlyIdempotent

Get the auto-generated living API documentation for the project. Returns the full route map with request/response types, auth requirements, and frontend consumers.

Inputs: projectPath (required).

get_contextC
Read-onlyIdempotent

Get the current project understanding.

Inputs: projectPath (required).

get_ledgerA
Read-onlyIdempotent

Get the issue ledger — tracks every issue from discovery through fix. Filter by status, severity, or category.

Inputs: projectPath (required), filter.

get_patternsB
Read-onlyIdempotent

Get common patterns across projects. Shows the most frequently encountered issues for a given framework. Data is stored locally only — never sent externally.

Inputs: framework.

init_contextA
Read-onlyIdempotent

Analyze a project for the first time to understand what it does. Scans routes, package.json, database schema, and README to build a project understanding. Run this before any diagnosis.

Inputs: projectPath (required).

live_testA
Read-only

Run live HTTP tests against discovered API endpoints. SAFETY: Only GET endpoints are tested. DELETE is never called. POST/PUT/PATCH are skipped (no safe payload generation). Only localhost URLs are accepted.

Inputs: baseUrl (required), projectPath (required), dryRun, timeout, +1 more.

probe_error_handlingA
Read-onlyIdempotent

Error response analysis. Probes with 404s, malformed input, long URLs, wrong content types, and SQL injection patterns to detect stack trace leakage, framework disclosure, database error exposure, and debug mode. No source code needed.

Inputs: url (required).

query_apiA
Read-onlyIdempotent

Query the API graph with natural language. Builds a graph of routes, models, frontend components, and middleware, then queries it. Examples: "unprotected routes", "routes that write to users", "unused models".

Inputs: query (required), projectPath (required), rebuild.

run_diagnosisB
Read-onlyIdempotent

Run a full backend diagnosis — scans routes, checks contracts, audits errors, env vars, security, and performance. Generates documentation and updates the issue ledger. This is the main entry point.

Inputs: projectPath (required), focus.

run_safety_checkA
Read-onlyIdempotent

Run safety validation on a project path. Validates the path is safe to scan, ensures .backend-doctor/ is in .gitignore, and prunes old reports. Call this before any diagnosis to verify the project is safe to analyze.

Inputs: projectPath (required).

scan_dependenciesA
Read-onlyIdempotent

Scan project dependencies for known vulnerabilities, deprecated packages, and security issues. Checks package.json against a built-in vulnerability database and optionally runs npm audit. No network required for basic checks.

Inputs: projectPath (required).

scan_public_apiA
Read-onlyIdempotent

API surface discovery from frontend JavaScript. Crawls HTML for script tags, extracts API endpoint URLs from JS bundles, probes each endpoint to map auth requirements and response behavior. No source code needed.

Inputs: url (required).

scan_routesA
Read-onlyIdempotent

Scan and parse all API routes in a Next.js project. Returns the full API surface: endpoints, HTTP methods, parameters, and file locations.

Inputs: projectPath (required).

score_tech_debtA
Read-onlyIdempotent

Calculate a technical debt score (0–100) from all audit findings. Estimates remediation effort in hours per category, assigns a letter grade (A+ to F), tracks score over time, and generates prioritized recommendations. Run after run_diagnosis for best results.

Inputs: projectPath (required).

trace_typesA
Read-onlyIdempotent

Trace types across application layers: frontend → route handler → service → repository → database. Finds type mismatches between layers, identifies routes accessing DB directly without service layer, and maps the full type chain for each endpoint.

Inputs: projectPath (required).

update_contextB
Idempotent

Update the project understanding with user-provided corrections or additions.

Inputs: updates (required), projectPath (required).

visualize_middlewareA
Read-onlyIdempotent

Visualize the middleware chain for all routes. Detects global middleware (app.use), Next.js middleware, and inline middleware. Shows execution order, identifies ordering issues (CORS before auth), and flags unprotected mutation endpoints.

Inputs: projectPath (required).

watch_diagnosisA
Read-onlyIdempotent

Run an incremental diagnosis — compares current state against the last saved report. Highlights new issues, fixed issues, and health score changes. Runs a full analysis but highlights what changed — new issues, fixed issues, and health score delta.

Inputs: projectPath (required), focus.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 41 tools

    Disambiguation4/5

    Most tools have distinct purposes, but some overlap exists (e.g., multiple audit tools for security, performance, etc.). Descriptions help differentiate, but an agent might still confuse similar-sounding tools like run_safety_check and run_diagnosis.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern in snake_case (e.g., get_ledger, fix_issue, scan_routes). No mixing of conventions, making it easy for an agent to predict tool names.

    Tool Count3/5

    With 41 tools, the server feels overloaded despite covering a broad domain. While each tool has a rationale, the count exceeds typical well-scoped ranges (3-15), risking agent confusion and slow selection.

    Completeness4/5

    The tool set comprehensively covers backend auditing, diagnosis, testing, and contract checking. Minor gaps exist (e.g., no tool for monitoring or deployment audit), but core workflows are well-supported.

    Maintenance

    ActivityInactive
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      A
      quality
      Not graded
      maintenance
      Static analysis engine that detects schema mismatches between data producers (like MCP servers) and consumers (like client code), preventing runtime errors by validating contracts at development time.
      11
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      MCP server that provides code validation rules and analysis for various stacks/frameworks, enabling automated code reviews and reporting directly from VS Code and other editors.
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Cross-stack MCP server that scans frontend and backend code together, detects mismatches like phantom calls, dead endpoints, and field drift, and provides a full-stack health audit.
      1
      MIT