# weavatrix-js [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/sergii-ziborov/weavatrix-js  
**GitHub Stars:** 0  
**npm Downloads (last month):** 290  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/weavatrix-js

## Description
Always-fresh local repo graph: LSP-backed impact, Health, dead code, endpoints, architecture.

## Tools
Capabilities this server exposes over MCP:

- **graph** — `graph_stats`, `get_node`, `get_neighbors`, `query_graph`, `god_nodes`, `shortest_path`,
- **health** — `find_dead_code`, `run_audit` (capability matrix + unused files/exports/dependencies,
- **build** — `rebuild_graph` (reports the structural delta, keeps the prior state as `graph.prev.json`).

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "weavatrix-js": {
    "command": "npx",
    "args": ["-y","weavatrix-js"]
  }
}
```

## Documentation

## What weavatrix-js MCP server does

The weavatrix-js MCP server analyzes a local repository and exposes its derived structure to an MCP-compatible coding agent. The graph can represent files, symbols, imports, calls, inheritance, clone families, health findings, and Git-history coupling. Its tools support repository exploration, source inspection, dependency tracing, endpoint discovery, dead-code review, audit checks, and architecture analysis.

The package is the JavaScript implementation of Weavatrix and includes a TypeScript/JavaScript language-server overlay for more precise references. It is read-only with respect to analyzed source: the engine reads and analyzes code but does not edit the repository. Graph data is stored outside the repository in a per-user registry under `~/.weavatrix/graphs/`.

## How it works

Run the server with a repository root as its positional argument. It derives or updates a reusable graph and exposes bounded views through MCP tools. If a graph is missing, graph and health reads can reconcile the working graph automatically; an agent can also call `rebuild_graph` explicitly. Rebuilds report structural changes and preserve the previous graph as `graph.prev.json`.

The default `offline` profile supports local repository switching and selected cross-repository reads. The `pinned` profile restricts operation to the supplied repository and omits those cross-repository capabilities. A custom comma-separated capability set is also supported.

Language-server precision is enabled by default for new graphs and upgrades confirmed TypeScript and JavaScript references to `EXACT_LSP` when applicable. Set `WEAVATRIX_PRECISION=off` for parser-only operation. Java and Rust analysis does not include a bundled language server and remains parser-derived.

## Setup and configuration

The weavatrix-js MCP server requires Node.js 18 or newer. It can be launched through `npx -y weavatrix-js <repoRoot>`, or from a local clone with Node and the package installation completed. The README provides registrations for Claude Code and Codex CLI, including an optional Codex TOML configuration.

The final positional argument selects a profile when needed, such as `pinned`. Optional repository-root files include `.weavatrixignore` for analysis exclusions, `.weavatrix.json` for HTTP client and wrapper contracts, and `.weavatrix-deps.json` for dependency and entrypoint conventions. Precision budgets can be adjusted with environment variables including `WEAVATRIX_PRECISION_MAX_SYMBOLS`, `WEAVATRIX_PRECISION_PREWARM`, `WEAVATRIX_PRECISION_MAX_REFERENCES`, `WEAVATRIX_PRECISION_MAX_LINKS`, and `WEAVATRIX_PRECISION_TIMEOUT_MS`.

## Tools and capabilities

The server exposes 34 tools across these areas:

- Graph queries: statistics, nodes, neighbors, graph searches, shortest paths, communities, dependents, change impact, history, diffs, and architecture contracts.
- Search and source: repository search, source reads, context bundles, symbol inspection, endpoint listing, and endpoint tracing.
- Health analysis: dead code, audits, duplicate detection, coverage maps, hot-path review, and architecture violations.
- Build and repository selection: graph rebuilding, opening known repositories, and listing registered repositories where the profile permits it.
- Cross-repository analysis: API-contract tracing between local registered graphs in the default offline profile.

`run_audit` can report capability information, unused files, exports and dependencies, missing or duplicate dependencies, typosquats, and lockfile drift. `find_dead_code` focuses on unused code findings. The initial tool list can depend on the selected capability profile.

## Limitations and notes

The graph is derived data rather than a copy of the repository and is kept in the user registry. The server does not modify source files. Test execution is disabled by default; running an existing package test, check, or verify script requires both `run_tests:true` and `WEAVATRIX_ALLOW_TEST_RUNS=1`, while arbitrary commands are rejected.

After upgrading the package, reconnect the MCP server or start a new agent task because some clients cache the tool list for the connection lifetime. Precision analysis has bounded budgets, and repositories that exceed a hard ceiling may be reported as `PARTIAL`. The JavaScript language-server overlay applies to TypeScript and JavaScript; other supported languages do not receive that bundled precision layer.

_Full upstream README: https://allmcps.com/mcp/weavatrix-js/readme_

