# sublinear-time-solver [Health: Active]

**Category:** 🧮 Data Science Tools  
**Repository:** https://github.com/ruvnet/sublinear-time-solver  
**GitHub Stars:** 102  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/sublinear-time-solver

## Description
Sparse linear solvers (Neumann, Jacobi, Gauss-Seidel, conjugate gradient), PageRank and local push as an MCP server, CLI and library. Zero-dependency core: @ruvnet/sublinear-core.

## Tools
Capabilities this server exposes over MCP:

- **solve** — verified iterative solve
- **saveVectorToFile** — basename-only, confined to a state directory
- **solveTrueSublinear** — alias of the `solve` solver since 1.10.0

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

```json
"mcpServers": {
  "sublinear-time-solver": {
    "command": "npx",
    "args": ["-y","sublinear-time-solver"]
  }
}
```

## Documentation

## What sublinear-time-solver does

sublinear-time-solver provides MCP access to sparse linear solvers and graph-ranking algorithms. It can solve systems of equations, estimate an individual value in a solution, calculate PageRank or personalized PageRank, and perform local push computations on graphs. The package is also available as a command-line application and as a JavaScript library; the zero-dependency `@ruvnet/sublinear-core` package contains the reusable mathematical implementation.

The server is suited to sparse problems where each row depends on relatively few other entries. Local operations can focus on the neighborhood relevant to a query, while `solve` returns the complete solution vector. The practical benefit of local computation depends on matrix structure, graph connectivity, accuracy settings, and how far a change propagates.

## How it works

Start the server through an MCP client's standard input/output transport. MCP requests carry matrix, vector, graph, and algorithm parameters to the server, and diagnostics are written to stderr so stdout remains available for JSON-RPC traffic.

Sparse matrices can be supplied in coordinate format, with row and column indexes paired with nonzero values. The solver also supports dense rows and CSR matrices through the core library. Its automatic method selection uses conjugate gradient for symmetric matrices with a positive diagonal and Gauss-Seidel otherwise. Jacobi and Neumann methods are available as explicit choices. Jacobi, Neumann, and Gauss-Seidel require diagonal dominance, while conjugate gradient requires a symmetric positive-definite matrix.

For local personalized PageRank, forward push has a work bound based on damping and epsilon rather than graph size. `estimateEntry` uses random walks to estimate one solution entry and reports a standard error after a one-time matrix check. Residuals and convergence metadata help assess the quality of a full solve.

## Setup and configuration

A compatible MCP client can launch the server with `npx`:

```json
{
  "mcpServers": {
    "sublinear-solver": {
      "command": "npx",
      "args": ["-y", "sublinear-time-solver", "serve"]
    }
  }
}
```

Claude Code can register the same command with `claude mcp add sublinear -- npx -y sublinear-time-solver serve`. Codex uses an `mcp_servers.sublinear` entry in `~/.codex/config.toml`, with `npx` as the command and the `serve` arguments. The CLI can also run directly with commands such as `solve`, `analyze`, and `pagerank`.

## Tools and capabilities

- Solve a complete sparse linear system with `solve`.
- Estimate one solution entry with `estimateEntry` and receive a standard error.
- Calculate global or personalized node scores with `pageRank` and `personalizedPageRank`.
- Compute local personalized PageRank with forward- or backward-push methods.
- Inspect matrices, generate test inputs, and run PageRank through the CLI.
- Choose among automatic selection, Jacobi, Neumann, Gauss-Seidel, and conjugate-gradient solving methods.

The core library also exposes graph construction, CSR conversion, residual reporting, and top-k ranking helpers. Graph scores are normalized to sum to one, and the `damping` option represents the probability of following an edge.

## Limitations and notes

Local computation is most appropriate when matrix rows have few neighbors, diagonal terms dominate, and changes remain local. Full solves return every value and therefore produce output proportional to system size. Check matrix structure with `analyze` and inspect the residual when equation accuracy matters. The quick-start interface uses COO matrices, and duplicate COO entries are summed by the core solver.

_Full upstream README: https://allmcps.com/mcp/sublinear-time-solver/readme_

