Dependencies Listed in the package.json for DeusData/codebase-memory-mcp: CLI vs UI Analysis
The DeusData/codebase-memory-mcp repository maintains two distinct package.json files: pkg/npm/package.json declares zero runtime npm dependencies and only provides the binary entry point, while graph-ui/package.json contains the full React and Three.js dependency tree including @react-three/fiber, react, tailwindcss, and vite for the interactive visualization interface.
The DeusData/codebase-memory-mcp project is a mixed-language system combining a high-performance C/C++ core with a Node.js distribution wrapper and a React-based web UI. Understanding the dependencies listed in the package.json files is essential for developers contributing to the build system or extending the graph visualization capabilities.
Core CLI package.json (pkg/npm/package.json)
Zero Runtime Dependencies
The pkg/npm/package.json file serves exclusively as metadata for the npm distribution wrapper. Unlike typical Node.js projects, this file contains no runtime dependencies in its dependencies field. The package defines only a "bin" entry pointing to bin.js and a post-install script (install.js) to handle binary placement.
According to the source analysis, the CLI entry point at bin.js does not import any external npm packages. It uses only Node.js built-in modules to spawn the underlying native binary:
#!/usr/bin/env node
// bin.js – entry point defined in pkg/npm/package.json
import { spawn } from 'child_process';
const mcp = spawn('mcp', process.argv.slice(2));
This architectural choice ensures the core codebase-memory-mcp functionality remains dependency-free at the JavaScript layer, with all heavy lifting performed by the compiled static binary.
Graph UI package.json (graph-ui/package.json)
Frontend Runtime Dependencies
The graph-ui/package.json file contains the complete dependency Manifest for the React Three Fiber visualization interface. When the server is built with the --with-ui flag, this package supplies the interactive web components served via src/ui/httpd.c and src/ui/http_server.c.
The dependencies listed in this file include the React ecosystem and 3D rendering libraries:
reactandreact-dom– Core UI framework@react-three/fiber– React renderer for Three.js@react-three/drei– Essential Three.js helper components- Three.js – Underlying 3D graphics library
Build and Development Tooling
The UI package also specifies modern build tooling required to bundle the application:
vite– Build tool and development servertailwindcss– Utility-first CSS framework
These dependencies are bundled into the release archives only when building the -ui variant, keeping the standard binary distribution lightweight.
The UI components consume these dependencies directly in source files like src/main.jsx:
import { Canvas } from '@react-three/fiber';
import { OrbitControls } from '@react-three/drei';
import { Suspense } from 'react';
import { Scene } from './Scene';
export default function App() {
return (
<Canvas>
<Suspense fallback={null}>
<Scene />
<OrbitControls />
</Suspense>
</Canvas>
);
}
Vendored C/C++ Dependencies (Non-NPM)
While the package.json files manage only the JavaScript layer, the C/C++ core relies on vendored libraries rather than npm or other package managers. As documented in THIRD_PARTY.md, these static dependencies reside in vendored/ and internal/cbm/vendored/ directories:
- Tree-sitter runtime (
internal/cbm/vendored/ts_runtime/) - SQLite 3 (
vendored/sqlite3/) - mimalloc (
vendored/mimalloc/) - yyjson (
vendored/yyjson/) - LZ4 (
internal/cbm/vendored/lz4/) - Zstandard (
internal/cbm/vendored/zstd/)
These libraries compile directly into the static MCP binary, meaning the project requires no system-installed packages or additional package manager files like requirements.txt or Cargo.toml.
Summary
pkg/npm/package.jsoncontains metadata only, with zero runtime npm dependencies; the CLI wrapper uses only Node.js built-in modulesgraph-ui/package.jsonlists the full React/Three.js stack including@react-three/fiber,react,tailwindcss, andvitefor the optional web UI- All C/C++ dependencies are vendored in
vendored/directories, not managed by npm - The build system in
Makefile.cbmcompiles third-party code statically, eliminating external dependency requirements for the core binary
Frequently Asked Questions
Does the codebase-memory-mcp CLI require npm install to run?
No. The pkg/npm/package.json explicitly declares no runtime dependencies. The npm package serves only as a distribution mechanism that downloads the platform-specific binary via the post-install script. Once installed, the CLI runs as a standalone native executable without requiring any Node.js modules.
What 3D visualization libraries does the graph-ui use?
The graph-ui interface relies on React Three Fiber (@react-three/fiber) as the React renderer for Three.js, with @react-three/drei providing essential helper components like OrbitControls. These dependencies enable the interactive 3D code graph visualization served by the C-based HTTP server when built with --with-ui.
Why are there no Python or Rust dependencies in the package.json files?
The codebase-memory-mcp project follows a vendored-source architecture for its C/C++ components. While the repository includes build scripts like scripts/extract_nomic_vectors.py and references hybrid LSP implementations, these do not translate into package.json dependencies. The project intentionally avoids runtime dependencies on external language ecosystems, bundling all required C/C++ libraries directly into the static binary.
Where are semantic vector embeddings stored if not listed in package.json?
The nomic-embed-code token embeddings used for semantic search are stored as embedded model data in the vendored/nomic/ directory (Apache-2.0 licensed), not as npm packages. These vectors are generated by scripts/extract_nomic_vectors.py at build time and compiled into the binary, allowing the semantic search engine in internal/cbm/semantic/ to function without runtime network dependencies.
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:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →