About scicompute
scicompute is a local scientific-computation server for working with named tensors through matrix algebra and vector operations. Its TypeScript implementation stores data in-process and offers both a CLI and an MCP server.
Key features
- 01Named in-process tensor storage
- 02Matrix addition, subtraction, and multiplication
- 03Transpose, determinant, rank, and inverse
- 04Vector dot, cross, and projection operations
- 05CLI and stdio MCP server
Use cases
- 01Run matrix calculations on stored tensors
- 02Perform vector operations using named inputs
- 03Expose local scientific computation to MCP clients
MCP support
The stdio MCP server exposes 14 tools for tensor storage, linear algebra, and vector operations. Tensor data remains available across tool calls in one MCP session.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
Tools
14Saved tool list · updated 1w ago
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Name to store the new tensor under. |
| shape | array | Yes | Tensor dimensions, as a non-empty list of positive integers. |
| values | array | Yes | Flat row-major list of finite numbers, with length equal to the product of the shape dimensions. |
Details
From the project READMEscicompute
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.
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.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.