@reneturcios/scicompute

中文文档
0.1.0发布于 2026/11/02MITES Module

Scientific computation over a named in-process tensor store: tensor storage, matrix algebra and vector operations, computed locally with no network. One bin serves a small CLI and a stdio MCP server.

原始使用文档
文档目录6 节
  1. Install
  2. CLI
  3. MCP server
  4. Tools
  5. Development
  6. License

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.

版本与发布记录

@reneturcios/scicompute 共发布 2 个版本,首次发布于 2026/11/02;过去 12 个月发布了 2 个版本。

版本发布日期距今
0.1.0latest2026/11/021 天前
0.0.0-stage2026/11/021 天前

关于 @reneturcios/scicompute 的常见问题

@reneturcios/scicompute 是什么?

在命名的进程张量存储上的科学计算:张量存储,矩阵代数和向量运算,在没有网络的情况下本地计算。一个bin提供一个小型CLI和一个studio MCP服务器。

如何安装 @reneturcios/scicompute?

在项目目录运行 npm install @reneturcios/scicompute,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 scicompute,可以用 npx scicompute 直接运行。

@reneturcios/scicompute 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/reneturcios__scicompute 是否存在。

@reneturcios/scicompute 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@reneturcios/scicompute 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@reneturcios/scicompute 可以商用吗?

@reneturcios/scicompute 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@reneturcios/scicompute 还在维护吗?

最新版本 0.1.0 发布于 2026/11/02(1 天前);至今共发布 2 个版本,其中过去 12 个月发布了 2 个;首次发布于 2026/11/02。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。