# Sublinear Time Solver MCP server

> Solves sparse linear systems, estimates single entries, and ranks graph nodes via local push and PageRank algorithms.

- Repository: https://github.com/ruvnet/sublinear-time-solver
- Page: https://hostedmcp.org/servers/ruvnet/sublinear-time-solver
- Transport: stdio
- Stars: 94
- License: MIT

## Install

### Claude Code

```sh
claude mcp add sublinear-time-solver -- npx -y goalie
```

### Cursor (`~/.cursor/mcp.json`)

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

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "sublinear-time-solver": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "goalie"
      ]
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"sublinear-time-solver","type":"stdio","command":"npx","args":["-y","goalie"]}'
```

### Claude Desktop (`claude_desktop_config.json`)

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

### Codex

```sh
codex mcp add sublinear-time-solver -- npx -y goalie
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.sublinear-time-solver]
command = "npx"
args = ["-y", "goalie"]
```

### Gemini CLI

```sh
gemini mcp add -s user sublinear-time-solver npx -- -y goalie
```

### Gemini settings.json (`~/.gemini/settings.json`)

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

## Tools (14)

- `solve`
- `estimateEntry`
- `analyzeMatrix`
- `pageRank`
- `verifySparseSolution`
- `coherenceScore`
- `closureIndices`
- `solveOnChangeSublinear`
- `contrastiveSolveOnChangeSublinear`
- `estimateComplexityClass`
- `generateTestVector`
- `saveVectorToFile`
- `solveTrueSublinear`
- `analyzeTrueSublinearMatrix`

## FAQ

### How do I add the sublinear solver to an MCP client?

Configure your client to run npx with the solver's serve subcommand, which starts an MCP server over standard input and output.

### Can I estimate a single entry of the solution instead of solving everything?

Yes, estimateEntry estimates one entry of x by random walks and returns a standard error without cost depending on n.

### What input format does the solver accept for matrices?

It accepts coordinate format (COO), dense rows, or a CsrMatrix, and duplicate COO entries are summed.

### Is there a zero-dependency core package?

Yes, @ruvnet/sublinear-core has no runtime dependencies and can be imported directly in JavaScript.
