# lm

This MCP server routes selected coding tasks to a local or hosted model through an OpenAI-compatible endpoint. Use it for reviews, drafts, and bounded background work.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 121
- Author: houtini-ai
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/houtini-ai/houtini-lm
- Updated: 2026-10-10
- HTML: https://affpapa.org/en/nevibecode/mcp/lm

## What it does

\`lm` gives Claude Code and other MCP clients a path to local models, OpenAI, LiteLLM, OpenRouter, or another endpoint that follows the OpenAI API shape. The main agent can keep planning and tool use while the server sends a chosen task elsewhere. When `code_task_files` is used, the `houtini-lm` process reads the files and returns the other model’s result without placing those files in the main agent’s context.

Typical delegated jobs include code review, test scaffolding, docstrings, commit messages, format conversion, and regex checks. Configuration uses `HOUTINI_LM_ENDPOINT_URL`, `HOUTINI_LM_API_KEY`, `HOUTINI_LM_MODEL`, and `HOUTINI_LM_PROVIDER`, with the server started by `npx -y @houtini/lm`. Local inference can take 3-30 times longer than a frontier model, so the setup fits contained jobs better than every turn of a coding session.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `HOUTINI_LM_ENDPOINT_URL`, `HOUTINI_LM_API_KEY`, `HOUTINI_LM_MODEL`, `HOUTINI_LM_PROVIDER` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env HOUTINI_LM_ENDPOINT_URL=<HOUTINI_LM_ENDPOINT_URL> --env HOUTINI_LM_API_KEY=<HOUTINI_LM_API_KEY> --env HOUTINI_LM_MODEL=<HOUTINI_LM_MODEL> --env HOUTINI_LM_PROVIDER=<HOUTINI_LM_PROVIDER> --transport stdio lm -- npx -y @houtini/lm
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add lm --env HOUTINI_LM_ENDPOINT_URL=<HOUTINI_LM_ENDPOINT_URL> --env HOUTINI_LM_API_KEY=<HOUTINI_LM_API_KEY> --env HOUTINI_LM_MODEL=<HOUTINI_LM_MODEL> --env HOUTINI_LM_PROVIDER=<HOUTINI_LM_PROVIDER> -- npx -y @houtini/lm
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "lm": {
            "command": "npx",
            "args": [
                "-y",
                "@houtini/lm"
            ],
            "env": {
                "HOUTINI_LM_ENDPOINT_URL": "<HOUTINI_LM_ENDPOINT_URL>",
                "HOUTINI_LM_API_KEY": "<HOUTINI_LM_API_KEY>",
                "HOUTINI_LM_MODEL": "<HOUTINI_LM_MODEL>",
                "HOUTINI_LM_PROVIDER": "<HOUTINI_LM_PROVIDER>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "lm": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@houtini/lm"
            ],
            "env": {
                "HOUTINI_LM_ENDPOINT_URL": "<HOUTINI_LM_ENDPOINT_URL>",
                "HOUTINI_LM_API_KEY": "<HOUTINI_LM_API_KEY>",
                "HOUTINI_LM_MODEL": "<HOUTINI_LM_MODEL>",
                "HOUTINI_LM_PROVIDER": "<HOUTINI_LM_PROVIDER>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e HOUTINI_LM_ENDPOINT_URL=<HOUTINI_LM_ENDPOINT_URL> -e HOUTINI_LM_API_KEY=<HOUTINI_LM_API_KEY> -e HOUTINI_LM_MODEL=<HOUTINI_LM_MODEL> -e HOUTINI_LM_PROVIDER=<HOUTINI_LM_PROVIDER> lm npx -y @houtini/lm
```
Replace <…> with your own values

## When to use it
- send selected files to a second model for review
- draft test stubs and type definitions
- prepare commit messages or changelog text
- convert content between formats
- sanity-check a regular expression

## Example prompts
- Send `src/auth.ts` and `src/session.ts` to the MCP server for a code review, then list the issues found.
- Ask the delegated model to draft tests for `src/parser.ts` and show me the result.
- Have the other model inspect this regular expression and explain the edge cases it finds.

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
