Installation¶
emend wheels include the compiled emend_core Rust extension — there is no
separate binary package to install.
Using uv with free-threaded Python (recommended)¶
uv tool install --python 3.13t emend
Python 3.13+ ships a free-threaded variant (3.13t, 3.14t) that removes
the Global Interpreter Lock (GIL). emend’s Rust core is already GIL-free, so on a
free-threaded interpreter it can parallelize file I/O and pattern-matching with no
lock contention — giving substantially faster results on multi-file operations like
find, lint, analyze refs, and edit rename across large codebases.
We recommend 3.13t for the free-threaded interpreter. The 3.14t variant also
works for core emend commands, but the optional MCP server (emend mcp) depends on
Pydantic which does not yet support Python 3.14t (as of February 28, 2026):
uv tool install --python 3.13t emend # free-threaded 3.13 (recommended)
uv tool install --python 3.14t emend # free-threaded 3.14 (no MCP server support)
Using uv (standard Python)¶
uv tool install emend
Using pip¶
pip install emend
MCP server¶
To use emend as an MCP server for LLM-based
clients, install the optional mcp extra:
pip install emend[mcp]
Then start the server:
emend mcp # stdio transport (default)
emend mcp --transport sse --port 8080 # SSE transport
Note
The MCP server requires Pydantic, which does not support Python 3.14t as of February 28, 2026. Use Python 3.10–3.13 (including 3.13t) for MCP server mode.
Adding emend to Claude Code¶
The quickest way to connect emend to
Claude Code is the claude mcp add CLI:
# Add for the current project (default scope: local)
claude mcp add --transport stdio emend -- emend mcp
# Or share with your team via .mcp.json (project scope)
claude mcp add --transport stdio --scope project emend -- emend mcp
If you installed with uv tool install, make sure the emend binary is on
your PATH, or use uvx:
claude mcp add --transport stdio emend -- uvx emend mcp
You can also configure it by editing JSON directly:
claude mcp add-json emend '{"type":"stdio","command":"emend","args":["mcp"]}'
For a team-shared setup, add a .mcp.json file to your project root
(and commit it to version control):
{
"mcpServers": {
"emend": {
"type": "stdio",
"command": "emend",
"args": ["mcp"]
}
}
}
Verify the server is connected:
claude mcp list # from the terminal
Or inside Claude Code, type /mcp to see all connected servers and their
status.
Scopes. Claude Code has three MCP configuration scopes:
local(default) – private to you, current project only (stored in~/.claude.json)project– shared with the team via.mcp.jsonin the project root (committed to version control)user– available to you across all projects (stored in~/.claude.json)
Use --scope with claude mcp add to choose. See the
Claude Code MCP documentation for
full details on scopes, environment variables, and managed configurations.
Vim / Neovim plugin¶
emend ships with a Vim/Neovim plugin for interactive code search. It
communicates with emend tool editor-server via JSON-RPC over stdio pipes,
keeping the server warm for sub-5ms symbol lookups.
Install with vim-plug:
Plug 'lucaswiman/emend', { 'rtp': 'vim' }
Or for local development, point to your checkout:
Plug '~/src/emend', { 'rtp': 'vim' }
let g:emend_command = '~/src/emend/.venv/bin/emend'
After installing, use :Emend to open the search prompt. See
vim/README.md and :help emend for full documentation.
Verifying installation¶
emend --help
Dependencies¶
emend uses the bundled emend_core Rust extension (built on tree-sitter) as its AST backend — all parsing, traversal, scope analysis, pattern matching, and transformation go through tree-sitter and Rust. The extension is GIL-free and optimized for parallel file scanning on free-threaded Python.
Runtime dependencies (all installed automatically):
Typer – CLI framework
Lark – Grammar-based parsing for selectors and patterns
PyYAML – YAML parsing for batch operations and lint rules
The emend_core extension (tree-sitter, rayon, PyO3) is compiled into the wheel
and requires no separate installation.
Installing from source¶
Requires a Rust toolchain (rustup) and maturin.
git clone https://github.com/lucaswiman/emend
cd emend
# Create a free-threaded venv, compile the Rust extension, install dev deps
make venv
Or manually:
uv venv .venv --python 3.13t
uv pip install maturin
.venv/bin/maturin develop -E dev