Lm logo

Lm

Delegate bounded coding, writing, embedding, and analysis tasks from MCP clients to local or OpenAI-compatible models.

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.

Automated check passed— started and listed 8 tools correctly ().

Overview

lm MCP server routes bounded tasks from Claude and other MCP clients to a local model or any configured OpenAI-compatible endpoint. Its tools cover general chat, structured prompts, code review, direct file-based review, model discovery, embeddings, and usage statistics. Use it for self-contained work such as boilerplate, tests, summaries, and code review when preserving the main model's context or quota matters. Local inference can be substantially slower than frontier models, and delegated prompts must include the context the model needs.

Use cases

  • Generate boilerplate, tests, types, and mock data
  • Review related source files without expanding the client context
  • Summarize or reformat code and documentation
  • Create commit messages and pull request descriptions
  • Generate embeddings for semantic search or RAG

Key features

  • Routes tasks across local and OpenAI-compatible models
  • Reviews complete files directly from disk
  • Provides structured prompts and code-focused generation
  • Discovers models and reports context and latency data
  • Generates embeddings through an OpenAI-compatible endpoint
  • Tracks session and lifetime offloaded-token statistics

Tools8

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

Verified live~3.7k 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

Recent health check succeeded.

20/20 checks healthy over the last 66d

What it can do

From the 8 tools this server returned when we ran it.

Can delete or modify data · 1Handles credentials · 4Makes network requests · 1Read-only tools · 7
Network at startup3 connections
Files written at startup3
Install scriptsNone
npm provenanceNot published
Package age433 days
Maintainers1

Observed 2026-11-12 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

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

Adoption & maintenance

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

GitHub stars122Stargazers on the source repository.
npm downloads1.5kPackage downloads in the last 30 days.
Last commit10d agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed8Callable tools this server registers over MCP.
Directory activity7 viewsConfig copies, upvotes, and views on AllMCPs.

How Lm works

What lm does

lm connects an MCP client to a local LLM or another OpenAI-compatible endpoint. Supported deployment patterns include LM Studio, Ollama, vLLM, SGLang, llama.cpp, LiteLLM routers, OpenRouter, OpenAI, DeepSeek, Groq, Cerebras, and similar compatible services. The main use case is handing off bounded work while the primary AI platform retains responsibility for planning, tool use, and review.

Delegated requests do not use the user's Claude quota. A local endpoint can also keep source code on the user's hardware. Cloud endpoints remain available when local inference is unavailable or a different model is preferred.

How it works

Install the package as an MCP server and configure the endpoint URL when the default is not suitable. The server discovers available models, routes requests to a loaded model, and records model timings and usage statistics in a SQLite cache at ~/.houtini-lm/model-cache.db.

chat handles self-contained prompts. custom_prompt separates a short system role, complete context, and an explicit instruction, which helps prevent context and instruction mixing in smaller models. code_task applies a code-oriented review prompt and uses low temperature for more deterministic output. code_task_files reads absolute file paths in parallel, adds filename headers, and sends the collected content through the same code pipeline without placing the source in the MCP client's context window.

The file-based tool reports individual read failures and estimates prompt-processing time before sending a request. Calls that are likely to exceed the MCP client's roughly 60-second request timeout are refused early. discover reports availability, the loaded model, context size, latency, and session totals; list_models describes loaded and downloaded models; stats shows session and lifetime usage; and embed calls the endpoint's OpenAI-compatible embeddings API.

Setup and configuration

Node.js 22.5 or newer is required. With LM Studio on its default local address, Claude Code can register the server with:

Terminal
claude mcp add houtini-lm -- npx -y @houtini/lm

For another endpoint, set HOUTINI_LM_ENDPOINT_URL. Endpoints requiring authentication can use HOUTINI_LM_API_KEY, and HOUTINI_LM_MODEL can pin a model. HOUTINI_LM_SERIALISE=0 is available in configurations where serialized requests should be disabled.

An OpenAI-compatible endpoint is required. An embedding model must be loaded before using embed. For file reviews, provide absolute paths. Complete source, imports, type definitions, output formats, and explicit constraints generally produce better results; avoid small max_tokens limits because reasoning can consume the available budget before visible output.

Tools and capabilities

  • chat: Send a bounded task to the routed model.
  • custom_prompt: Provide separate system, context, and instruction fields.
  • code_task: Review or transform supplied source with a code-focused prompt.
  • code_task_files: Review one or more files directly from disk.
  • discover: Check endpoint availability and inspect the loaded model.
  • list_models: View model types, architectures, quantization, context windows, and capability profiles.
  • embed: Generate vectors for semantic search, similarity comparison, or RAG pipelines.
  • stats: Display session and lifetime token, call, and per-model performance data.

Limitations and notes

Local inference is commonly 3–30 times slower than frontier-model inference, so short tasks may take longer than answering directly. The delegated model cannot read files unless code_task_files is used or the relevant content is included in the prompt. File-review inputs should stay below roughly 8,000 tokens on hardware generating under 25 tokens per second; the estimator adapts after measured calls are cached.

Model quality varies, so generated code and review findings should be checked for compilation, edge cases, and project conventions before use. embed depends on an available embedding model, and code_task_files rejects relative paths.

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 Claude and other MCP clients to local LLMs or OpenAI-compatible endpoints. Its main tools handle chat, structured prompts, code tasks, file-based code review, model discovery, embeddings, and usage statistics. It delegates bounded work while the primary model handles planning and tool use.

Install it with `npx -y @houtini/lm` through your MCP client's server configuration. Claude Code can use `claude mcp add houtini-lm -- npx -y @houtini/lm`; set the endpoint URL and API key when the service is not the default local LM Studio address.

lm works with OpenAI-compatible endpoints, including LM Studio, Ollama, vLLM, SGLang, llama.cpp, LiteLLM, OpenRouter, OpenAI, DeepSeek, Groq, and Cerebras. Configure a non-default service with `HOUTINI_LM_ENDPOINT_URL` and authenticate with `HOUTINI_LM_API_KEY` when required.

Yes, `code_task_files` reads files from disk within the lm process and sends their contents to the selected model. Use absolute paths; files are read in parallel, failures are reported inline, and an early size estimate can reject requests likely to exceed the client timeout.

Yes, lm can be used with Cursor because it exposes a standard MCP server over stdio. Configure the package and endpoint in Cursor's MCP settings, then use its tools to delegate bounded tasks.

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>