@lex-tools/codebase-context-dumper
OfficialRespects .gitignore rules when scanning codebases, ensuring ignored files are excluded from context dumps
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@@lex-tools/codebase-context-dumper dump the codebase at /home/user/projects/my-app into 3 chunks"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
codebase-context-dumper MCP Server
A Model Context Protocol (MCP) server designed to easily dump your codebase context into Large Language Models (LLMs).
Why Use This?
Large context windows in LLMs are powerful, but manually selecting and formatting files from a large codebase is tedious. This tool automates the process by:
Recursively scanning your project directory.
Including text files from the specified directory tree that are not excluded by
.gitignorerules.Automatically skipping binary files.
Concatenating the content with clear file path markers.
Supporting chunking to handle codebases larger than the LLM's context window.
Integrating seamlessly with MCP-compatible clients.
Related MCP server: code-index-mcp
Usage (Recommended: npx)
The easiest way to use this tool is via npx, which runs the latest version without needing a local installation.
Configure your MCP client (e.g., Claude Desktop, VS Code extensions) to use the following command:
{
"mcpServers": {
"codebase-context-dumper": {
"command": "npx",
"args": [
"-y",
"@lex-tools/codebase-context-dumper"
]
}
}
}The MCP client will then be able to invoke the dump_codebase_context tool provided by this server.
Features & Tool Details
Tool: dump_codebase_context
Recursively reads text files from a specified directory, respecting .gitignore rules and skipping binary files. Concatenates content with file path headers/footers. Supports chunking the output for large codebases.
Functionality:
Scans the directory provided in
base_path.Respects
.gitignorefiles at all levels (including nested ones and.gitby default).Detects and skips binary files.
Reads the content of each valid text file.
Prepends a header (
--- START: relative/path/to/file ---) and appends a footer (--- END: relative/path/to/file ---) to each file's content.Concatenates all processed file contents into a single string.
Input Parameters:
base_path(string, required): The absolute path to the project directory to scan.num_chunks(integer, optional, default: 1): The total number of chunks to divide the output into. Must be >= 1.chunk_index(integer, optional, default: 1): The 1-based index of the chunk to return. Requiresnum_chunks > 1andchunk_index <= num_chunks.
Output: Returns the concatenated (and potentially chunked) text content.
Local Installation & Usage (Advanced)
If you prefer to run a local version (e.g., for development):
Clone the repository:
git clone git@github.com:lex-tools/codebase-context-dumper.git cd codebase-context-dumperInstall dependencies:
npm installBuild the server:
npm run buildConfigure your MCP client to point to the local build output:
{ "mcpServers": { "codebase-context-dumper": { "command": "/path/to/your/local/codebase-context-dumper/build/index.js" // Adjust path } } }
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for details on development, debugging, and releasing new versions.
License
This project is licensed under the Apache License 2.0. See the LICENSE file for details.
Available Tools
1 tooldump_codebase_contextA
Recursively reads text files from a specified directory, respecting .gitignore rules and skipping binary files. Concatenates content with file path headers/footers. Supports chunking the output for large codebases.
Inputs: base_path (required), num_chunks, chunk_index.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
With only one tool, there is no possibility of ambiguity or overlap between tools. The tool has a single, clearly defined purpose.
A single tool inherently has perfect naming consistency, as there are no other tools to compare it against for patterns or conventions.
One tool is too few for most practical server purposes, as it severely limits functionality and interaction. While the tool is well-described, a single tool feels thin and incomplete for a codebase context server.
The server's purpose appears to be codebase context management, but with only a dump tool, there are significant gaps. Missing operations like search, filter, update, or delete context make the surface incomplete and likely insufficient for agent workflows.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
Related MCP Servers
- AlicenseBqualityDmaintenanceA Model Context Protocol server that enables LLMs to read, search, and analyze code files with advanced caching and real-time file watching capabilities.66 npm40MIT
- AlicenseAqualityCmaintenanceA Model Context Protocol (MCP) server that helps large language models index, search, and analyze code repositories with minimal setup22142,766 PyPI1,005MIT

CodeAlive MCPofficial
AlicenseNot gradedqualityCmaintenanceA Model Context Protocol server that enhances AI agents by providing deep semantic understanding of codebases, enabling more intelligent interactions through advanced code search and contextual awareness.90MIT- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server that provides VSCode context and filesystem operations for AI assistants.9MIT
Appeared in Searches
- A tool for debugging Pine Script code
- How to convert Figma files to React code
- A platform for hosting and sharing code
- Using separate agents for schema validation, code standards, and directory structure enforcement in development workflows
- Finding the Top 10 Most Frequently Pulled Packages from Nexus Repository