weavatrix-refactor-js

v0.1.6
io.github.sergii-ziborov/weavatrix-refactor-js Checked 9 hours ago Published 3 months ago

Transactional refactoring MCP with 11 evidence-backed tools, hash-bound previews, and rollback.

Values you need

VariableWhat it is
WEAVATRIX_ALLOW_SOURCE_EDITSoptional Set to 1 to authorize apply_edit_plan and rollback to write source files; unset, the refactor tools stay preview-only
WEAVATRIX_REFACTOR_HOMEoptional Optional directory for the rollback snapshot store; defaults to a per-repo location
WEAVATRIX_PRECISIONoptional Core semantic precision: lsp (default) or off

npm (npx) discovery passed

Requires Node.js 18+

Run in a terminal
claude mcp add weavatrix-refactor-js -- npx -y --package=weavatrix-refactor-js@0.1.6 weavatrix-refactor-js-mcp '<repoRoot>'
Add to claude_desktop_config.json
{
  "mcpServers": {
    "weavatrix-refactor-js": {
      "args": [
        "-y",
        "--package=weavatrix-refactor-js@0.1.6",
        "weavatrix-refactor-js-mcp",
        "<repoRoot>"
      ],
      "command": "npx"
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "weavatrix-refactor-js": {
      "args": [
        "-y",
        "--package=weavatrix-refactor-js@0.1.6",
        "weavatrix-refactor-js-mcp",
        "<repoRoot>"
      ],
      "command": "npx"
    }
  }
}
Add to .vscode/mcp.json
{
  "servers": {
    "weavatrix-refactor-js": {
      "args": [
        "-y",
        "--package=weavatrix-refactor-js@0.1.6",
        "weavatrix-refactor-js-mcp",
        "<repoRoot>"
      ],
      "command": "npx",
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.weavatrix-refactor-js]
command = "npx"
args = ["-y", "--package=weavatrix-refactor-js@0.1.6", "weavatrix-refactor-js-mcp", "<repoRoot>"]

For AI agents

  1. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  2. Restart or reload the client so it starts the server.
  3. Verify: the server should expose these tools: graph_stats, get_node, get_neighbors, query_graph, god_nodes, shortest_path, get_dependents, change_impact, ….
  4. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json