Semlith — Claude Code MCP server: what it does, how to install
Local hybrid search across codebases and documents for AI assistants. Pinpoints relevant code spans without shipping source files to cloud APIs.
Open on GitHubWhat Semlith does
Semlith runs local hybrid retrieval across your repositories by pairing vector embeddings with keyword lookups. In the same run, it maps out a code graph that traces symbol definitions and call hierarchies. An agent gets direct access to exact spans instead of guessing file paths or loading full files into context.
The MCP server registers eight default tools and sixteen in total. A file watcher detects edits on save and refreshes embeddings on the fly. Beyond source code, the tool reads Markdown, PDFs, and office documents.
Everything stays on your machine. The web portal binds strictly to 127.0.0.1, and initial setup fetches an embedding model package of around 52 MB. Apple silicon is required on macOS; Intel machines fail to run the binary due to dropped ONNX Runtime builds. Linux builds require glibc 2.34 or higher.
What it helps with
- inspect function caller relationships and symbol connections via a code graph
- run hybrid semantic and keyword queries across a large repository
- extract searchable context from PDFs, Office docs, and Markdown files
- keep the retrieval index synchronized on save without manual rebuilding
Example prompts for the agent
- Find where
search_parallelis invoked and show its neighboring callers. - Search local documentation and source files for retry backoff handling.
- Check what calls
process_queueand what might break if its arguments change.
How to install Semlith
Install
The MCP registry has no launch command for it: see the repository README
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Semlith
How do I install Semlith for Claude Code?
Run curl --proto '=https' --tlsv1.2 -fsSL https://raw.githubusercontent.com/semlith/semlith/main/install.sh | sh in your terminal. The script unpacks the binary and runs semlith setup to register with supported agent environments.
What is Semlith used for?
It provides local code retrieval and dependency graph queries over MCP. The agent fetches specific matching lines rather than ingesting entire directories, reducing token usage.
Does Semlith require an internet connection?
No external network calls happen during queries, and no API keys are required. The network is used once to download the ~52 MB model weights, and the --airgap flag stops all outbound traffic.