DeusData codebase-memory-mcp Dependencies: Runtime Libraries and Build Tools Explained

The DeusData codebase-memory-mcp project depends on a polyglot stack spanning JavaScript/TypeScript (Tree-sitter, React, Vite), Go (analysis utilities, UUID generation), and native C libraries (zstd, yyjson), declared across three package.json files, a go.mod module, and vendored third-party sources.

The DeusData codebase-memory-mcp repository implements a multilingual Memory-Code-Persist (MCP) engine that requires specialized parsing, visualization, and compression capabilities. Its architecture distributes dependencies across multiple languages and tooling layers, from grammar generation utilities to low-level storage backends. Understanding these dependencies is critical for extending language support or debugging build issues in the persistence layer.

JavaScript and TypeScript Dependencies

The project maintains three distinct Node.js packages that handle grammar development and user interface rendering. These packages isolate concerns between the core parsing engine and the visualization frontend.

Tree-sitter Grammar Development Tools

Two internal tooling packages located in tools/tree-sitter-magma/ and tools/tree-sitter-form/ provide custom grammar support for the Magma and Form languages. According to the source analysis, these directories contain package.json files declaring:

  • tree-sitter — The core parsing engine used to instantiate language parsers
  • tree-sitter-cli — Command-line utilities for grammar generation and parser compilation
  • node-fetch — HTTP client for downloading external grammar files (specific to the Magma tool)
  • fs-extra — Extended file-system helpers for the Form tool operations

In tools/tree-sitter-magma/package.json, the dependencies enable runtime grammar fetching and parsing:

// Example from tools/tree-sitter-magma – using tree‑sitter & node-fetch
import Parser from "tree-sitter";
import fetch from "node-fetch";

(async () => {
  const response = await fetch("https://example.com/magma-grammar.js");
  const grammarSrc = await response.text();
  const parser = new Parser();
  parser.setLanguage(await Parser.Language.load(grammarSrc));
  // …use parser to parse Magma source files
})();

React-Based Visualization Interface

The graph-ui/package.json file manages the frontend application that visualizes the codebase memory model. This package relies on modern React tooling:

  • react and react-dom — Core UI framework for component rendering
  • vite — Development server and production bundler
  • typescript — Type-safe JavaScript compilation
  • @types/* packages — Type definitions (e.g., @types/react)
  • vite-plugin-remote — Support for remote module loading

The frontend implements interactive graph components served by Vite, as shown in this typical React component pattern:

// Example from graph-ui – a simple React component using Vite‑served assets
import React from "react";

export const RepoInfo = ({ name }: { name: string }) => (
  <div className="repo-info">
    <h2>{name}</h2>
    <p>Memory‑Code‑Persist analysis ready.</p>
  </div>
);

Go Module Dependencies

The core MCP engine implementation resides in pkg/go/go.mod, which declares Go-based analysis and utility dependencies:

  • golang.org/x/tools — Go analysis utilities for static code examination
  • github.com/google/uuid — UUID generation for repository snapshot identification
  • github.com/mitchellh/mapstructure — Map decoding utilities for configuration parsing

The NewSnapshotID() function demonstrates UUID generation for persistence layer snapshots:

// Example from pkg/go – generating a UUID for a repository snapshot
import (
    "github.com/google/uuid"
    "log"
)

func NewSnapshotID() string {
    id, err := uuid.NewRandom()
    if err != nil {
        log.Fatalf("cannot generate UUID: %v", err)
    }
    return id.String()
}

Native C Libraries and Vendored Components

The internal/cbm/ directory contains low-level C code that handles compression and JSON processing without external runtime dependencies:

  • zstd (vendored) — High-performance compression algorithm for the persistence layer
  • yyjson (vendored) — Fast JSON parsing library

These libraries are statically included in internal/cbm/zstd_store.c rather than fetched via package managers, ensuring consistent behavior across deployment environments.

Vendored Language Grammars

The project includes vendored Tree-sitter grammar files in vendors/* and references additional language definitions in scripts/new-languages.json. These vendored assets enable support for Python, Rust, Go, and other languages without requiring network access during runtime, alongside legacy yacc/lex-style parsers for older language specifications.

Key Dependency Files and How to Read Them

Understanding the DeusData codebase-memory-mcp dependency graph requires examining these specific configuration files:

Summary

  • JavaScript/TypeScript stack: Three package.json files manage Tree-sitter grammar tools (tree-sitter, tree-sitter-cli) and a React/Vite frontend for code visualization.
  • Go implementation: The pkg/go/go.mod file declares analysis tools (golang.org/x/tools), UUID generation (github.com/google/uuid), and map decoding utilities.
  • Native dependencies: The internal/cbm/ directory vendors zstd for compression and yyjson for JSON parsing to support the persistence layer.
  • Language support: Vendored grammars in vendors/* and scripts/new-languages.json provide multi-language parsing without external network dependencies.
  • License compliance: The THIRD_PARTY.md file tracks all third-party components across the polyglot codebase.

Frequently Asked Questions

What package manager does DeusData codebase-memory-mcp use for JavaScript dependencies?

The project uses npm (Node Package Manager) across three distinct packages. Runtime and development dependencies are declared in tools/tree-sitter-magma/package.json, tools/tree-sitter-form/package.json, and graph-ui/package.json. Each package isolates dependencies for its specific concern—grammar development or UI rendering—rather than using a monolithic root package file.

Are the C library dependencies installed via a package manager?

No. The zstd and yyjson libraries are vendored directly into the internal/cbm/ source tree. This approach eliminates external build dependencies and ensures consistent compression behavior across different operating systems and deployment environments. You can examine their usage in internal/cbm/zstd_store.c.

How does the project handle UUID generation for repository snapshots?

The Go module in pkg/go/ imports github.com/google/uuid to generate unique identifiers. The NewSnapshotID() function calls uuid.NewRandom() to create snapshot IDs, with error handling that terminates execution if the system cannot generate sufficient entropy. This ensures every persisted codebase state receives a globally unique identifier.

Where can I find the complete list of third-party licenses for this project?

All third-party components and their corresponding software licenses are documented in THIRD_PARTY.md at the repository root. This file aggregates license information across the JavaScript, Go, and vendored C dependencies, including the Tree-sitter grammars distributed in vendors/* and referenced in scripts/new-languages.json.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →