Listed from the MCP registry; nobody on Odel publishes it.
Translate Python between English keywords and your language, with round-trip verification.
Runs on your machine from its package; the steps are below.
At most: moves money, runs code or commands, deletes data, or sends messages for you.
Odel charges nothing per call. The publisher may charge for its own service.
Runs locally over stdio
This server isn't hosted — your MCP client launches it from a package registry. Use one of the commands below, or drop the config into your client (e.g. Claude Desktop).
Run
uvx legesher-mcp
MCP client config
{
"mcpServers": {
"legesher": {
"command": "uvx",
"args": [
"legesher-mcp"
]
}
}
}Code in Your Native Language - Programming tools that break down the English language barrier
Every package in this repository is Apache-2.0; see Licensing.
Legesher (pronounced "le-GESH-er") enables developers to write code in their native language instead of English.
Imagine writing Python using Spanish keywords like definir instead of def, or Arabic keywords translated the
same way any other language is, with the VS Code translation panel applying right-to-left text direction and
alignment - all while collaborating seamlessly with developers who code in English.
The Problem: Programming languages require English keywords, creating a barrier for the 82% of the world's population who don't speak English as their first language. Developers must learn English first before they can code.
The Solution: Legesher translates your code in real-time:
legesher translate or, for English files, the editor's Translation Panel, never from a rewrite of the stored
file.--full LLM translation calls a model, and it can point at one you host yourself.Pre-beta. Every package here is pre-1.0. For the version a package is on right now, read its
pyproject.toml (or package.json for the VS Code extension); for what changed last, read
CHANGELOG.md.
treesitter extra. Both produce identical outputEverything in this repository is Apache License 2.0 — the CLI, the translation engine, the language data, the language server, the MCP server, and the editor integrations:
Use them, modify them, redistribute them — including commercially. Community contributions welcome!
Legesher rewrites your source code and installs a git filter, so being able to read exactly what it does before you run it is the point, not a courtesy.
Legesher is open-core: the paid capabilities live in separate, closed-source codebases, where access is gated by account and API key rather than by a license here. Nothing in this repository requires an account or a network call to work.
See LICENSING.md for the per-package breakdown, or the LICENSE file for the Apache 2.0 terms.
# Clone the repository
git clone https://github.com/legesher/legesher.git
cd legesher
# Install dependencies with uv (recommended)
uv sync --all-extras
# Or with pip
pip install -e libs/core -e libs/i18n -e libs/legesher
# Create a Python file in Spanish
echo 'definir saludar():
imprimir("¡Hola, mundo!")
saludar()' > hola.py
# Translate to English. --from defaults to en, so name the source language
uv run legesher translate hola.py --from es --to en --output hello.py
# Check the result
cat hello.py
# Output:
# def saludar():
# print("¡Hola, mundo!")
#
# saludar()
Keyword translation renames keywords and builtins only. Your own identifiers, such as saludar, stay exactly as
you wrote them. Use --full for LLM-powered translation of identifiers, comments, and strings.
# Initialize Legesher in your repo
uv run legesher git setup --language es
# Git stores each file in its author's language:
# - git add: an English keyword typed into your Spanish file is stored in Spanish
# - git commit: the pre-commit hook runs `legesher guard` on what you staged
The Legesher VS Code extension is available in pre-beta:
Install the extension from the VS Code Marketplace:
code --install-extension legesher.legesher-vscode.vsix instead, download it from the latest vscode-v release on the
releases page, then Extensions → ... menu →
Install from VSIX...Install the language server (hover, completion, diagnostics and keyword highlighting):
pipx install legesher-language-server
# or
uv tool install legesher-language-server
If the installer warns that its bin directory is not on your PATH, run pipx ensurepath or
uv tool update-shell, then restart VS Code. legesher-lsp has to be on the PATH VS Code sees, or the
legesher.serverCommand setting has to hold its full path.
Features included:
See libs/vs-code/README.md for full documentation.
match/case, except*,
and typetreesitter extra)libs/mcp/tests/test_roundtrip_sweep.py, so a fix announces itselfSee legesher-core for details.
See legesher-i18n for details.
git add: a stray keyword in another language is rewritten to the file's stored
language by the clean filter, which never refuses a filelegesher translate renders a copy with keywords, builtins and exceptions in the reader's language (through
English between two non-English languages), leaving names, comments and strings as written; the opt-in
keyword-only smudge renders an English file's keywords for terminal editorsSee legesher-core for git filter documentation.
Three forms of one program
calcular_total is
canonical in a Spanish file, and os.open is canonical because that is what the authors of os wrote. Git
stores this form.legesher translate
produces one as a copy; for a file stored in English, the editor's Translation Panel shows a preview-quality one.
Neither rewrites the stored file. The opt-in keyword-only smudge is the one rendering that replaces a file's
working-tree copy, for English files only, and only when the result cleans back to what git stores.legesher run
and the import hook produce it at run time; it never replaces the stored file. The import hook caches it, compiled
and with its English source text, beside stock bytecode (__pycache__/<module>.<tag>.legesher-<lang>.pyc).See legesher-language-server for LSP documentation.
legesher init: Initialize Legesher in a projectlegesher translate: Translate files or directories (keywords only, or --full for LLM-powered full translation)legesher run: Run translated Python files directlylegesher git setup / legesher git status: Configure git integration and inspect itlegesher guard: Refuse Trojan Source characters and keywords out of their stored form (runs on commit)legesher-filter: Git filter (--process, --clean, and the opt-in --smudge), run by git, not by handlegesher metadata: View translation history (show, history, list, raw, validate)legesher config: Read and write project or user configuration (list, get, set)legesher-i18n validate: Validate a language pack filelegesher-i18n registry list: List the shipped packs with their term countslegesher-i18n export: Export packs to JSON or CSV (json, csv, all)See legesher for CLI documentation.
Legesher uses a hybrid versioning approach with Semantic Versioning:
These packages are released together with the same version:
legesher-core - Core translation enginelegesher-i18n - Language pack infrastructurelegesher - Main CLI packageThey share one version number, set in each package's pyproject.toml and bumped together by
release-foundation.yml.
These packages each carry their own version number, independent of the foundation suite. Three of them have a release workflow; the fourth is versioned by hand and has no automated release yet:
legesher-vscode - VS Code extension (libs/vs-code/package.json), released by release-apps.ymllegesher-mcp - MCP server, tagged mcp-v{version} by release-mcp.yml, and a
publish-pypi.yml targetlegesher-language-server - LSP server, tagged language-server-v{version} by
release-language-server.yml, and a publish-pypi.yml targetlegesher-runtime - Localized tracebacks, required by the legesher CLI. No release workflow;
a publish-pypi.yml targetThis lets the apps iterate without waiting on the foundation.
56 language packs are released independently, allowing each language community to iterate at their own pace:
legesher-i18n-python-{lang} v0.0.x - Translations for PythonEach pack supports Python 3.10-3.14 with version-aware inheritance. All packs currently have experimental status, awaiting community validation before being marked as accepted.
For release documentation, see .github/RELEASE_CHECKLIST.md.
We welcome contributions! Every package in this repository is Apache-2.0 and accepts them. Please see CONTRIBUTING.md for: