Lain MCP Server

LAIN builds a map of how all the code in your project connects — what calls what, what depends on what, which files tend to change together. Then it

Local serverstdioPython

What is the Lain MCP Server?

LAIN builds a map of how all the code in your project connects — what calls what, what depends on what, which files tend to change together. Then it lets your AI

The short version

Lain is a persistent code-intelligence MCP server. It builds a queryable knowledge graph of your codebase — symbols and their relationships extracted via LSP and tree-sitter, augmented with git co-change history and optional semantic embeddings — and exposes that graph through MCP tools. The value over LSP-only or RAG-based approaches is cross-file structural reasoning: blast radius for proposed changes, transitive dependency traces, anchor identification, co-change correlation, and contextual build failure decoration so agents can reason about callers rather than just the failing line. Written in Rust, persists

What it needs from you

| Requirement | Details | |-------------|---------| | Rust | 1.75 or newer | | Git | Required for co-change analysis | | ONNX Model | Optional — for semantic search |

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
stdio--transport stdio
both--transport both --port 9999

How to install the Lain MCP Server

{
  "mcpServers": {
    "lain": {
      "command": "/home/you/.local/bin/lain",
      "args": [
        "mcp"
      ]
    }
  }
}

From the project documentation. Replace placeholders and example paths before connecting.

Configuration

| Requirement | Details | |-------------|---------| | Rust | 1.75 or newer | | Git | Required for co-change analysis | | ONNX Model | Optional — for semantic search |

Example prompts to try

  • “Use Lain to Requirement.”
  • “Use Lain to Rust.”
  • “Use Lain to Mode.”

Frequently asked questions

LAIN builds a map of how all the code in your project connects — what calls what, what depends on what, which files tend to change together. Then it lets your AI Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.