mcpField
O
odoo-lint

odoo-lint

Local
odoo-lint.readthedocs.ioDeveloper Tools0Updated 1d ago

About odoo-lint

odoo-lint is a Rust-native checker for Odoo modules, aimed at Odoo developers and maintainers. It covers multiple module file types and OCA checks, with automatic fixes and an MCP server.

Key features

  1. 01Check Python, manifests, XML, CSV, PO, and JavaScript
  2. 02Match pylint-odoo and OCA checks
  3. 03Apply fixes and preview diffs
  4. 04Flag leftovers from older Odoo versions
  5. 05Provide language-server quick fixes
  6. 06Generate CI output and offer MCP

Use cases

  1. 01Check Odoo modules before submission
  2. 02Fix code and translation issues in bulk
  3. 03Find outdated patterns after an upgrade
  4. 04Have a coding agent lint files after edits

MCP support

odoo-lint includes an MCP server available through `odl mcp`, allowing MCP clients or coding agents to invoke its checking capabilities. The README does not specify the individual MCP tools.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"bosd-odoo-lint": {
"command": "uvx",
"args": [
"odoo-linter"
]
}
}
}
Run commanduvx odoo-linter

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
pypiodoo-linter0.1.0a19

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

odoo-lint logo

odoo-lint

PyPI crates.io Tests OCA parity Documentation License: MIT

Blazing fast Rust-native linter for Odoo modules. The command is called odl.

It checks Python files, manifests, XML and CSV data files, translation (.po) files and JavaScript (OWL components and templates), with the checks of OCA's pylint-odoo, oca-checks-odoo-module and oca-checks-po: same names, same messages, same results on their own test suites. It also warns about files that do not belong in a module, such as packages or database dumps committed by accident.

Bar chart: linting OCA/sale-workflow takes 0.10s with odoo-lint and 25.8s with pylint-odoo

Linting all of OCA/sale-workflow 18.0, as OCA's pre-commit hook runs pylint-odoo. See benchmarks.

  • ⚡ 250x faster than pylint with pylint-odoo, and still 30x faster on a single core
  • ⚖️ Drop-in for pylint-odoo and OCA's pre-commit checks: same codes, names and messages, every check matching on their own test suites (parity), and # pylint: disable= comments keep working
  • 🔧 Automatic fixes, safe and unsafe as in Ruff, for Python, manifests, XML and .po files (odl check --fix, --diff to preview)
  • ⬆️ Upgrade checks: leftovers of older Odoo versions, such as Bootstrap 4 classes that do nothing since Odoo 15.0, with fixes
  • 🌍 Translation checks that predict Odoo's loader: why Odoo logs "malformed po file", and why a translation does not show up
  • 📦 Installable with pip, uv or pipx: one binary in prebuilt wheels for Linux, macOS and Windows, without Python dependencies
  • 🛠️ Configured in pyproject.toml, including company-specific author rules
  • 📋 Output for CI: GitHub annotations, GitLab Code Quality, SARIF and JSON
  • ✍️ In your editor: a language server (odl server) with quick fixes, and extensions for VS Code and Zed
  • 🤖 For AI coding agents: an MCP server, and plugins for Claude Code, DeepSeek Harness and OpenCode that lint every file the agent edits
  • 🪝 Git hooks: pre-commit and hk

Installation

uv tool install odoo-linter   # or: pipx install odoo-linter
cargo install odoo-lint       # from crates.io

The PyPI package is called odoo-linter, because odoo-lint is too similar to an existing PyPI project. On crates.io it is odoo-lint.

Quick start

odl check path/to/addons   # lint a directory
odl rule                   # list all rules
odl rule C8101             # explain a rule
odl check --fix            # apply the safe fixes (--diff to preview)

Rules ported from pylint-odoo keep its codes, names and messages, and # pylint: disable= comments keep working. Company-specific rules are configured in your pyproject.toml:

[tool.odoo-lint]
target-version = "17.0"

[tool.odoo-lint.rules.manifest-required-author.mapping]
"acme_*" = "Acme Corp"

For AI coding agents there is an MCP server (odl mcp) and a post-edit hook, packaged as plugins for Claude Code (/plugin marketplace add bosd/odoo-lint), DeepSeek Harness and OpenCode.

New to odoo-lint? Start with Getting started; coming from OCA's pre-commit hooks, read Migrating from OCA's tooling. See the documentation for all commands, configuration options and rules.

Development

uv sync --all-groups   # builds odl into .venv via maturin
uv run nox             # pre-commit, fmt, clippy, cargo tests, CLI tests, docs

See CONTRIBUTING.md and the development guide.

License

MIT

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.