New:Socket for Asana Is Now Available.Learn more
Get Started

@corbat-tech/coding-standards-mcp

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@corbat-tech/coding-standards-mcp

AI coding standards that apply themselves - MCP server that enforces production-grade code

Source
npmnpm
Version
2.0.0
Version published
Maintainers
1
Created
Source

CORBAT MCP

AI Coding Standards Server

AI-generated code that passes code review on the first try.

npm version CI Coverage License: MIT MCP

Cursor VS Code Windsurf JetBrains Zed Claude

Works with GitHub Copilot, Continue, Cline, Tabnine, Amazon Q, and 25+ more tools

The Problem

AI-generated code works, but rarely passes code review:

Without CorbatWith Corbat
No dependency injectionProper DI with interfaces
Missing error handlingCustom error types with context
Basic tests (if any)80%+ coverage with TDD
God classes, long methodsSOLID, max 20 lines/method
Fails SonarQubePasses quality gates

Result: Production-ready code that passes code review.

Quick Start

1. Add to your MCP config:

{
  "mcpServers": {
    "corbat": {
      "command": "npx",
      "args": ["-y", "@corbat-tech/coding-standards-mcp"]
    }
  }
}

2. Config file location:

ToolLocation
Cursor.cursor/mcp.json
VS Code.vscode/mcp.json
Windsurf~/.codeium/windsurf/mcp_config.json
JetBrainsSettings → AI Assistant → MCP
Claude Desktop~/.config/Claude/claude_desktop_config.json
Claude Codeclaude mcp add corbat -- npx -y @corbat-tech/coding-standards-mcp

Complete setup guide for all 25+ tools

3. Done! Corbat auto-detects your stack.

You: "Create a payment service"

Corbat: ✓ Detected: Java 21, Spring Boot 3, Maven
        ✓ Profile: java-spring-backend
        ✓ Architecture: Hexagonal + DDD
        ✓ Testing: TDD, 80%+ coverage

Benchmark Results v2.0

Overall Impact

MetricWithout CorbatWith CorbatImprovement
Quality Score4.6/107.7/10+67%
Custom Errors318+500%
Interfaces/Ports1941+116%
Files (modularity)5595+73%

By Complexity Level

CategoryScenariosWithoutWithImprovement
BasicUserService, REST API, React Form4.07.6+90%
IntermediateKafka Consumer, FastAPI, Go HTTP4.37.2+67%
AdvancedSaga, Circuit Breaker, Event Sourcing5.68.2+46%

Pattern Detection

PatternWithout CorbatWith Corbat
Hexagonal Architecture0/10 scenarios10/10
Repository Pattern2/107/10
Custom Error Types1/108/10
Dependency Injection2/1010/10
Saga Pattern0/101/1 (when needed)

Real Example: Saga Pattern (Scenario 07)

Without CorbatWith Corbat
// Hardcoded rollback, not extensible
try {
  targetAccount.credit(amount);
} catch (Exception e) {
  rollbackDebit(sourceAccount, amount);
  throw new TransferException(...);
}
// Reusable Saga Pattern
public interface SagaStep<T> {
  void execute(T context);
  void compensate(T context);
}

public class SagaOrchestrator<T> {
  public void execute(T context) {
    for (SagaStep<T> step : steps) {
      step.execute(context);
      executedSteps.add(step);
    }
  }
  // Auto-rollback on failure
}
9 files, 292 LOC, manual rollback17 files, 707 LOC, orchestrated compensation

View full benchmark analysis with 10 scenarios

Code Comparison

Before: Without Corbat MCP

class UserService {
  private users: Map<string, User> = new Map();

  getById(id: string): User | undefined {
    return this.users.get(id);
  }

  createUser(input: CreateUserInput): User {
    if (!input.name) throw new Error('Name is required');
    const user = { id: uuidv4(), ...input };
    this.users.set(user.id, user);
    return user;
  }
}
// ✗ Returns undefined  ✗ Generic errors  ✗ No DI  ✗ Hardcoded storage

After: With Corbat MCP

// Port (interface)
interface UserRepository {
  findById(id: string): User | null;
  save(user: User): void;
  existsByEmail(email: string): boolean;
}

// Custom errors
class UserNotFoundError extends Error { /*...*/ }
class UserAlreadyExistsError extends Error { /*...*/ }
class InvalidUserInputError extends Error { /*...*/ }

// Service with DI
class UserService {
  constructor(
    private readonly repository: UserRepository,
    private readonly idGenerator: IdGenerator
  ) {}

  getUserById(id: string): User {
    const user = this.repository.findById(id);
    if (!user) throw new UserNotFoundError(id);
    return user;
  }

  createUser(input: CreateUserInput): User {
    this.validateInput(input);
    this.ensureEmailNotTaken(input.email);
    const user = createUser(this.idGenerator.generate(), input);
    this.repository.save(user);
    return user;
  }
}
// ✓ Repository interface  ✓ 3 custom errors  ✓ DI  ✓ 11 tests  ✓ Testable

Result: 3 files → 7 files | 129 LOC → 308 LOC | 0 interfaces → 4 interfaces | 0 custom errors → 3

Built-in Profiles

ProfileStackArchitectureTesting
java-spring-backendJava 21 + Spring Boot 3Hexagonal + DDD + CQRSTDD, 80%+ coverage
kotlin-springKotlin + Spring Boot 3Hexagonal + CoroutinesKotest, MockK
nodejsNode.js + TypeScriptClean ArchitectureVitest
nextjsNext.js 14+Feature-based + RSCVitest, Playwright
reactReact 18+Feature-basedTesting Library
vueVue 3.5+Feature-basedVitest
angularAngular 19+Feature modulesJest
pythonPython + FastAPIHexagonal + asyncpytest
goGo 1.22+Clean + idiomaticTable-driven tests
rustRust + AxumClean + ownershipBuilt-in + proptest
csharp-dotnetC# 12 + ASP.NET Core 8Clean + CQRSxUnit, FluentAssertions
flutterDart 3 + FlutterClean + BLoC/Riverpodflutter_test
minimalAnyBasic quality rulesOptional

Auto-detection: Corbat reads pom.xml, package.json, go.mod, Cargo.toml, pubspec.yaml, *.csproj to select the right profile.

Architecture Patterns Enforced

  • Hexagonal Architecture — Ports & Adapters, infrastructure isolation
  • Domain-Driven Design — Aggregates, Value Objects, Domain Events
  • SOLID Principles — Single responsibility, dependency inversion
  • Clean Code — Max 20 lines/method, meaningful names, no magic numbers
  • Error Handling — Custom exceptions with context, no generic catches
  • Testing — TDD workflow, unit + integration, mocking strategies

Customize

Ready-to-use templates

Copy a production-ready configuration for your stack:

Browse 14 templates — Java, Python, Node.js, React, Vue, Angular, Go, Kotlin, Rust, Flutter, and more.

Generate a custom profile

npx corbat-init

Interactive wizard that auto-detects your stack and lets you configure architecture, DDD patterns, and quality metrics.

Manual config

Create .corbat.json in your project root:

{
  "profile": "java-spring-backend",
  "architecture": {
    "pattern": "hexagonal",
    "layers": ["domain", "application", "infrastructure", "api"]
  },
  "ddd": {
    "aggregates": true,
    "valueObjects": true,
    "domainEvents": true
  },
  "quality": {
    "maxMethodLines": 20,
    "maxClassLines": 200,
    "minCoverage": 80
  },
  "rules": {
    "always": ["Use records for DTOs", "Prefer Optional over null"],
    "never": ["Use field injection", "Catch generic Exception"]
  }
}

How It Works

Your Prompt ──▶ Corbat MCP ──▶ AI + Standards
                    │
                    ├─ 1. Detect stack (pom.xml, package.json...)
                    ├─ 2. Classify task (feature, bugfix, refactor)
                    ├─ 3. Load profile with architecture rules
                    └─ 4. Inject guardrails before code generation

Documentation

ResourceDescription
Setup GuideInstallation for all 25+ tools
TemplatesReady-to-use .corbat.json configurations
CompatibilityFull list of supported tools
Benchmark v2 Analysis10 scenarios with detailed comparison
API ReferenceTools, prompts, and configuration

Stop fixing AI code. Start shipping it.

Without CorbatWith Corbat
4.6/10 quality7.7/10 quality
3 custom errors18 custom errors
0% hexagonal100% hexagonal

Recommended by corbat-tech — We use Claude Code internally, but Corbat MCP works with any MCP-compatible tool.

Keywords

mcp

FAQs

Package last updated on 28 Jan 2026

Related posts