Skip to main content
Glama
scicompute

scicompute

scicompute

scicompute is a scientific-computation server built around one idea: a named, in-process tensor store. You create tensors under names, then run matrix algebra and vector operations by referring to those names. Everything is computed locally in pure TypeScript — no network, no external math library. One binary serves a command-line interface and a stdio MCP server.

This build is a labelled core subset of the documented tool set: tensor storage, linear algebra, and vector operations (14 tools). Eigen/SVD/QR decompositions, the vector-calculus tools, basis changes, and plotting from the wider documented set are not included; see the build report for the full omission list.

Install

npx @reneturcios/scicompute create-tensor T 2,2 1,2,3,4

Or run the container image:

docker run -i ghcr.io/cloudcorprecords/scicompute

The container defaults to the MCP server (see below). Pass CLI arguments to use it as a CLI instead.

Related MCP server: advanced-math-mcp

CLI

scicompute create-tensor A 2,2 4,7,2,6
scicompute view-tensor A
scicompute determinant A
scicompute --version

The store is in-process, so a single CLI invocation holds its tensors only for its own lifetime; chained operations over several tensors belong to one MCP session, where the store persists across tool calls. Exit codes: 0 on success, 1 for a computation error (such as a shape mismatch or a singular matrix), 2 for usage errors.

Subcommands: create-tensor, view-tensor, delete-tensor, add, subtract, multiply, scale (--no-in-place to leave the stored matrix untouched), transpose, determinant, rank, inverse, dot, cross, project, and mcp.

MCP server

npx -y @reneturcios/scicompute mcp

MCP client configuration:

{
  "mcpServers": {
    "scicompute": {
      "command": "npx",
      "args": ["-y", "@reneturcios/scicompute", "mcp"]
    }
  }
}

Tools

Tool

Input

What it returns

create_tensor

name, shape, values (all required)

The stored tensor: name, shape, flat values, and nested data. values length must equal the shape product.

view_tensor

name (required)

The stored tensor under that name.

delete_tensor

name (required)

Confirmation that the tensor was deleted.

add_matrices

a, b (required), result (optional)

The element-wise sum matrix; stored under result when given.

subtract_matrices

a, b (required), result (optional)

The element-wise difference matrix.

multiply_matrices

a, b (required), result (optional)

The matrix product.

scale_matrix

name, factor (required), in_place (optional)

The scaled matrix. In place by default; stored matrix is untouched when in_place is false.

transpose

name (required), result (optional)

The transposed matrix.

determinant

name (required)

The determinant of a square matrix.

rank

name (required)

The matrix rank, from row-echelon reduction.

matrix_inverse

name (required), result (optional)

The inverse of a square, non-singular matrix.

vector_dot_product

a, b (required)

The dot product of two stored vectors.

vector_cross_product

a, b (required)

The cross product of two stored 3-vectors.

vector_project

a, b (required)

The projection of vector a onto vector b.

Algebra and vector operands are tensor names, not raw data. Matrices are 2-entry shapes and vectors are 1-entry shapes; shape mismatches, missing tensors, non-square determinant/inverse requests, singular inverses, and projections onto the zero vector are all errors rather than silent zeros.

Development

npm install
npm run build   # tsc -> dist/
npm test        # node test runner over test/*.test.ts, no network
npm run dev     # run the CLI from source via tsx

License

MIT — see LICENSE.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      C
      quality
      D
      maintenance
      Exposes a broad mathematics toolkit including symbolic algebra, calculus, numerical methods, linear algebra, statistics, discrete math, graph theory, rendering, and optional GPU acceleration via MCP tools for use with Claude Desktop and other MCP hosts.
      51
      3
      -
    • A
      license
      A
      quality
      C
      maintenance
      Enables advanced mathematics operations including linear algebra, vector math, symbolic computation, and calculus through MCP tools. Designed for use with Claude and other MCP-compatible LLMs.
      19
      2
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Provides a safe scientific runtime for agents with typed math operations including calculus, algebra, statistics, unit conversion, and more via MCP tools.
      4
      Apache 2.0
    • F
      license
      Not graded
      quality
      C
      maintenance
      Exposes MCP tools that run vector math through native compiled Mojo CPU code, computing dot products, scaled vector addition (axpy), and reporting backend, precision, and input-limit details, with finite-number validation and a 10,000-element cap. It runs locally over stdio on Linux/macOS, compiling and caching the native code on first start.
      1
      -