Price Per TokenPrice Per Token
Codebase Context Dumper

Codebase Context Dumper

by lex-tools

GitHub 3 6 uses
0

About

Codebase Context Dumper automates the extraction and formatting of project code for Large Language Models. It scans directories, respects .gitignore rules, and structures file contents with clear path markers for seamless LLM integration. Key features: - Recursively scans project directories while respecting .gitignore rules at all levels - Automatically detects and skips binary files - Formats output with file path headers and footers for easy LLM parsing - Supports chunking to handle codebases larger than LLM context windows - Integrates with MCP-compatible clients like Claude Desktop and VS Code

README

[](https://mseep.ai/app/lex-tools-codebase-context-dumper)

codebase-context-dumper MCP Server

[](https://smithery.ai/server/@lex-tools/codebase-context-dumper) [](https://badge.fury.io/js/%40lex-tools%2Fcodebase-context-dumper) [](https://opensource.org/licenses/Apache-2.0)

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 .gitignore rules.
  • 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.
  • 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 .gitignore files at all levels (including nested ones and .git by 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. Requires num_chunks > 1 and chunk_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):

    1. Clone the repository:

        git clone git@github.com:lex-tools/codebase-context-dumper.git
        cd codebase-context-dumper
        
    2. Install dependencies:
        npm install
        
    3. Build the server:
        npm run build
        
    4. Configure 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.

    Related MCP Servers

    AI Research Assistant

    AI Research Assistant

    hamid-vakilzadeh

    AI Research Assistant provides comprehensive access to millions of academic papers through the Semantic Scholar and arXiv databases. This MCP server enables AI coding assistants to perform intelligent literature searches, citation network analysis, and paper content extraction without requiring an API key. Key features include: - Advanced paper search with multi-filter support by year ranges, citation thresholds, field of study, and publication type - Title matching with confidence scoring for finding specific papers - Batch operations supporting up to 500 papers per request - Citation analysis and network exploration for understanding research relationships - Full-text PDF extraction from arXiv and Wiley open-access content (Wiley TDM token required for institutional access) - Rate limits of 100 requests per 5 minutes with options to request higher limits through Semantic Scholar

    Web & Search
    12 8
    Linkup

    Linkup

    LinkupPlatform

    Linkup is a real-time web search and content extraction service that enables AI assistants to search the web and retrieve information from trusted sources. It provides source-backed answers with citations, making it ideal for fact-checking, news gathering, and research tasks. Key features of Linkup: - Real-time web search using natural language queries to find current information, news, and data - Page fetching to extract and read content from any webpage URL - Search depth modes: Standard for direct-answer queries and Deep for complex research across multiple sources - Source-backed results with citations and context from relevant, trustworthy websites - JavaScript rendering support for accessing dynamic content on JavaScript-heavy pages

    Web & Search
    2 24
    Math-MCP

    Math-MCP

    EthanHenrickson

    Math-MCP is a computation server that enables Large Language Models (LLMs) to perform accurate numerical calculations through the Model Context Protocol. It provides precise mathematical operations via a simple API to overcome LLM limitations in arithmetic and statistical reasoning. Key features of Math-MCP: - Basic arithmetic operations: addition, subtraction, multiplication, division, modulo, and bulk summation - Statistical analysis functions: mean, median, mode, minimum, and maximum calculations - Rounding utilities: floor, ceiling, and nearest integer rounding - Trigonometric functions: sine, cosine, tangent, and their inverses with degrees and radians conversion support

    Developer Tools
    22 81