mcp-zen-of-languages
Enables AI assistants and developers to analyze code for language-specific best practices and idiomatic patterns across programming languages, CI automation, and configuration formats.
README
<p align="center"> <img src="https://github.com/Anselmoo/mcp-zen-of-languages/blob/main/docs/assets/logo.svg?raw=true" alt="MCP Zen of Languages" width="460" /> </p>
<h1 align="center">Zen of Languages</h1>
<p align="center"> <em>🖌️ Write code the way the language intended.</em> </p>
<p align="center"> <a href="https://pypi.org/project/mcp-zen-of-languages"><img src="https://img.shields.io/pypi/v/mcp-zen-of-languages?style=flat-square&color=989cff" alt="PyPI"></a> <a href="https://pypi.org/project/mcp-zen-of-languages"><img src="https://img.shields.io/pypi/pyversions/mcp-zen-of-languages?style=flat-square" alt="Python"></a> <a href="https://github.com/Anselmoo/mcp-zen-of-languages/blob/main/LICENSE"><img src="https://img.shields.io/github/license/Anselmoo/mcp-zen-of-languages?style=flat-square" alt="License"></a> <a href="https://github.com/Anselmoo/mcp-zen-of-languages/actions"><img src="https://img.shields.io/github/actions/workflow/status/Anselmoo/mcp-zen-of-languages/cicd.yml?style=flat-square&label=CI" alt="CI"></a> <a href="https://anselmoo.github.io/mcp-zen-of-languages/"><img src="https://img.shields.io/badge/docs-mkdocs-c9b3ff?style=flat-square" alt="Docs"></a> <a href="https://codecov.io/gh/Anselmoo/mcp-zen-of-languages"><img src="https://codecov.io/gh/Anselmoo/mcp-zen-of-languages/graph/badge.svg?token=CODECOV_TOKEN" alt="Coverage"></a> </p>
<p align="center"> <a href="https://insiders.vscode.dev/redirect/mcp/install?name=zen-of-languages&config=%7B%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22--from%22%2C%22mcp-zen-of-languages%22%2C%22mcp-zen-of-languages-server%22%5D%7D"><img src="https://img.shields.io/badge/VS_Code-Install_MCP-007ACC?style=flat-square&logo=visualstudiocode&logoColor=white" alt="Install in VS Code"></a> <a href="https://insiders.vscode.dev/redirect/mcp/install?name=zen-of-languages&config=%7B%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22--from%22%2C%22mcp-zen-of-languages%22%2C%22mcp-zen-of-languages-server%22%5D%7D&quality=insiders"><img src="https://img.shields.io/badge/VS_Code_Insiders-Install_MCP-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white" alt="Install in VS Code Insiders"></a> <a href="https://github.com/Anselmoo/mcp-zen-of-languages/pkgs/container/mcp-zen-of-languages"><img src="https://img.shields.io/badge/Docker-GHCR-2496ED?style=flat-square&logo=docker&logoColor=white" alt="Docker"></a> </p>
An MCP server for AI assistants that brings multi-language idiomatic code analysis into your editor. Zen of Languages codifies best practices ("zen principles") into machine-readable rules across programming languages, CI automation, and configuration formats — so AI agents and developers get actionable, language-aware feedback in every review. Connect it to Codex, Claude Desktop, VS Code, Cursor, or any MCP-compatible client and start analyzing code in seconds.
<!-- --8<-- [start:what-you-get] -->
- 348 zen principles across programming, markup, workflow, and config domains
- 367 detector/check coverage points with severity scoring
- MCP server for IDE and agent workflows (13 tools, 3 resources, 1 prompt)
- CLI reports with remediation prompts and JSON / Markdown export
- Rule-driven pipelines configurable per language and project <!-- --8<-- [end:what-you-get] -->
Why MCP for Zen Analysis
<!-- --8<-- [start:why-mcp] -->
MCP turns zen analysis from a standalone report into an interactive engineering loop. Instead of copying output between tools, your editor/agent can call zen tools directly, inspect violations in context, generate remediation prompts, and apply fixes in one flow.
- Less context switching: analyze, explain, and remediate without leaving your coding session.
- Higher-fidelity fixes: prompts are generated from structured violations, not ad-hoc lint text.
- Team consistency: MCP workflows make review behavior repeatable across IDEs and agents.
<!-- --8<-- [end:why-mcp] -->
Zen Philosophy
<!-- --8<-- [start:zen-philosophy] -->
Zen of Languages treats idioms as engineering constraints, not style preferences. Every language guide encodes the practices that make code maintainable in that ecosystem, then scores violations by risk so teams can fix what matters first.
- Language-native quality over one-size-fits-all linting.
- Architectural feedback beyond formatting checks.
- Actionable prioritization through severity-guided remediation.
The project is guided by the 10 Dogmas of Zen — a set of language-agnostic principles that drive every detector and architectural decision. Read the full philosophy document for anti-patterns, rationale, and detector mappings.
<p align="center"> <img src="https://github.com/Anselmoo/mcp-zen-of-languages/blob/main/docs/assets/illustration-zen-dogma.svg?raw=true" alt="The 10 Dogmas of Zen — code quality principles visualised as zen garden stones" width="600" /> </p>
<!-- --8<-- [end:zen-philosophy] -->
Quickstart
<!-- --8<-- [start:quickstart] -->
# MCP server (IDE/agent workflows)
uvx --from mcp-zen-of-languages mcp-zen-of-languages-server
# CLI without installing (recommended)
uvx --from mcp-zen-of-languages mcp-zen-of-languages-cli --help
# Or install globally
pip install mcp-zen-of-languages
# Analyze a file (CLI)
mcp-zen-of-languages-cli report path/to/file.py
# Analyze a project with remediation prompts (CLI)
mcp-zen-of-languages-cli report path/to/project --include-prompts
Legacy aliases remain available after install: zen for the CLI and
zen-mcp-server for the MCP server.
Ignore files during analysis
Directory scans in both CLI and MCP repository analysis honor:
.gitignore.zen-of-languages.ignore
zen init now bootstraps a starter .zen-of-languages.ignore file when one is missing.
<!-- --8<-- [end:quickstart] -->
Naming Guide
Keep these names distinct to avoid setup confusion:
- Package name:
mcp-zen-of-languages(forpip installanduvx --from) - Preferred CLI command:
mcp-zen-of-languages-cli - Preferred server command:
mcp-zen-of-languages-server - Compatibility aliases:
mcp-zen-of-languages,zen, andzen-mcp-server - MCP client server key:
zen-of-languages(JSON config label in VS Code/Claude/Cursor; use the same label as a quoted TOML table name in Codex)
Installation
MCP Integration
Add the server to your MCP client configuration. For the full setup guide, see MCP Integration.
Claude Desktop — add to claude_desktop_config.json:
{
"mcpServers": {
"zen-of-languages": {
"command": "uvx",
"args": ["--from", "mcp-zen-of-languages", "mcp-zen-of-languages-server"]
}
}
}
VS Code — add to .vscode/mcp.json:
{
"servers": {
"zen-of-languages": {
"command": "uvx",
"args": ["--from", "mcp-zen-of-languages", "mcp-zen-of-languages-server"]
}
}
}
Cursor — add to .cursor/mcp.json:
{
"mcpServers": {
"zen-of-languages": {
"command": "uvx",
"args": ["--from", "mcp-zen-of-languages", "mcp-zen-of-languages-server"]
}
}
}
Codex — add to ~/.codex/config.toml:
[mcp_servers."zen-of-languages"]
command = "uvx"
args = ["--from", "mcp-zen-of-languages", "mcp-zen-of-languages-server"]
enabled = true
Codex loads MCP servers from the global ~/.codex/config.toml file rather than a repo-local workspace config.
One-Click (VS Code)
<!-- --8<-- [start:vscode-integration] -->
| Method | VS Code | VS Code Insiders |
|---|---|---|
| UVX (native) | ||
| Docker (isolated) |
<!-- --8<-- [end:vscode-integration] -->
Docker
# MCP server via Docker
docker run --rm -i ghcr.io/anselmoo/mcp-zen-of-languages:latest
# CLI via Docker
docker run --rm ghcr.io/anselmoo/mcp-zen-of-languages:latest mcp-zen-of-languages-cli --help
CLI — First Code Anamnesis
The CLI is a powerful tool for first code anamnesis — an initial diagnostic sweep of any codebase. Before wiring up MCP or choosing which files to focus on, run a single command to get a full-project health picture with severity-ranked violations, architectural smells, and remediation guidance.
# Install globally
pip install mcp-zen-of-languages
# Full-project diagnostic in one command
mcp-zen-of-languages-cli report path/to/project --include-prompts
# Export structured results for CI or dashboards
mcp-zen-of-languages-cli report path/to/project --export-json report.json --export-markdown report.md
From source:
git clone https://github.com/Anselmoo/mcp-zen-of-languages.git
cd mcp-zen-of-languages
uv sync --all-groups --all-extras
# Start the MCP server
mcp-zen-of-languages-server
# Run a CLI report
mcp-zen-of-languages-cli report path/to/file.py
MCP Tools
The server exposes 13 tools, 3 resources, and 1 prompt for AI-assisted code analysis.
| Family | Tools | Purpose |
|---|---|---|
| Analysis | analyze_zen_violations, analyze_repository, check_architectural_patterns |
Idiomatic and structural analysis |
| Reporting | generate_prompts, generate_agent_tasks, generate_report |
Remediation guidance, task lists, gap reports |
| Configuration | get_config, set_config_override, clear_config_overrides |
Read and tune thresholds at runtime |
| Metadata | detect_languages, get_supported_languages, export_rule_detector_mapping |
Discover languages, rules, detector coverage |
| Onboarding | onboard_project |
Initialize zen-config.yaml for a project |
See the full MCP Tools Reference for parameters, return types, and workflow diagrams.
Use Cases
- AI Code Review — Call
analyze_zen_violationson a file, thengenerate_promptsfor remediation instructions in a single editor round-trip. - Project-Wide Gap Analysis —
analyze_repositoryscans a codebase,generate_reportproduces a Markdown/JSON report, andgenerate_agent_taskscreates a prioritised fix list. - One-Click Onboarding —
onboard_projectdetects languages and writes a tunedzen-config.yaml, making analysis immediately project-aware.
Supported Languages
| Tier | Languages | Notes |
|---|---|---|
| Stable | Python | Full parser + richest detector coverage |
| Beta | Pydantic, FastAPI, Django, SQLAlchemy, TypeScript, React, Angular, Next.js, Go, Rust, JavaScript, Vue | Rule-driven pipelines and framework-aware heuristics |
| Experimental | Bash, PowerShell, Ruby, C++, C# | Heuristic detectors |
| Data/Config | YAML, TOML, JSON/JSON5, XML, GitHub Actions | Structure, schema, and workflow checks |
Configuration
Analysis pipelines are derived from language zen rules and merged with project overrides in zen-config.yaml. See the Configuration Guide for the full reference.
# Generate reports in multiple formats
zen report path/to/project --export-json report.json --export-markdown report.md
Documentation
Full documentation is available at anselmoo.github.io/mcp-zen-of-languages.
Contributing
See Adding a Language and Development Guide to get started.
License
<p align="center"> <img src="https://github.com/Anselmoo/mcp-zen-of-languages/blob/main/docs/assets/social-card-github.svg?raw=true" alt="Zen garden — sumi-e landscape" width="100%" /> </p>
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。