Labsco
MCP SERVER

Codebase Context Dumper

by lex-tools

Concatenate a directory's text files into one document with per-file path headers — .gitignore respected, binaries skipped, and chunked when the repository is bigger than one response.

Codebase Context Packing & CompressionVerified
Summary
The exclusions come from the repository's own .gitignore, so the dump matches what the project already treats as source.

Binary files are skipped and ignored paths stay out without a second exclusion list to keep in step with the first. Chunking is the caller's decision rather than the tool's: num_chunks and chunk_index return the repository in pieces you ask for in order, and because each piece keeps its per-file path headers, a chunk still reads as itself rather than as a fragment.

What it is

A single tool that walks a directory and returns its text files as one concatenated document, each file wrapped in headers and footers carrying its path.

What you get
  • dump_codebase_context, which recursively reads the text files under a base_path, respecting .gitignore rules and skipping binary files.
  • File path headers and footers around each file's content, so the boundaries survive the concatenation.
  • Chunking through num_chunks and chunk_index, for a codebase too large to come back in one response.
Requirements

Nothing to supply — no account, no key. A directory the server can read, and a .gitignore in it if you want the exclusions the project already maintains to apply.

Setup effort

One command — npx -y @lex-tools/codebase-context-dumper