Lain
Code graph of callers, dependencies and Git co-changes for coding agents
- Pricing
- Open source
- Platforms
- CLI, self-hosted, macOS
- Runs
- Locally
- Version
- 0.10.0
- Listing updated
- today
Similar MCP servers
About Lain
Lain is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.
Before an agent edits a function, Lain lets it ask what depends on that function and how the rest of the code reaches it, answering with symbol names and source paths from a local on-disk index. The index follows commits rather than uncommitted edits, a re-index pass brings it up to date, and answers that may miss recent work say so.
Parsers for Rust, Python, TypeScript, JavaScript, Go, Java, C, C++, C#, Ruby, Swift, Kotlin, Scala and PHP, plus Vue and Svelte script blocks, are built into the binary, and optional language servers add precision. Dynamic dispatch is handled openly: static analysis cannot prove calls through message buses or injection containers, so an explain tool combines static callers with convention matches, runtime traces and Git co-change evidence and returns insufficient evidence rather than declaring an edit safe.
Federation covers several repositories and organisation-wide search, with a local web dashboard on port 9999 by default, bound to localhost unless configured otherwise. Intents, presence and advisory file claims discourage several agents from editing the same code. One setup command registers it with Claude Code, Codex, Cursor, VS Code or Continue, and semantic search is optional.
Install
Run in a terminal
claude mcp add lain -- npx -y @spuentesp/lain-mcpAdd to claude_desktop_config.json
{
"mcpServers": {
"lain": {
"command": "npx",
"args": [
"-y",
"@spuentesp/lain-mcp"
]
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"lain": {
"command": "npx",
"args": [
"-y",
"@spuentesp/lain-mcp"
]
}
}
}Add to .vscode/mcp.json
{
"servers": {
"lain": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@spuentesp/lain-mcp"
]
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"lain": {
"command": "npx",
"args": [
"-y",
"@spuentesp/lain-mcp"
]
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"lain": {
"command": "npx",
"args": [
"-y",
"@spuentesp/lain-mcp"
]
}
}
}Using several servers? Build one config file with the MCP config generator.
Tools this server provides (10)
Taken from the project documentation; the running server may differ.
- get_blast_radius
- Shows what depends on a symbol
- assess_change
- Assesses the impact of a change
- get_call_chain
- Traces the call chain between two functions
- find_anchors
- Finds architectural anchors
- list_entry_points
- Lists entry points
- find_symbol
- Finds a symbol by name
- search_code
- Searches code by name or meaning
- get_cross_repo_blast_radius
- Blast radius across repositories
- search_org
- Searches across an organisation
- explain_dispatch
- Explains dynamic dispatch using several evidence types
What it does
- Blast radius
- Shows what breaks if a symbol changes.
- Call chains
- Traces how two functions connect.
- Git co-change data
- Finds files that usually change together.
- 14 built-in languages
- Parses common languages with no extra install.
- Multi-repo federation
- Searches and traces across several repositories.
- Agent coordination
- Intents, presence and advisory claims reduce edit collisions.
- Honest uncertainty
- Reports insufficient evidence instead of guessing for dynamic calls.
Good for
- Check what depends on a function before changing it
- Trace how an entry point reaches a helper
- Find which files usually change with a given file
- See if another agent is editing the same code
- Search across an organisation's repositories
Pricing
Open source
Lain FAQ
Does it need an embedding model?
No. Graph queries work without one; semantic search is optional.
Does it see uncommitted edits?
No. It follows commits, and a re-index brings it current.
Which clients can it configure?
Claude Code, Codex, Cursor, VS Code and Continue through the setup command, or any host through a generic config.
Where does the index live?
On disk in the repository, in a .lain folder.
Is Lain free?
Yes. Lain is open source, so you can use and self-host it for free.
How do I add Lain to Claude Code?
Run this command in your terminal: claude mcp add lain -- npx -y @spuentesp/lain-mcp
What are the best alternatives to Lain?
The closest alternatives to Lain are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.
Where this comes from
- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.


