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
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 coding assistant ask questions about that map. So instead of the AI just. That is what the lain mcp server brings to an AI assistant: the same capability, reachable through the Model Context Protocol rather than a separate app or dashboard.
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
The server publishes 8 tools. What each one is for:
Requirement — DetailsRust — 1.75 or newerMode — Commandstdio — --transport stdioboth — --transport both --port 9999Metric — with_lainHomebrew — The Homebrew tool exposed by this serverSearch — The Search tool exposed by this serverConfiguration is passed through the environment: LAIN_EMBEDDING_MODEL. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.
| Requirement | Details | |-------------|---------| | Rust | 1.75 or newer | | Git | Required for co-change analysis | | ONNX Model | Optional — for semantic search |
Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client.
Among the developer tooling options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Lain's toolset — Requirement, Rust, Mode and 5 more — is a fair guide to whether it matches your workflow. It is maintained by spuentesp; worth a glance at recent repository activity before you build anything load-bearing on it.
This entry was verified against Lain's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.
| Tool | What it does |
|---|---|
| Requirement | Details |
| Rust | 1.75 or newer |
| Mode | Command |
| stdio | --transport stdio |
| both | --transport both --port 9999 |
| Metric | with_lain |
| Homebrew | The Homebrew tool exposed by this server. |
| Search | The Search tool exposed by this server. |
| Requirement | Details | |-------------|---------| | Rust | 1.75 or newer | | Git | Required for co-change analysis | | ONNX Model | Optional — for semantic search |
| Variable | Description | Required |
|---|---|---|
| LAIN_EMBEDDING_MODEL | Configuration value read at startup. | Optional |
Kill hallucinated APIs — version-accurate, up-to-date library documentation injected straight into context.
Microsoft's official browser automation server — drive a real browser through the accessibility tree, no screenshots needed.
GitHub's official server — repos, issues, pull requests, Actions and code security, straight from your assistant.
Issue tracking at the speed of conversation — Linear's official hosted server with OAuth and zero install.
Local repository surgery — status, diffs, commits, branches and history for any repo on disk.
Timezone sanity for AI — current time anywhere and correct conversions, without the model doing date math.