mcp-server

v0.2.0
@1mper-labs/mcp-server Checked 4 days ago Published 1 month ago

repo-lens MCP server (stdio) — expose deterministic repository analysis to MCP hosts such as DSH, Claude Code and Codex.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

repo_lens_analyze

Analyze a repository and return a compact overview: file/dir counts, total bytes, language distribution, dependency manifests (including monorepo sub-packages) and a directory tree. Use this first when you need to understand an unfamiliar codebase (what languages it uses, what packages it depends on, how big it is). This tool performs a fresh scan and never writes .repo-lens/profile.json. dir may be a local path, an https/git@ repository URL, or an `owner/repo` short form (remote sources are shallow-cloned into ~/.repo-lens/repos). Pass json=true for the full machine-readable profile; otherwis…

ParameterTypeDescription
dirstringLocal directory or repository source to analyze. Defaults to the MCP server process working directory.
jsonbooleanReturn the full RepoProfile as JSON instead of a text summary.
refreshbooleanFor remote sources: re-fetch an existing clone instead of reusing it. Ignored for local directories.

repo_lens_map

Print an ASCII directory tree of a repository so you can find where files live before reading them. Uses the cached .repo-lens/profile.json when present and still fresh; otherwise falls back to a fresh analysis (without writing cache). Prefer this over listing directories yourself to save tokens. dir may be a local path, an https/git@ repository URL, or an `owner/repo` short form.

ParameterTypeDescription
dirstringLocal directory or repository source to map. Defaults to the MCP server process working directory.
maxDepthintegerMaximum tree depth to render (root is depth 0). Omit for unlimited depth.
refreshbooleanFor remote sources: re-fetch an existing clone instead of reusing it. Ignored for local directories.

repo_lens_profile

Return the cached .repo-lens/profile.json for a repository as JSON plus a cacheStatus field (fresh | stale | unknown). Use this when you specifically need the previously generated machine-readable profile (schemaVersion, languages, manifests, gitHead, tree). If no cache exists, the result tells you to run repo_lens_analyze first. This tool never writes anything. dir may be a local path, an https/git@ repository URL, or an `owner/repo` short form.

ParameterTypeDescription
dirstringDirectory or repository source whose cached profile to load. Defaults to the MCP server process working directory.

repo_lens_chain

Trace the call chain from a file or symbol using a deterministic AST-based call graph (no LLM guessing). Entry is `path/to/file.ts` (all top-level symbols) or `path/to/file.ts:SymbolName`. Returns each reachable call with its file, symbol, line number and the call site that reached it, breadth-first and depth-limited. Use this when you need to know what a function touches before changing it, instead of reading whole files. dir may be a local path, an https/git@ repository URL, or an `owner/repo` short form.

ParameterTypeDescription
file *stringEntry point: `path/to/file.ts` or `path/to/file.ts:SymbolName` (relative to the repository root).
dirstringRepository root or source. Defaults to the MCP server process working directory.
jsonbooleanReturn the raw ChainResult as JSON instead of the indented text tree.
maxDepthintegerMaximum call depth (default 3).