Skip to content

Languages

Every language has its own philosophy — its own sense of what "good code" means. MCP Zen of Languages encodes these philosophies as zen principles: opinionated, idiomatic best practices drawn from each language's community wisdom. Each principle maps to one or more detectors that find violations in your code.

At a Glance

Programming & Markup Languages

Language Principles Detectors Parser Philosophy Origin
Python 20 30 AST PEP 20 - The Zen of Python
Pydantic 8 8 Regex Pydantic v2 documentation
FastAPI 6 6 Regex FastAPI documentation
Django 6 6 Regex Django documentation
SQLAlchemy 6 6 Regex SQLAlchemy 2.0 documentation
TypeScript 18 25 Regex Google TypeScript Style Guide
React 5 5 Regex React documentation and Rules of React
Angular 5 5 Regex Angular Style Guide
Next.js 5 5 Regex Next.js documentation
Rust 17 18 Regex Rust API Guidelines
Go 20 21 Regex Effective Go & The Zen of Go
JavaScript 18 18 Regex Airbnb JavaScript Style Guide
Vue 5 5 Regex Vue Style Guide
CSS 8 8 Regex CSSWG + common modular CSS practices
Ansible 20 20 Regex The Zen of Ansible (Red Hat)
Bash 14 14 Regex Google Shell Style Guide
PowerShell 15 15 Regex PoshCode Style Guide
Ruby 11 11 Regex Ruby Style Guide
SQL 9 9 SQLGlot ANSI SQL + production database best practices
C++ 13 13 Regex C++ Core Guidelines
C# 13 13 Regex C# Coding Conventions
Docker Compose 4 4 Regex Compose Specification
Dockerfile 8 8 Regex Dockerfile Best Practices
LaTeX 9 9 Regex LaTeX Project
Markdown / MDX 7 7 Regex CommonMark + MDX authoring best practices
Terraform 7 7 Regex Terraform language and module best-practice documentation
Programming & markup subtotal 277 296

Workflows & Automation

Language Principles Workflow Checks Parser Philosophy Origin
GitHub Actions 15 15 YAML GitHub Actions Workflow Syntax
GitLab CI 10 10 YAML GitLab CI/CD documentation
Workflows subtotal 25 25

Config Formats

Language Family Principles Detectors Parser Coverage Breakdown
Config formats 46 46 Regex JSON (9), SVG (15), TOML (8), XML (6), YAML (8)
Config subtotal 46 46

Coverage Totals

  • Principles (all categories): 348
  • Detectors + workflow checks: 367

Maturity Tiers

  • Full Analysis


    AST parsing, cyclomatic complexity, dependency graphs, maintainability index. The deepest analysis available.

    Python

  • Rule-Driven


    Dedicated detectors with regex-based pattern matching. Each rule has its own detector class with configurable thresholds.

    Pydantic · FastAPI · Django · SQLAlchemy · TypeScript · React · Angular · Next.js · Rust · Go · JavaScript · Vue · CSS · Ansible · Bash · PowerShell · Ruby · SQL · C++ · C# · Docker Compose · Dockerfile · Terraform

  • Documentation & Markup


    Markup-focused detectors for docs and technical writing quality, structure, and maintainability.

    Markdown / MDX · LaTeX

  • Workflow Automation


    CI/CD-specific security and maintainability checks for pipeline files and reusable workflow patterns.

    GitHub Actions

  • Config Validation


    Schema and structure-focused detectors for data formats. Checks consistency, naming conventions, and format-specific best practices.

    JSON · SVG · TOML · XML · YAML

All tiers use real detectors

Every language listed above has fully implemented detectors — there are no stubs or placeholders. The tier difference reflects parser depth (AST vs regex), not implementation completeness.

How Principles Work

Each zen principle has four key attributes:

  • Rule ID — A stable identifier like python-003 or rust-008 used in configuration and reports
  • Category — Groups related principles (e.g., ERROR_HANDLING, TYPE_SAFETY, IDIOMS)
  • Severity — A 1-10 score indicating how critical violations are (9-10 = critical, 1-3 = informational)
  • Detectors — One or more detector classes that find violations of this principle in your code

You can tune severity thresholds and detector parameters per-language in your zen-config.yaml.

Choosing Your Starting Language

Start with Python — it has the deepest analysis (AST parsing, cyclomatic complexity, dependency graphs) and detectors covering everything from naming style to god classes.

Start with TypeScript for type-safety focus, or JavaScript for modern patterns. Both detect common pitfalls in frontend and Node.js codebases.

Rust focuses on ownership and safety idioms. C++ enforces modern C++ practices (smart pointers, RAII, const-correctness). Go encodes Effective Go principles.

Bash and PowerShell catch the shell-scripting antipatterns that cause outages — unquoted variables, missing error handling, eval injection.

GitHub Actions focuses on workflow hardening: pinning actions, permission scoping, secret safety, and pipeline maintainability.

The config formats page covers JSON, SVG, TOML, XML, and YAML — consistency checks, naming conventions, and format-specific best practices.

Programmatic Access

mcp_zen_of_languages.rules.get_all_languages

get_all_languages()

Return every language key registered in ZEN_REGISTRY.

RETURNS DESCRIPTION
list[str]

list[str]: Sorted insertion-order list of language keys.

Source code in src/mcp_zen_of_languages/rules/__init__.py
def get_all_languages() -> list[str]:
    """Return every language key registered in ``ZEN_REGISTRY``.

    Returns:
        list[str]: Sorted insertion-order list of language keys.
    """
    _initialize_registry()
    return list(ZEN_REGISTRY.keys())

mcp_zen_of_languages.rules.get_language_zen

get_language_zen(language)

Retrieve the LanguageZenPrinciples for language, or None if unsupported.

PARAMETER DESCRIPTION
language

Case-insensitive language key (e.g. "Python""python").

TYPE: str

RETURNS DESCRIPTION
LanguageZenPrinciples | None

'LanguageZenPrinciples | None': The matching LanguageZenPrinciples, or None.

Source code in src/mcp_zen_of_languages/rules/__init__.py
def get_language_zen(language: str) -> "LanguageZenPrinciples | None":
    """Retrieve the ``LanguageZenPrinciples`` for *language*, or ``None`` if unsupported.

    Args:
        language (str): Case-insensitive language key (e.g. ``"Python"`` → ``"python"``).

    Returns:
        'LanguageZenPrinciples | None': The matching ``LanguageZenPrinciples``, or ``None``.
    """
    _initialize_registry()
    return ZEN_REGISTRY.get(language.lower())