LLMScribe logo: filesystem MCP server for AI coding agents

# LLMScribe

PyPI version Supported Python versions Cross-platform output check Apache-2.0 license Listed in the official MCP Registry GitHub stars

**The filesystem layer for AI agents.** An agent uses LLMScribe to read a project, search it, trace its dependencies and change it — with the same operations and the same JSON on Linux, macOS and Windows. An MCP server, a command line tool and a Python library, from one core. No AI, no embeddings, no ranking, no network access, no account. Apache-2.0. Works with any MCP client — Claude Code, Cursor, VS Code, Zed and the rest — plus `pip install` and a desktop app for Windows. [Install](#install) · [Quick start](#quick-start) · [MCP setup](#mcp-server-setup) · [CLI](#cli-reference) · [Python API](#python-library-and-framework-adapters) · [FAQ](#faq) · [Website](https://llmscribe.vercel.app) --- ## Table of contents - [What is LLMScribe?](#what-is-llmscribe) - [Features](#features) - [Install](#install) - [Quick start](#quick-start) - [Tools](#tools) - [MCP server setup](#mcp-server-setup) - [Recommended agent workflow](#recommended-agent-workflow) - [Tool details](#tool-details) - [CLI reference](#cli-reference) - [Secret redaction](#secret-redaction) - [Python library and framework adapters](#python-library-and-framework-adapters) - [Configuration](#configuration) - [Behavior reference](#behavior-reference) - [Comparison](#comparison) - [Use cases](#use-cases) - [FAQ](#faq) - [Architecture](#architecture) - [Contributing](#contributing) - [Resources](#resources) - [License](#license) --- ## What is LLMScribe? An AI coding agent that wants to understand your repository normally has one interface: the shell. `ls`, `find`, `grep` and `cat` were built for a person reading a terminal, not for a program building a model of a codebase. Their output is formatted for eyes, differs between operating systems, and has to be re-parsed by the agent every time. LLMScribe replaces that with fourteen structured operations that behave the same everywhere: 1. **Map** the project tree without reading any file. 2. **Search** paths and contents literally. 3. **Read** one file or many, whole or by line range. 4. **Trace dependencies** in both directions. 5. **Diff** against Git. 6. **Overview** a whole small project in one call. 7. **Write**: create, edit, move, delete and make directories. 8. **Return everything as JSON**, with truncation always reported. It reads **and** writes, so an agent can fix the bug it just found instead of switching to shell commands. Every write goes through the same path guards as a read: no absolute paths, no `..`, no symlinks, nothing outside the project. Writes are atomic, and an edit is an exact string replacement that fails loudly rather than changing the wrong place. **Why this matters in practice.** On a 1.4-million-line codebase, one benchmark agent burned 6,000 seconds and produced nothing — no analysis, no output. The same model, given structured code search instead of free-form file reading, finished the same task in **89 seconds** and scored 0.90. Across another benchmark, Codex CLI completed its whole turn sequence without ever reaching the file that would have solved the task in **27–29% of runs**. The bottleneck is not the model. It is what goes into the context window. ## Features - **Project map**: full directory tree with contents excluded, optionally limited by depth. - **Literal code search**: results ordered by path and line, with the matched text and match type. Never a silent empty result. - **Safe file reads**: path traversal outside the project is blocked. Every read reports `byte_size`, `line_count` and `modified` for the whole file. - **Line ranges**: `--lines 200:250` reads part of a large file instead of all of it. - **Batch reads**: `read_many` supports partial success, so one bad path does not fail the request. - **Dependency graph**: imports and reverse dependencies (`used_by`) for Python, JavaScript/TypeScript, Java, Go, Rust and C/C++. - **Git status and diff**: staged, unstaged and per-commit unified diffs. - **Context-window control**: `--depth` limits the tree, `--lines` reads part of a file, and the character cap is reported when it cuts. - **Secret redaction**: API keys, tokens, private keys and connection-string credentials are masked by default. - **Real `.gitignore` semantics**: nested files, wildcards, directory rules and `!` negation. - **Deterministic output**: same input, same bytes, on every run and every OS. - **Local-only**: no network access, no hosted service, no telemetry. --- ## Install ```bash pip install llmscribe # core: map, search, read, dependencies, diff pip install 'llmscribe[server]' # adds the MCP server (llmscribe-mcp) pip install 'llmscribe[adapters]' # adds LangChain, LlamaIndex, PydanticAI and smolagents adapters ``` The core package has a single dependency (`pathspec`). The MCP server and framework adapters are optional extras, so a library user never pays for a protocol server they do not run. If you run `llmscribe-mcp` without the `server` extra, it prints the install command and exits instead of raising an `ImportError`. A standalone Windows EXE is also available from the [Releases page](https://github.com/AMRITO-KUNDU/llmscribe/releases). The desktop GUI ships either as that EXE or as `pip install 'llmscribe[gui]'`, which provides the `llmscribe-gui` command. Git is only needed for the `diff` tool. --- ## Quick start ### Use it as an MCP server ```bash pip install 'llmscribe[server]' claude mcp add llmscribe -- llmscribe-mcp ``` Then ask your agent to explore the project. Setup for every other client is in [MCP server setup](#mcp-server-setup). ### Use it from the command line ```bash pip install llmscribe llmscribe map --depth 2 # project tree, two levels deep llmscribe search "authentication" # literal search across paths and contents llmscribe read src/auth/service.py # one file, with size, line count and mtime llmscribe dependencies src/auth/service.py --json ``` ### Use it from Python ```python from llmscribe import Repository repo = Repository(".") print(repo.map().tree) print(repo.search("auth").match_count) ``` --- ## Tools Fourteen tools, identical across the MCP server, CLI and Python library. | MCP tool | CLI command | What it does | | --- | --- | --- | | `project_map` | `llmscribe map` (alias `ls`) | Directory tree without file contents. Supports `--depth` and `--sizes`. | | `project_overview` | `llmscribe overview` (alias `tree`) | Tree plus supported file contents. Supports `--depth` and `--sizes`. | | `search` | `llmscribe search` | Literal search across file paths, names, contents and lines. | | `read` | `llmscribe read` (alias `cat`) | One file with `byte_size`, `line_count`, `modified` and `revision`. `--lines START:END` reads part of it. | | `read_many` | `llmscribe read-many` (alias `cat-many`) | Up to 50 files in one call, with per-file errors. `--lines START:END` applies to every file. | | `project_dependencies` | `llmscribe dependencies` (alias `deps`) | What a file imports and what imports it. | | `project_diff` | `llmscribe diff` | Git status and unified diffs. | | `write_file` | `llmscribe write` (alias `tee`) | Create or replace a file. Atomic. `--no-overwrite` refuses to clobber. | | `edit_file` | `llmscribe edit` (alias `sed`) | Replace an exact substring. Fails on no match, or on more than one unless `--all`. | | `create_directory` | `llmscribe mkdir` | Create a directory, including missing parents. | | `move_file` | `llmscribe mv` | Move or rename. Refuses to overwrite unless `--overwrite`. | | `delete_file` | `llmscribe rm` | Delete one file. Directories are refused. | | `append_file` | `llmscribe append` (alias `add`) | Add to the end of a file, creating it if needed. Keeps the encoding. | | `copy_file` | `llmscribe cp` | Copy a file byte for byte. | --- ## MCP server setup LLMScribe is a standard MCP server that runs locally over stdio. Install the server extra first: ```bash pip install 'llmscribe[server]' ``` Every tool carries MCP annotations — `readOnlyHint`, `destructiveHint`, `idempotentHint` — and a human-readable title, so a client can auto-approve the seven read tools and warn before `delete_file` or `move_file` without hard-coding names. ### Standard `mcpServers` configuration Most clients accept this block: ```json { "mcpServers": { "llmscribe": { "command": "llmscribe-mcp" } } } ``` If `llmscribe-mcp` is not on your `PATH`, call the module instead: ```json { "mcpServers": { "llmscribe": { "command": "python", "args": ["-m", "llmscribe.mcp"] } } } ``` Where to put it: | Client | Where to add it | Notes | | --- | --- | --- | | **Claude Desktop** | `claude_desktop_config.json` (Settings → Developer → Edit Config). macOS: `~/Library/Application Support/Claude/`. Windows: `%APPDATA%\Claude\`. | Fully quit and reopen after saving. | | **Cursor** | `.cursor/mcp.json` in the project, or `~/.cursor/mcp.json` for all projects | Restart, then check Customize → MCPs. | | **Windsurf (Cascade)** | `~/.codeium/mcp_config.json` (Settings → Cascade → MCP → View Raw Config) | Press refresh after saving. | | **Cline** | MCP Servers → Configure → Configure MCP Servers | | | **Roo Code** | Global `mcp_settings.json` (Edit Global MCP) or `.roo/mcp.json` (Edit Project MCP) | | | **LM Studio** | `~/.lmstudio/mcp.json` (Windows: `%USERPROFILE%\.lmstudio\mcp.json`). In-app: Program → Install → Edit mcp.json | Follows Cursor's `mcp.json` notation. | | **JetBrains IDEs** | Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add → As JSON | You can also click Import from Claude. | ### Clients with a different format **Claude Code** ```bash claude mcp add llmscribe -- llmscribe-mcp ``` Confirm with `claude mcp list`. Add `--scope user` to enable it in every project, or `--scope project` to share it with your team through `.mcp.json`. **VS Code (GitHub Copilot)** uses `servers`, not `mcpServers`. Create `.vscode/mcp.json`: ```json { "servers": { "llmscribe": { "type": "stdio", "command": "llmscribe-mcp" } } } ``` Open Copilot Chat in Agent mode and click the tools icon to start the server. **OpenAI Codex CLI**: add to `~/.codex/config.toml`: ```toml [mcp_servers.llmscribe] command = "llmscribe-mcp" ``` **Zed**: add to your settings (or Settings → AI → MCP Servers → Add Server): ```json { "context_servers": { "llmscribe": { "command": "llmscribe-mcp", "args": [], "env": {} } } } ``` **Continue**: add to `~/.continue/config.yaml`, or a file under `.continue/mcpServers/`: ```yaml name: LLMScribe version: 1.0.0 schema: v1 mcpServers: - name: LLMScribe command: llmscribe-mcp ``` **Goose**: add an extension to `~/.config/goose/config.yaml`: ```yaml extensions: llmscribe: name: llmscribe enabled: true type: stdio cmd: llmscribe-mcp args: [] timeout: 300 ``` The server is also listed in the [official MCP Registry](https://registry.modelcontextprotocol.io/?q=llmscribe) as `io.github.AMRITO-KUNDU/llmscribe`. --- ## Recommended agent workflow Instead of pushing a whole repository into a context window, let the agent retrieve only what it needs: ```text 1. project_map() what is in this project? ↓ 2. search("authentication") where is the relevant code? ↓ 3. read("src/auth/service.py") what does it say? ↓ 4. project_dependencies("src/auth/service.py") what does it touch, and what touches it? ↓ 5. read_many([...]) pull in the related files ``` For small and medium projects, `project_overview` returns the tree and supported file contents in one call. For large repositories, stay with `map → search → read`. --- ## Tool details ### Map Generates a clean directory tree without file contents. This is the best first step in an unfamiliar repository. ```bash llmscribe map llmscribe map --depth 2 # first two levels only, like `tree -L 2` llmscribe map --sizes # add each file's size in bytes llmscribe map --json ``` MCP: `project_map` or `project_map(depth=2)`. `--depth N` (or `max_depth=N` in Python) keeps the first *N* path levels. A top-level file is depth 1, so `--depth 2` keeps `a/b.py` and drops `a/b/c.py`. It prunes both the tree and the file list, so `overview --depth 2` never reads the files it excluded. ```text src/ ├── api/ │ ├── routes.py │ └── auth.py ├── models/ │ └── user.py └── main.py ``` ### Search Searches file paths, file names, file contents and individual lines. Search is intentionally **literal**: LLMScribe does not guess what you meant. ```bash llmscribe search "authentication" llmscribe search "authentication" --json ``` Each match includes the file path, line number, matching line, matched text and match type (`filename` or `content`). Results are ordered by path then line and capped at 1,000 matches. Binary and oversized files are skipped. ```json [ { "file_path": "src/auth/service.py", "line_number": 12, "line_content": "def authenticate(user, password):", "match_type": "content", "matched_text": "authenticate" } ] ``` ### Read Retrieves a file. Paths are validated, and traversal outside the project is rejected. ```bash llmscribe read src/auth/service.py ``` Every read reports `byte_size`, `line_count` and `modified` (ISO 8601, UTC) for the **whole file**, even when the returned body was clipped. That is the `stat`, `wc -l` and `file` information in one consistent shape on every OS. ```json { "file_path": "src/main.py", "byte_size": 2841, "line_count": 96, "modified": "2026-11-21T04:13:16+00:00", "truncated": false } ``` **Read part of a file.** `start_line` and `end_line` are 1-based and inclusive, so asking for lines 200–250 of a 5,000-line file returns 51 lines rather than 5,000: ```bash llmscribe read src/big.py --lines 200:250 llmscribe read src/big.py --lines 498: # from line 498 to the end ``` ```python repo.read("src/big.py", start_line=200, end_line=250) ``` `line_count` still reports the whole file and `returned_lines` reports the slice, so an agent can always tell there is more. ### Read many Retrieves several files in one operation. Partial success is supported, so one problematic file does not invalidate the request. ```python read_many(["src/auth/service.py", "src/auth/models.py", "src/api/login.py"]) ``` ```bash llmscribe read-many src/auth/service.py src/api/login.py ``` ### Dependencies Shows what a file depends on and what depends on it. Useful for estimating the impact of changing a file. ```bash llmscribe dependencies src/auth/service.py --json ``` ```text src/auth/service.py │ ├── depends on │ ├── auth/models.py │ ├── auth/config.py │ └── auth/utils.py │ └── used by ├── api/login.py └── tests/test_auth.py ``` Supported languages: Python, JavaScript/TypeScript, Java, Go, Rust and C/C++. Each reference is classified as: - `local`: resolved to a file or directory inside the project - `stdlib`: part of the language's standard library - `external`: not in the project, assumed third-party - `unresolved`: a relative or local-looking reference that matches nothing `used_by` lists the reverse dependencies. ### Diff Reads repository changes from Git: status, unstaged changes, staged changes, specific commits and unified diffs. This lets an agent see not only the current state of the repository but **what changed**. ```bash llmscribe diff ``` Git runs with an argument list, a 30-second timeout, a minimal environment and without external diff or textconv drivers. ### Overview Produces a project snapshot: directory structure, supported text file contents and structured project information. ```bash llmscribe overview llmscribe overview --depth 3 ``` --- ## CLI reference Every command accepts `--json` (`-j`) for machine-readable output, which makes the CLI a building block for scripts, automation and developer tooling. ```bash llmscribe map llmscribe overview llmscribe search "authentication" llmscribe read src/auth/service.py llmscribe read-many src/auth/service.py src/api/login.py llmscribe dependencies src/auth/service.py llmscribe diff llmscribe map --depth 2 # first two levels llmscribe search "auth" --json # machine-readable output llmscribe -V # print the version ``` **Paths are flexible.** Every command takes an optional directory, so `--path` is never required: ```bash llmscribe . # map the current directory llmscribe ./src # map a specific directory llmscribe map ./src # the same, spelled out llmscribe search "auth" ./src # search inside a directory ``` **Aliases** for verbs you already type: | Alias | Command | | --- | --- | | `ls` | `map` | | `tree` | `overview` | | `cat` | `read` | | `cat-many` | `read-many` | | `deps` | `dependencies` | | `add` | `append` | | `mkdir`, `cp`, `mv`, `rm` | the same operations | There is no `grep`, `find`, `sed` or `tee`. Each of those promises syntax this CLI does not have — `grep` has no `-r` or regex, `find` has no `-name`, `sed` has no `s///`, `tee` does not duplicate to stdout. An alias that quietly behaves differently is worse than no alias, because you only find out after it has done the wrong thing. `read` accepts several files and switches to a batch read automatically: `llmscribe cat src/main.py src/util.py`. --- ## Writing An agent asked to fix a bug has to change a file. If the layer cannot do that, the person building the agent falls back to shell commands and the problem comes back. ```bash llmscribe write src/new.py --content 'def f(): ...' echo 'x = 1' | llmscribe write src/piped.py # stdin llmscribe edit src/main.py --old 'retries = 3' --new 'retries = 5' llmscribe mkdir src/generated llmscribe mv src/old.py src/new.py llmscribe rm src/dead.py llmscribe append CHANGELOG.md --content '- Fixed the thing' llmscribe cp src/main.py src/main.py.bak ``` Editing safely when someone else might be working in the same tree: ```bash REV=$(llmscribe read src/main.py --json | jq -r .data.revision) llmscribe edit src/main.py --old 'retries = 3' --new 'retries = 5' --expect "$REV" ``` Six properties hold for every write: - **Confined to the project.** Absolute paths, `..` segments (including encoded and backslash forms) and symlinks are refused, using the same checks the read side uses. A write that would land outside the root fails; it is not silently sanitised. The restriction is in the tool schema too, as a `pattern` on every path parameter, so the model sees the boundary instead of discovering it by failing. - **Atomic.** Content goes to a temporary file in the same directory and is then replaced, so an interrupted write leaves the original intact rather than a half-written file. - **Exact, not clever.** `edit_file` replaces a literal substring. If it is absent you get `no_match`; if it appears more than once you get `ambiguous_match` and nothing is written. It will not guess which one you meant. - **Reported.** Every result says what happened — `created`, `overwritten`, `edited` with a replacement count, `moved` with a destination, `deleted` with the bytes freed. - **No lost updates.** `read` returns a `revision`, a short fingerprint of the file's bytes. Pass it back as `expect_revision` and the write is refused with `conflict` if the file changed in between, instead of overwriting a change someone else made. - **Honest failures.** A read-only file or directory is `permission_denied` rather than a silent replace; a full disk is `no_space` and says the original is untouched; a path past the Windows limit is `path_too_long` and names the limit. Nothing is left half written, and no temporary file survives a failure. Secrets are still masked in everything that leaves; what you *store* is written verbatim. ### Read-only mode To make it impossible for the agent to change anything, run the server read-only. The write tools are **never registered**, so a client does not list them and a call fails as an unknown tool — a model cannot ask for what it cannot see: ```bash llmscribe-mcp --read-only # or, for clients configured with environment variables: LLMSCRIBE_READ_ONLY=1 llmscribe-mcp ``` Seven tools remain: map, overview, search, read, read_many, dependencies and diff. ## Fitting a large repository Two controls, both of which only ever remove whole files or whole lines — never content chosen by relevance. | Control | Effect | | --- | --- | | `--depth N` | Limits the tree and file list to the first *N* path levels. Excluded files are never read. | | `--lines START:END` | Reads part of one file. 51 lines of a 5,000-line file costs 51 lines. | Content is still capped at 400,000 characters by default, and any cut is reported through `truncated`, `truncation_note` and `omitted_files`, so truncation is never hidden. ## The tool definitions cost about 3,100 tokens A client pays for your tool schemas on every request, whether it uses them or not. LLMScribe's fourteen definitions total roughly **3,114 tokens** in OpenAI format, and a little less in Anthropic and MCP shape. A 14-tool filesystem server was measured at ~7,000 tokens in a recent independent survey, so this is roughly half. That follows from keeping the surface small and the descriptions specific — and from putting the path constraint in a `pattern` rather than a paragraph. If you pay per token, measure your own. ## Secret redaction LLMScribe exists to put code in front of a model, so every result is scrubbed first: file contents, search hits and diffs. The result tells you what it masked. ```json { "content": "API_KEY = \"[REDACTED:openai_key]\"", "metadata": { "redacted": ["openai_key"] } } ``` Detected shapes include AWS keys, GitHub and Slack tokens, Stripe and Google keys, JWTs, `Authorization: Bearer` headers, credentials inside connection strings, private-key blocks and `password = "..."` assignments. Matching is conservative: high-confidence token shapes with fixed replacements, so ordinary code is left alone and output stays repeatable. Redaction is **on by default everywhere**, including the MCP server. Use `--no-redact` (CLI) or `redact=False` (Python) when you need raw text. An agent cannot turn it off. ### Your own token shapes Every company has internal tokens the built-in list cannot know about. Add them as `(name, regex)` pairs and they mask with `[REDACTED:]`, after the built-in rules: ```python repo = Repository(".", redact_extra=[("acme_key", r"acme_live_[A-Za-z0-9]{24}")]) ``` A bad regex or a name that is not letters, digits and underscores is rejected with `invalid_argument` when the `Repository` is built, not silently ignored. --- ## Python library and framework adapters Use LLMScribe as a library without running a server. ```python from llmscribe import Repository, LLMScribeError repo = Repository(".") # or Repository(Path(".")) print(repo.map().tree) # tree, no file contents print(repo.search("auth").match_count) match = repo.read("src/app.py") # returns a result, never raises if match.ok: print(match.content) batch = repo.read_many(["README.md", "missing.py"]) # per-file errors, never raises print(batch.success_count, batch.error_count) deps = repo.dependencies("src/app.py") # raises LLMScribeError print(deps.file_dependencies.local_dependencies) print(deps.used_by) # what imports it ``` Two error conventions: - `read` and `read_many` **return** results carrying `ok` and `error_code`, so a batch reports per-file failures. - `dependencies` and `diff` **raise** `LLMScribeError`, whose `.code` is a stable machine-readable string. Every method returns the same dataclasses the CLI and MCP server produce, each with `.to_dict()` for JSON. ### Register the tools in any agent framework ```python from llmscribe import Repository, tool_schemas schemas = tool_schemas("openai") # or "anthropic", "mcp", "raw" run = Repository(".").handlers() # tool name -> callable result = run["project_map"](depth=2) # {'ok': True, 'data': {...}, ...} ``` `llmscribe schema --format openai` prints the same definitions from the CLI. ### Ready-made adapters Adapters ship for **LangChain**, **LlamaIndex**, **PydanticAI**, **smolagents** and the **Anthropic Messages API** (no SDK needed): ```python from llmscribe import Repository from llmscribe.adapters import as_langchain_tools, as_llamaindex_tools, as_anthropic_tools tools = as_langchain_tools(Repository(".")) # StructuredTool objects tools = as_llamaindex_tools(Repository(".")) # FunctionTool objects defs, dispatch = as_anthropic_tools(Repository(".")) # Messages API shape ``` Each adapter is exercised against the real framework in CI, on every push. Each adapter imports its framework lazily and, if it is missing, tells you which `pip` command to run. ### Guarantees that make it safe to depend on - **Handlers never raise.** A missing file returns `{"ok": False, "error": {...}}`, so an agent loop is not broken by a bad path. - **`path` is not a tool argument.** A bound tool set cannot be repointed at another directory by the model. - **`schema_version` is in every JSON envelope.** It changes only for a breaking change to the output contract. Runnable examples are in [`examples/`](https://github.com/AMRITO-KUNDU/llmscribe/tree/main/examples): chunking a repository for a RAG pipeline, reviewing what a change touches, and generating a repository summary. --- ## Configuration LLMScribe runs entirely on your machine and needs no configuration. Two optional environment variables restrict which directories the MCP server may read: | Variable | Description | Default | | --- | --- | --- | | `MCP_ALLOWED_ROOTS` | Directories the tools may read, separated by `:` on POSIX and `;` on Windows | All paths | | `MCP_ALLOW_LOCAL_PATHS` | `0` disables local path access entirely | Enabled | --- ## Behavior reference ### Ignore rules Defaults (`.git`, `node_modules`, `venv`, `dist`, `build`, `.env`, `*.log` and more), the root `.gitignore` and nested `.gitignore` files are applied with real Git semantics: wildcards, directories, `!` negation and root-anchored patterns. Hidden files are included unless ignored. Symlinks are never followed or listed. ### Supported text files Known source, config and documentation extensions, plus names such as `Dockerfile`, `Makefile`, `LICENSE` and `.gitignore`. Other files appear in the tree but cannot be read or searched. ### Limits All of them are fixed constants, not configuration: | Limit | Value | | --- | --- | | Content characters per `project_overview` / `read_many` | 400,000 | | Files per `read_many` | 50 | | Search matches | 1,000 | | Map entries | 20,000 | | Size per file | 2 MiB | | Diff characters | 200,000 | | Scanned entries | 100,000 | Anything cut is reported through `truncated`, `truncation_note` and `omitted_files`. ### Error codes Every failure has a stable, machine-readable code: `invalid_argument` · `invalid_path` · `file_not_found` · `file_exists` · `unsupported_file_type` · `binary_file` · `file_too_large` · `read_error` · `write_error` · `encoding_error` · `permission_denied` · `no_space` · `path_too_long` · `no_match` · `ambiguous_match` · `conflict` · `not_a_repository` · `git_unavailable` · `unsupported_operation` · `internal_error` ```json {"ok": false, "tool": "...", "error": {"code": "...", "message": "..."}} ``` ### Deterministic and cross-platform, verified in CI [`scripts/cross_platform_check.py`](https://github.com/AMRITO-KUNDU/llmscribe/blob/main/scripts/cross_platform_check.py) builds a fixed fixture project, runs `map`, `overview`, `search`, `read`, `read_many` and `dependencies`, scrubs the absolute path and digests each result. The [cross-platform workflow](https://github.com/AMRITO-KUNDU/llmscribe/blob/main/.github/workflows/cross-platform.yml) runs it on Ubuntu, macOS and Windows and **fails the build if the digests differ**: ```text llmscribe python 3.12 map map_depth2 overview search read read_many dependencies combined <- must be identical on all three ``` The fixture is written as bytes, not text, so the files are byte-identical on every platform. Writing text would turn `\n` into `\r\n` on Windows and make the comparison meaningless. ### Upgrading from older versions - Legacy tool names (`project_get_file`, `project_get_files`, `project_search`, `project_list_files`) were replaced by `read`, `read_many` and `search`. - Error code `path_traversal` is now `invalid_path`. `not_text_file` is now `unsupported_file_type`. - In `project_dependencies` results, `all_local_files`, `all_external_deps` and `all_unresolved` were replaced by `used_by` and per-category lists. `stdlib_dependencies` was added. - A bad root raises `LLMScribeError`, not `FileNotFoundError`, so callers have one exception to catch. - **1.3.0:** online GitHub sources were removed, and LLMScribe is now local-only. The `repo` and `ref` arguments, the in-memory snapshot cache, the `llmscribe.github` package and the hosted HTTP transport are gone. Point the tools at a local `path`. See the [changelog](https://github.com/AMRITO-KUNDU/llmscribe/blob/main/CHANGELOG.md) for full release notes. --- ## Comparison ### LLMScribe vs shell commands | What the agent needs | Linux / macOS | Windows | LLMScribe | | --- | --- | --- | --- | | List a directory | `ls -la` | `dir /a` | `map` | | Find files by name | `find . -name '*.py'` | `Get-ChildItem -Recurse -Filter *.py` | `search` | | Search inside files | `grep -rn 'auth' .` | `Select-String -Pattern auth` | `search` | | Read a file | `cat app.py` | `type app.py` | `read` | | Compare versions | `diff -ru old new` | `fc /r` (not recursive) | `diff` | Shell output is made for eyes (columns, colour, locale-dependent sort order, warnings mixed with results), is not portable between operating systems, and forces the agent to re-parse text. LLMScribe returns the same JSON and the same bytes everywhere. ### LLMScribe vs the filesystem MCP server `@modelcontextprotocol/server-filesystem` is a good tool and covers the same ground on the basics. Both read and write. The difference is what surrounds the operations. | | server-filesystem | LLMScribe | | --- | --- | --- | | Read / write / move / create | Yes | Yes | | Binary and media reads | Yes | No | | File size and mtime | `get_file_info` | On every read, plus `map --sizes` | | `.gitignore`-aware | No | Yes, real pathspec semantics | | Dependency graph (imports **and** `used_by`) | No | Yes | | Git diff and status | No | Yes | | Truncation reported | No | Yes, with `omitted_files` | | Atomic writes | No | Yes, temp file then replace | | Refuses writes outside the root or through a symlink | Partial | Yes | | Secret redaction | No | Yes, on by default | Both can write. The difference is what happens around it: LLMScribe refuses to write outside the project root or through a symlink, writes atomically so an interrupted write leaves the original intact, and reports exactly what changed. Run whichever you prefer — or both. --- ## Use cases - Giving AI coding agents (Claude Code, Cursor, Codex, Copilot) reliable codebase context - Building MCP applications and local LLM tools - Code search and repository explorer interfaces - Impact analysis before changing a file - Chunking repositories for RAG and code analysis pipelines - Documentation generation and repository summaries - Automation scripts that need stable, parseable project data - Exploring unfamiliar open-source projects --- ## FAQ ### What is LLMScribe? LLMScribe is an open-source MCP server, CLI and Python library that gives AI coding agents structured access to a local codebase: project map, literal search, file reads with line ranges, dependency graph, Git diff, and the write operations — create, edit, move, delete — needed to change code. Everything is returned as deterministic JSON. ### How do I install the LLMScribe MCP server? Run `pip install 'llmscribe[server]'`, then add `llmscribe-mcp` as a command in your client's MCP configuration. For Claude Code that is `claude mcp add llmscribe -- llmscribe-mcp`. See [MCP server setup](#mcp-server-setup) for other clients. ### Which AI coding tools does LLMScribe work with? Any MCP client, including Claude Code, Claude Desktop, Cursor, OpenAI Codex CLI, VS Code with GitHub Copilot, Windsurf, Zed, Cline, Roo Code, Continue, JetBrains IDEs, Goose and LM Studio. ### Does LLMScribe use AI or embeddings? No. There are no models, no embeddings and no semantic ranking. Search is literal, and the same input always produces the same bytes. ### Does LLMScribe send my code anywhere? No. It runs entirely on your machine with no network access, account, hosted service or telemetry. ### Can an agent modify my files through LLMScribe? Yes, through five explicit write tools: `write_file`, `edit_file`, `create_directory`, `move_file` and `delete_file`. Nothing is implicit. Every write is confined to the project root, refuses to follow symlinks, is atomic, and reports what changed. `edit_file` replaces an exact string, so it fails loudly rather than rewriting the wrong place. ### How do I fit a large repository into a context window? Start with `llmscribe map --depth 2`, then use `search` and `read --lines 200:250` to pull in only the part that matters. For an overview, add `--depth` to keep the tree short. Anything omitted is reported in `omitted_files`. ### Are secrets and API keys exposed to the model? High-confidence secret shapes (cloud keys, tokens, JWTs, private keys, connection-string credentials) are masked in file contents, search results and diffs by default, and the result lists what was redacted. ### Which languages does dependency analysis support? Python, JavaScript/TypeScript, Java, Go, Rust and C/C++. ### Does LLMScribe work on Windows? Yes. CI runs on Ubuntu, macOS and Windows and fails if the output differs between them. ### How is LLMScribe different from the filesystem MCP server? The filesystem server reads and writes. LLMScribe only reads, but adds a dependency graph, Git diff, `.gitignore` semantics, secret redaction and explicit truncation reporting. See the [comparison](#comparison). ### Can I use LLMScribe without MCP? Yes. Use the `llmscribe` CLI, the `Repository` Python class, or the LangChain, PydanticAI, smolagents and Anthropic adapters. ### What license is LLMScribe under? Apache License 2.0. --- ## Architecture How the code is laid out, what happens when you run a command, and where to add a new tool: see **[ARCHITECTURE.md](ARCHITECTURE.md)**. It assumes a little Python and no knowledge of this project. ## Design notes All interfaces share one core engine, so behavior is consistent everywhere. ```text Repository │ ▼ Local Project │ ▼ LLMScribe Core │ ┌─────────────────────┼─────────────────────┐ │ │ │ ▼ ▼ ▼ CLI MCP GUI │ │ └──────────────┬──────┘ ▼ Structured Output / JSON ``` **In scope:** repository extraction, literal search, structured project data, file retrieval, dependency information, Git information and multiple interfaces. **Out of scope:** AI-generated answers, embedding-based search, semantic ranking, autonomous coding, an AI coding agent and a general-purpose Git client. See [VISION.md](https://github.com/AMRITO-KUNDU/llmscribe/blob/main/VISION.md). --- ## Contributing Contributions are welcome: repository extraction, search, dependency analysis, interfaces, integrations and documentation. Start with the [vision](https://github.com/AMRITO-KUNDU/llmscribe/blob/main/VISION.md), which sets out what is in scope, then the [contributing guide](https://github.com/AMRITO-KUNDU/llmscribe/blob/main/CONTRIBUTING.md). - Expect a first response within about **7 days**. This is a part-time project, and pinging a quiet thread is welcome. - Issues labelled **`good first issue`** are scoped to be self-contained. - Ask questions in an [issue](https://github.com/AMRITO-KUNDU/llmscribe/issues) so the next person can find the answer. - LLMScribe is maintained by [@AMRITO-KUNDU](https://github.com/AMRITO-KUNDU). [GOVERNANCE.md](https://github.com/AMRITO-KUNDU/llmscribe/blob/main/GOVERNANCE.md) describes how decisions are made. Report vulnerabilities as described in [SECURITY.md](https://github.com/AMRITO-KUNDU/llmscribe/blob/main/SECURITY.md). LLMScribe contributors --- ## Resources - [Website and docs](https://llmscribe.vercel.app) - [PyPI package](https://pypi.org/project/llmscribe/) - [Official MCP Registry listing](https://registry.modelcontextprotocol.io/?q=llmscribe) (`io.github.AMRITO-KUNDU/llmscribe`) - [Issues](https://github.com/AMRITO-KUNDU/llmscribe/issues) · [Changelog](https://github.com/AMRITO-KUNDU/llmscribe/blob/main/CHANGELOG.md) · [Support](https://github.com/AMRITO-KUNDU/llmscribe/blob/main/SUPPORT.md) - [Contributing](https://github.com/AMRITO-KUNDU/llmscribe/blob/main/CONTRIBUTING.md) · [Vision](https://github.com/AMRITO-KUNDU/llmscribe/blob/main/VISION.md) · [Governance](https://github.com/AMRITO-KUNDU/llmscribe/blob/main/GOVERNANCE.md) - [Code of Conduct](https://github.com/AMRITO-KUNDU/llmscribe/blob/main/CODE_OF_CONDUCT.md) · [Accessibility](https://github.com/AMRITO-KUNDU/llmscribe/blob/main/ACCESSIBILITY.md) · [Security](https://github.com/AMRITO-KUNDU/llmscribe/blob/main/SECURITY.md) ### Star history LLMScribe GitHub star history chart --- ## License LLMScribe is licensed under the [Apache License 2.0](https://github.com/AMRITO-KUNDU/llmscribe/blob/main/LICENSE).