mcpField
S
scicompute

scicompute

Local
github.com/CloudCorpRecordsScience & Education0Updated 1w ago

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

  1. 01Named in-process tensor storage
  2. 02Matrix addition, subtraction, and multiplication
  3. 03Transpose, determinant, rank, and inverse
  4. 04Vector dot, cross, and projection operations
  5. 05CLI and stdio MCP server

Use cases

  1. 01Run matrix calculations on stored tensors
  2. 02Perform vector operations using named inputs
  3. 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.

mcp.json · Universal config
{
"mcpServers": {
"cloudcorprecords-scicompute": {
"command": "npx",
"args": [
"-y",
"@reneturcios/scicompute"
]
}
}
}
Run commandnpx -y @reneturcios/scicompute

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@reneturcios/scicompute0.1.0
ocighcr.io/cloudcorprecords/scicompute:0.1.0

Tools

14

Saved tool list · updated 1w ago

ParameterTypeRequiredDescription
namestringYesName to store the new tensor under.
shapearrayYesTensor dimensions, as a non-empty list of positive integers.
valuesarrayYesFlat row-major list of finite numbers, with length equal to the product of the shape dimensions.

Details

From the project README

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.

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
ToolInputWhat it returns
create_tensorname, shape, values (all required)The stored tensor: name, shape, flat values, and nested data. values length must equal the shape product.
view_tensorname (required)The stored tensor under that name.
delete_tensorname (required)Confirmation that the tensor was deleted.
add_matricesa, b (required), result (optional)The element-wise sum matrix; stored under result when given.
subtract_matricesa, b (required), result (optional)The element-wise difference matrix.
multiply_matricesa, b (required), result (optional)The matrix product.
scale_matrixname, factor (required), in_place (optional)The scaled matrix. In place by default; stored matrix is untouched when in_place is false.
transposename (required), result (optional)The transposed matrix.
determinantname (required)The determinant of a square matrix.
rankname (required)The matrix rank, from row-echelon reduction.
matrix_inversename (required), result (optional)The inverse of a square, non-singular matrix.
vector_dot_producta, b (required)The dot product of two stored vectors.
vector_cross_producta, b (required)The cross product of two stored 3-vectors.
vector_projecta, 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

Markdown supported

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.