High-performance knowledge graph MCP server for AI coding agents with semantic search.
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"io-github-spuentesp-lain": {
"command": "<see-readme>",
"args": []
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
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 looking at one file and guessing, it can ask "if I change this function, what else breaks?" and get a real answer. It plugs into any AI agent that supports MCP and runs in the background while you work.
No automated test available for this server. Check the GitHub README for setup instructions.
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
No package registry to scan.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in search
Web and local search using Brave Search API
Production ready MCP server with real-time search, extract, map & crawl.
mini cli search engine for your docs, knowledge bases, meeting notes, whatever. Tracking current sota approaches while being all local
MCP server for Firecrawl — search, scrape, and interact with the web. Supports both cloud and self-hosted instances. Features include web search, scraping, page interaction, batch processing, and LLM-powered content analysis.
MCP Security Weekly
Get CVE alerts and security updates for io.github.spuentesp/lain and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
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 looking at one file and guessing, it can ask "if I change this function, what else breaks?" and get a real answer. It plugs into any AI agent that supports MCP and runs in the background while you work.
# One-line install (interactive - will ask you to configure and add to PATH)
curl -fsSL https://raw.githubusercontent.com/spuentesp/lain/main/install.sh | bash
# After install: reload your shell (or open a new terminal)
source ~/.zshrc # or ~/.bashrc
# Or non-interactive (skips prompts, auto-adds to PATH)
curl -fsSL https://raw.githubusercontent.com/spuentesp/lain/main/install.sh | \
bash /dev/stdin --workspace . --transport both --yes
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 across sessions, stays fresh during editing via a file watcher that updates a volatile overlay layered on top of the static graph.
curl -fsSL https://raw.githubusercontent.com/spuentesp/lain/main/install.sh | bash
The installer will ask you to configure:
After you confirm your settings, it will:
~/.local/lainlain init with your configurationNon-interactive install (with options):
# Install with specific workspace and download ONNX model for semantic search
curl -fsSL https://raw.githubusercontent.com/spuentesp/lain/main/install.sh | \
bash /dev/stdin --workspace . --transport both --download-model --yes
# Install for specific agent
curl -fsSL https://raw.githubusercontent.com/spuentesp/lain/main/install.sh | \
bash /dev/stdin --agent cursor --yes
# See all options
curl -fsSL https://raw.githubusercontent.com/spuentesp/lain/main/install.sh | \
bash /dev/stdin --help
Install options:
| Option | Description | Default |
|---|---|---|
--workspace PATH | Workspace path for LAIN | . |
--transport MODE | MCP transport: stdio, http, both | stdio |
--port PORT | HTTP port for MCP server | 9999 |
--agent AGENT | Target agent: auto, claude, cursor, windsurf, cline | auto |
--embedding-model PATH | Path to ONNX embedding model | - |
--download-model | Download default ONNX model (all-MiniLM-L6-v2.onnx, ~120MB) | - |
-y, --yes | Skip all confirmation prompts | - |
After installation:
# Reload your shell (the installer adds to ~/.zshrc or ~/.bashrc automatically)
source ~/.zshrc # or ~/.bashrc, then open a new terminal
# Verify installation
lain --version
# Query the graph
lain query "find Function | limit 5"
brew tap spuentesp/lain https://github.com/spuentesp/lain
brew install lain
# Initiali
... [View full README on GitHub](https://github.com/spuentesp/lain#readme)