@lex-tools/codebase-context-dumper
Officialコードベースコンテキストダンパー MCP サーバー
コードベースのコンテキストを大規模言語モデル (LLM) に簡単にダンプできるように設計されたモデル コンテキスト プロトコル (MCP) サーバー。
なぜこれを使うのですか?
LLMの大きなコンテキストウィンドウは強力ですが、大規模なコードベースからファイルを手動で選択してフォーマットするのは面倒です。このツールは、以下の方法でこのプロセスを自動化します。
プロジェクト ディレクトリを再帰的にスキャンします。
.gitignoreルールによって除外されていない、指定されたディレクトリ ツリーからのテキスト ファイルを含めます。バイナリ ファイルを自動的にスキップします。
明確なファイル パス マーカーを使用してコンテンツを連結します。
LLM のコンテキスト ウィンドウよりも大きいコードベースを処理するためのチャンク化をサポートします。
MCP 対応クライアントとシームレスに統合します。
Related MCP server: code-index-mcp
使用方法(推奨:npx)
このツールを使用する最も簡単な方法は、ローカルインストールを必要とせずに最新バージョンを実行するnpxを使用することです。
次のコマンドを使用するように MCP クライアント (例: Claude Desktop、VS Code 拡張機能) を構成します。
{
"mcpServers": {
"codebase-context-dumper": {
"command": "npx",
"args": [
"-y",
"@lex-tools/codebase-context-dumper"
]
}
}
}MCP クライアントは、このサーバーによって提供されるdump_codebase_contextツールを呼び出すことができるようになります。
機能とツールの詳細
ツール: dump_codebase_context
指定されたディレクトリからテキストファイルを再帰的に読み取ります.gitignoreルールを尊重し、バイナリファイルはスキップします。ファイルパスのヘッダー/フッターとコンテンツを連結します。大規模なコードベース向けに出力のチャンク化をサポートします。
機能性:
base_pathで指定されたディレクトリをスキャンします。すべてのレベルの
.gitignoreファイルを尊重します (デフォルトではネストされたファイルと.gitを含む)。バイナリ ファイルを検出してスキップします。
有効な各テキスト ファイルの内容を読み取ります。
各ファイルの内容の先頭にヘッダー (
--- START: relative/path/to/file ---) を追加し、末尾にフッター (--- END: relative/path/to/file ---) を追加します。処理されたすべてのファイルの内容を 1 つの文字列に連結します。
入力パラメータ:
base_path(文字列、必須): スキャンするプロジェクト ディレクトリへの絶対パス。num_chunks(整数、オプション、デフォルト:1):出力を分割するチャンクの総数。1以上である必要があります。chunk_index(整数、オプション、デフォルト:1):返されるチャンクの1から始まるインデックス。num_chunksnum_chunks > 1かつchunk_index <= num_chunksある必要があります。
出力: 連結された(場合によってはチャンク化された)テキスト コンテンツを返します。
ローカルインストールと使用方法(上級)
ローカル バージョンを実行したい場合 (開発用など) は、次の手順に従ってください。
リポジトリをクローンします。
git clone git@github.com:lex-tools/codebase-context-dumper.git cd codebase-context-dumper依存関係をインストールします:
npm installサーバーを構築します。
npm run buildローカル ビルド出力を指すように MCP クライアントを構成します。
{ "mcpServers": { "codebase-context-dumper": { "command": "/path/to/your/local/codebase-context-dumper/build/index.js" // Adjust path } } }
貢献
貢献を歓迎します!開発、デバッグ、新しいバージョンのリリースの詳細については、 CONTRIBUTING.md をご覧ください。
ライセンス
このプロジェクトはApache License 2.0に基づいてライセンスされています。詳細はLICENSEファイルをご覧ください。
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.
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.639MIT
- AlicenseAqualityDmaintenanceA Model Context Protocol (MCP) server that helps large language models index, search, and analyze code repositories with minimal setup141,006MIT

CodeAlive MCPofficial
AlicenseNot gradedqualityBmaintenanceA 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.89MIT- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server that provides VSCode context and filesystem operations for AI assistants.9MIT