# Legesher

> Legesher is an open-source MCP server for developer tools. Translate Python between English keywords and your own language, verified by round trip. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, self-hosted
- **Website:** https://legesher.io
- **Repository:** https://github.com/legesher/legesher/tree/HEAD/libs/mcp
- **MCP Registry name:** io.github.legesher/legesher-mcp
- **Categories:** developer tools, AI models and LLM tooling
- **Listing updated:** 2026-11-14

## About

Legesher's server lets an assistant move Python source between its English keywords and a natural language, so learners can read and write code in the words they think in while the program still runs the same. Translation between two non-English languages pivots through English, and the result says so with `pivoted: true`.

It runs locally against the installed Legesher engine, which ships its language packs in `legesher-i18n`. No account is needed and calls are served on your machine. Validation is static only: code is compiled but never executed, and error results carry a machine code with no stack traces or file paths.

Beyond translation it offers a legibility report for whole codebases, identifier glossary validation, and resources and prompts for explaining code in a given language. The README describes using the server as free forever under Apache-2.0.

## Features

- **Two-way translation:** Convert Python to a native language and back to English-keyword source.
- **Explain in a language:** Returns keyword mappings and static validation so the model can explain code in your language.
- **Keyword lookup:** Look up how specific terms render in a chosen language.
- **Codebase legibility report:** Shows per-file coverage and unmapped constructs for translating a set of files.
- **Identifier validation:** Flags drift, collisions, reserved names and unsafe text in proposed translations.
- **Static checks only:** Code is parsed with compile() and never executed.

## Good for

- Teach programming in a student's first language
- Translate a script so a colleague can read it
- Estimate the effort to localize an existing codebase
- Keep a consistent glossary of translated identifiers

## Install

### Claude Code (Terminal)

```sh
claude mcp add legesher-mcp -- uvx legesher-mcp
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "legesher-mcp": {
      "command": "uvx",
      "args": [
        "legesher-mcp"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "legesher-mcp": {
      "command": "uvx",
      "args": [
        "legesher-mcp"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "legesher-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "legesher-mcp"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "legesher-mcp": {
      "command": "uvx",
      "args": [
        "legesher-mcp"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "legesher-mcp": {
      "command": "uvx",
      "args": [
        "legesher-mcp"
      ]
    }
  }
}
```

## Tools

- `translate_to_native`: Translates Python source into a natural language, files or fragments.
- `translate_to_source`: Translates native-language code back to English-keyword Python.
- `explain_in_language`: Returns keyword mappings and a validation result so an assistant can explain code in a language.
- `lookup_keyword_mapping`: Looks up how terms or the full mapping render in a language.
- `map_existing_codebase`: Produces a legibility report for translating a set of files.
- `validate_identifier_translations`: Checks proposed identifier translations for conflicts and returns the clean subset.

## FAQ

### How do I install it?

Run `uvx legesher-mcp`, or `pip install` the package named legesher-mcp.

### Does it execute my code?

No. Validation uses compile() only.

### Is an account required?

Not for the local server; some capabilities need an account on the hosted instance.

### What licence?

Apache-2.0.

### Is Legesher free?

Yes. Legesher is open source, so you can use and self-host it for free.

### How do I add Legesher to Claude Code?

Run this command in your terminal: claude mcp add legesher-mcp -- uvx legesher-mcp

### What are the best alternatives to Legesher?

The closest alternatives to Legesher are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Concord MCP](https://ai-powered.com/mcp/concord-mcp): Concord MCP is a freemium MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/legesher
