KARP Inspector MCP Server
Local semantic codebase search for Claude Desktop. Combines vector search, grep, file outlines, and diffs with zero API keys.
KARP Inspector Lite is a Claude Desktop extension and MCP server that gives Claude the ability to search a codebase by meaning rather than filename or exact keyword. Ask "find the login logic" and the server returns the matching functions with file paths and line numbers. It runs entirely on the local machine using a bundled embedding model (~130MB, auto-downloaded on first use), so source code never leaves the device and no API keys are required.
Beyond semantic search, the server exposes a complete code inspection toolkit: regex/grep search, structural file outlines (classes, methods, functions with line numbers), project indexing and re-indexing, file snapshot history, and version diffs. A set_project tool lets a single server switch between multiple codebases without restarting Claude Desktop.
The project is community-built by souldriver007 and ships as either a one-click .mcpb extension installable via Claude Desktop Settings or as a standard MCP server configurable via claude_desktop_config.json. Supported file types out of the box include Python, JavaScript, TypeScript, HTML, CSS, Markdown, and plain text, with additional extensions configurable via an env var.
Tools
| Tool | Description |
|---|---|
search_code |
Semantic search across the indexed codebase by conceptual meaning, returning matching functions with file paths and line numbers. |
grep_code |
Exact string or regex pattern matching across the project. |
file_outline |
Structural overview of a file showing classes, methods, and functions with line numbers. |
index_project |
Performs initial indexing or full re-indexing of the configured project. |
reindex_file |
Updates the index for a single edited file without rebuilding the entire index. |
file_history |
Lists saved file snapshots with timestamps. |
file_diff |
Compares two file versions or snapshots and returns the diff. |
project_stats |
Returns index statistics and coverage information for the current project. |
set_project |
Switches the active project directory the server operates against. |
Prerequisites
- Claude Desktop (Windows or macOS), which bundles Node.js
- ~130MB free disk space for the embedding model (downloads automatically on first use)
- No API keys, Python, Docker, or external services required
Option A: One-click install (recommended)
- Download
karp-inspector-lite.mcpbfrom the GitHub Releases page. - Open Claude Desktop, go to Settings, Extensions, Install Extension.
- Select the
.mcpbfile and choose the project folder to index.
Option B: Manual config (Claude Desktop)
Edit claude_desktop_config.json:
{
"mcpServers": {
"karp-inspector": {
"command": "node",
"args": ["C:/path/to/Karp_Inspector_Lite/server/index.js"],
"env": {
"PROJECT_PATH": "C:/path/to/your/project"
}
}
}
}
Option C: Claude Code CLI
claude mcp add karp-inspector -- node /path/to/server/index.js
Or commit a .mcp.json to the project root:
{
"mcpServers": {
"karp-inspector": {
"command": "node",
"args": ["/path/to/Karp_Inspector_Lite/server/index.js"],
"env": { "PROJECT_PATH": "." }
}
}
}
Environment variables
PROJECT_PATH(required): absolute or relative path to the codebase to index.EXTRA_EXTENSIONS(optional): additional file extensions to index beyond the built-in set (Python, JavaScript, TypeScript, HTML, CSS, Markdown, plain text).
First-run indexing of a typical codebase takes around 60 seconds. Subsequent restarts load cached indexes in under 0.1 seconds.
- Ask Claude to "find the login logic" or "where is rate limiting implemented" and get exact functions with file paths and line numbers, even when filenames give no hint.
- Onboard to an unfamiliar codebase by generating structural outlines of files with
file_outlineand asking semantic questions about responsibilities. - Combine
grep_codefor exact matches (config keys, env var names, error strings) withsearch_codefor conceptual matches in the same agent session. - Track local edits with
file_historyandfile_diffto review what changed between snapshots without leaving Claude. - Switch between multiple project directories on the fly with
set_projectinstead of restarting the MCP server.
- "Use KARP Inspector to find where user authentication is handled and show me the function signatures."
- "Grep the codebase for any usage of
OPENAI_API_KEYand list the files." - "Give me a file outline of
services/billing.pywith all classes and methods." - "Re-index the project, then tell me how many files and embeddings are currently covered."
- "Show the diff between the last two snapshots of
src/router.ts."
- Fully local: no API keys, no cloud calls, source code never leaves the machine.
- Broad toolkit beyond search: grep, outlines, snapshots, diffs, and multi-project switching in one server.
- One-click
.mcpbinstall for Claude Desktop, with manual JSON config also supported. - Fast after first index: cached restarts load in under 0.1 seconds and semantic queries return in under a second.
- Community project by a single maintainer, not an official vendor server.
- Built-in language support is limited to Python, JavaScript, TypeScript, HTML, CSS, Markdown, and plain text (other extensions require
EXTRA_EXTENSIONS). - Designed around Claude Desktop's bundled Node.js runtime; other MCP clients may need extra setup, and a ~130MB embedding model download is required on first use.
- Code Context (Foad K): MCP server for semantic code search.
- mcp-code-indexer (groxaxo): Local semantic codebase indexing using Qdrant and SQLite.
- code-memory (kapillamba4): Offline MCP server with local vector search and Git history awareness.