关于 MatrixCalculator.net
MatrixCalculator.net MCP 是供需要精确矩阵计算的 MCP 客户端调用的远程服务。它提供六种运算,并返回结构化结果和计算步骤。
主要功能
- 01矩阵加法与减法
- 02矩阵乘法
- 03行列式与逆矩阵
- 04矩阵转置
- 05精确分数运算
- 06结构化分步结果
适用场景
- 01展示矩阵作业的计算步骤
- 02用分数输入计算精确结果
- 03通过 MCP 客户端调用矩阵运算
MCP 相关
该远程 MCP 服务通过 `https://mcp.matrixcalculator.net/mcp` 向兼容客户端提供六种矩阵运算工具。当前公开的 V1 端点无需 API 密钥。
配置
远程服务无需本地安装。选择你使用的客户端,复制配置或使用一键安装。
https://mcp.matrixcalculator.net/mcpclaude mcp add --transport http gamestarry-matrixcalculator https://mcp.matrixcalculator.net/mcp{"mcpServers":{"gamestarry-matrixcalculator":{"type":"http","url":"https://mcp.matrixcalculator.net/mcp"}}}在 Cursor 中打开{"servers":{"gamestarry-matrixcalculator":{"type":"http","url":"https://mcp.matrixcalculator.net/mcp"}}}在 VS Code 中打开{"mcpServers":{"gamestarry-matrixcalculator":{"type":"http","url":"https://mcp.matrixcalculator.net/mcp"}}}{"mcpServers":{"gamestarry-matrixcalculator":{"serverUrl":"https://mcp.matrixcalculator.net/mcp"}}}命令在终端中运行;JSON 粘贴到对应客户端的 MCP 配置后重启。需要授权的服务会在首次连接时提示登录。
工具
6| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| matrixA | array | 是 | 第一个矩阵。 |
| matrixB | array | 是 | 第二个矩阵。 |
详细介绍
MatrixCalculator.net MCP
由 MatrixCalculator.net 提供支持的远程模型上下文协议(MCP)服务,可执行精确的矩阵计算并逐步展示计算过程。
远程 MCP 端点
https://mcp.matrixcalculator.net/mcp
官方 MCP Registry 名称
io.github.gamestarry/matrixcalculator-mcp
当前版本:0.1.0
功能
MatrixCalculator.net MCP 为兼容 MCP 的 AI 客户端提供六种核心矩阵运算。结果保留精确分数,并包含结构化计算步骤,AI 客户端可以将其呈现为简短答案,也可以展开为详细解答。
| 工具 | 描述 |
|---|---|
matrix_add | 将两个维度相同的矩阵相加,每个元素包含一个步骤。 |
matrix_subtract | 用第一个矩阵减去第二个矩阵,每个元素包含一个步骤。 |
matrix_multiply | 使用行乘列步骤,将兼容的矩阵相乘。 |
matrix_determinant | 计算行列式,并提供换行、消元步骤、对角线元素和奇异性信息。 |
matrix_inverse | 使用 Gauss-Jordan 行变换计算逆矩阵,并检测奇异性及验证结果。 |
matrix_transpose | 转置矩阵,并返回每个结果元素对应的源位置。 |
精确值
输入可以是整数、小数或分数字符串:
2
0.5
-3
1/2
-7/4
在可能的情况下,计算会使用精确分数运算。例如:
1/2 + 1/3 = 5/6
而不是将结果转换为近似小数。
请求示例
兼容 MCP 的 AI 客户端可以使用此服务处理以下请求:
Add [[1/2, 2], [3, 4]] and [[1/3, 5], [-1, 6]] and show the steps.
Multiply [[1, 2], [3, 4]] by [[5, 6], [7, 8]].
Find the determinant of [[0, 1/2, 1], [2, 1, 3], [1, 4, 5]] step by step.
Find the inverse of [[0, 2, 1], [1, 1, 0], [2, 3, 4]] and verify the result.
MCP 服务会返回结构化结果数据和详细步骤。连接的 AI 客户端决定向用户展示多少详细信息。
工具输入
matrix_add
{
"matrixA": [["1/2", "2"], ["3", "4"]],
"matrixB": [["1/3", "5"], ["-1", "6"]]
}
matrix_subtract
{
"matrixA": [["5/6", "7"], ["2", "10"]],
"matrixB": [["1/3", "2"], ["-1", "4"]]
}
matrix_multiply
{
"matrixA": [["1/2", "2"], ["3", "4"]],
"matrixB": [["3", "1"], ["4", "2"]]
}
matrix_determinant
{
"matrix": [["0", "1/2", "1"], ["2", "1", "3"], ["1", "4", "5"]]
}
matrix_inverse
{
"matrix": [["0", "2", "1"], ["1", "1", "0"], ["2", "3", "4"]]
}
matrix_transpose
{
"matrix": [["1/2", "2", "3"], ["4", "-1", "5"]]
}
连接
在任何支持远程 MCP 服务的 MCP 客户端中使用以下 Streamable HTTP 端点:
https://mcp.matrixcalculator.net/mcp
当前的公开 V1 端点无需 API 密钥。
健康检查
https://mcp.matrixcalculator.net/health
本地开发
要求:
- Node.js
- npm
- Cloudflare Wrangler
克隆并安装:
git clone https://github.com/gamestarry/matrixcalculator-mcp.git
cd matrixcalculator-mcp
npm install
运行类型检查:
npm run typecheck
启动本地 Worker:
npm run dev
本地 MCP 端点通常为:
http://127.0.0.1:8787/mcp
部署
生产服务运行在 Cloudflare Workers 上。
npm run deploy
生产 MCP 端点:
https://mcp.matrixcalculator.net/mcp
MCP Registry
此服务已发布在官方 MCP Registry 中,名称为:
io.github.gamestarry/matrixcalculator-mcp
Registry 元数据存储在 server.json 中。
项目结构
src/
├─ index.ts
├─ lib/
│ └─ matrix-values.ts
└─ tools/
├─ matrix-add.ts
├─ matrix-subtract.ts
├─ matrix-multiply.ts
├─ matrix-determinant.ts
├─ matrix-inverse.ts
└─ matrix-transpose.ts
关于 MatrixCalculator.net
MatrixCalculator.net 提供矩阵计算器、学习工具以及网页上的逐步矩阵运算。
此 MCP 项目与主网站分开维护,因此 MCP 开发和部署不会影响生产计算器或其计费系统。
评论
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。