Lm logo

Lm

Routes bounded coding and text tasks from MCP clients to OpenAI-compatible models, with file-aware reviews, embeddings, discovery, and stats.

Install Lm

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "lm": {
      "command": "npx",
      "args": [
        "-y",
        "@houtini/lm"
      ],
      "env": {
        "HOUTINI_LM_ENDPOINT_URL": "YOUR_VALUE_HERE",
        "HOUTINI_LM_API_KEY": "YOUR_VALUE_HERE",
        "HOUTINI_LM_MODEL": "YOUR_VALUE_HERE",
        "HOUTINI_LM_SERIALISE": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

  • llm
  • local-models
  • code-review
  • embeddings
  • developer-tools

The lm MCP server lets an MCP client delegate bounded work to an OpenAI-compatible LLM endpoint, including local models, routers, and supported cloud APIs. It exposes tools for general chat, structured prompts, code analysis, file-based code tasks, embeddings, model discovery, model listing, and usage statistics. Use it when a primary AI assistant should offload routine work, obtain a second code review, or avoid placing large source files in its context window. It requires Node 22.5 or newer and communicates with the configured endpoint over its MCP process.

Use cases

  • Delegate routine code reviews to a local or hosted model
  • Review multiple source files without filling the client context window
  • Generate embeddings for a retrieval-augmented generation pipeline
  • Inspect available models and endpoint performance
  • Track delegation usage across sessions

Key features

  • OpenAI-compatible endpoint routing
  • File-aware code analysis
  • Structured custom prompts
  • Text embedding generation
  • Model discovery and metadata
  • Session and lifetime usage statistics

Tools8

What Lm lets your agent do. Expand a tool for its parameters.

Self-reported~501 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 2d ago

Recent health check succeeded.

7/7 checks healthy over the last 40d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 14d ago via OSV.dev · @houtini/lm (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars121Stargazers on the source repository.
npm downloads2.2kPackage downloads in the last 30 days.
Last commit12d agoMost recent push to the default branch.
Tools exposed8Callable tools this server registers over MCP.

How Lm works

What the lm MCP server does

The lm MCP server connects an MCP client to an OpenAI-compatible model endpoint. The endpoint may be a local service such as LM Studio, Ollama, vLLM, SGLang, or llama.cpp, or a compatible hosted service and router such as OpenAI, OpenRouter, LiteLLM, DeepSeek, Groq, or Cerebras. The repository describes a workflow in which the primary assistant handles planning and judgement while another model handles bounded drafting or review tasks.

Typical delegated work includes code reviews, test stubs, documentation, commit messages, format conversion, mock data, type definitions, brainstorming, and embedding generation.

How it works

The client starts the MCP server, which sends requests to the configured OpenAI-compatible endpoint. chat handles general tasks, while custom_prompt accepts separate system, context, and instruction fields. This separation is intended to keep prompt roles distinct when working with local models.

code_task applies a code-oriented prompt and model-specific routing settings. code_task_files reads files from the server's local filesystem and sends their contents directly to the selected model, rather than passing the source through the MCP client's context window. Multiple files are read in parallel, and unreadable files do not prevent other file reads from completing.

The lm MCP server also records session and lifetime delegation data. discover reports the active model, context window, capability profile, connection latency, measured tokens per second, and time to first token after calls have been made. Its latency figure describes the model-list request round trip, not inference speed.

Setup and configuration

Run the package with Node 22.5 or newer and provide an OpenAI-compatible endpoint. A basic Claude Code configuration uses npx -y @houtini/lm; LM Studio on its default local address can work without additional endpoint settings. For a remote or authenticated service, set HOUTINI_LM_ENDPOINT_URL and, when needed, HOUTINI_LM_API_KEY.

Set HOUTINI_LM_MODEL when the endpoint exposes multiple models or when a specific model must be selected. Docker deployment and HTTP serving are documented by the project, but the standard installation example starts the server as an MCP process.

Tools and capabilities

  • chat: Sends a task to the selected model and returns its answer.
  • custom_prompt: Sends separate system, context, and instruction content.
  • code_task: Runs code analysis with code-focused settings.
  • code_task_files: Reviews local files without putting their contents in the client's context window.
  • embed: Requests vectors from the endpoint's /v1/embeddings route and returns vector and usage information.
  • discover and list_models: Report model capabilities, metadata, context limits, and performance information.
  • stats: Returns compact session, lifetime, per-model, and reasoning-token usage data.

The lm MCP server can therefore support both model delegation and basic endpoint inspection, provided the configured service implements the required OpenAI-compatible routes.

Limitations and notes

An embedding model must be available before embed can work. Model-specific support depends on the endpoint and its available models. Delegated tasks still require the primary client to inspect and use the returned result, and the README positions delegation for bounded work rather than every operation. File-based tasks also depend on the MCP server process being able to read the requested paths.

The project reports token savings for several file-review benchmarks, but those figures are workload-specific rather than a guaranteed result. Cloud endpoints may require an API key, while local endpoints can require their own service configuration and a loaded model.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Lm

lm is an MCP server that connects MCP clients to OpenAI-compatible LLM endpoints, including local services, routers, and supported cloud APIs. Its main tools cover general chat, structured prompts, code tasks, file-based code review, embeddings, model discovery, model listing, and delegation statistics.

Install it by running `npx -y @houtini/lm` from an MCP client configuration. The project requires Node 22.5 or newer and an OpenAI-compatible endpoint; LM Studio on its default local address is the documented minimal setup.

Use `HOUTINI_LM_ENDPOINT_URL` for the endpoint, `HOUTINI_LM_API_KEY` for authentication when required, and `HOUTINI_LM_MODEL` to select a model.

Yes, `code_task_files` reads files from disk through the lm process and sends their contents to the selected model without passing the source through the MCP client's context window. It is intended for multiple related files or large individual files.

Yes, the project names Cursor as an MCP client in its usage diagram. Cursor must be configured to start the package and reach the selected OpenAI-compatible endpoint.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewLm AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/lm?style=directory)](https://allmcps.com/mcp/lm)
HTML Embed
<a href="https://allmcps.com/mcp/lm"><img src="https://allmcps.com/api/badge/lm?style=directory" alt="Lm on AllMCPs" /></a>