Scientific Computation MCP Server

This MCP server enables users to perform scientific computations regarding linear algebra and vector calculus through natural language.

От сообщества: Добавлен пользователем или импортирован; проверьте владельца перед подключениемРаботаетБез входаГлобальныйБесплатноТолько чтение

Что умеет

  • Create Tensor: Creates a NumPy array (matrix) with a specified shape and values. Args: shape (list[int]): The shape of the resulting array as a tuple(e.g., (2, 3)). values (list[float]): A flat list o
  • View Tensor: Returns an immutable view of a previously stored NumPy tensor from the in-memory tensor store. Args: name (str): The name of the tensor as stored in the in-store dictionary Returns: Tenso
  • Delete Tensor: Deletes a tensor from the in-memory tensor store. Args: name (str): The name of the tensor to delete. Returns: str: Confirmation that the tensor was removed. Raises: ValueError: If the

Какие данные видит

Нужен ли аккаунт

Не нужен: сервер работает без входа

This MCP server enables users to perform scientific computations regarding linear algebra and vector calculus through natural language. The server is designed to bridge the gap between users and powerful computational libraries such as NumPy and SymPy. Its goal is to make scientific computing more accessible.

Список инструментов сервера (26)

Технические названия из tools/list. Нужны только разработчикам.

create_tensor Creates a NumPy array (matrix) with a specified shape and values. Args: shape (list[int]): The shape of the resulting array as a tuple(e.g., (2, 3)). values (list[float]): A flat list of values to populate the array. name (str): The name of the tensor to be stored. Returns: Tensor: The stored tensor as nested lists. Raises: ValueError: If the number of values does not match the product of the shape.
view_tensor Returns an immutable view of a previously stored NumPy tensor from the in-memory tensor store. Args: name (str): The name of the tensor as stored in the in-store dictionary Returns: Tensor: The stored tensor as nested lists. Raises: ValueError: If the tensor name is not found in the store.
delete_tensor Deletes a tensor from the in-memory tensor store. Args: name (str): The name of the tensor to delete. Returns: str: Confirmation that the tensor was removed. Raises: ValueError: If the tensor name is not found in the store or if an error occurs during deletion.
add_matrices Adds two stored tensors element-wise, computing name_a + name_b. Args: name_a (str): The name of the first tensor. name_b (str): The name of the second tensor. Returns: Tensor: The result of element-wise addition. Raises: ValueError: If the tensor names are not found or shapes are incompatible.
subtract_matrices Subtracts one stored tensor from another element-wise, computing name_a - name_b. Args: name_a (str): The name of the tensor to subtract from (the minuend). name_b (str): The name of the tensor to subtract (the subtrahend). Returns: Tensor: The result of element-wise subtraction. Raises: ValueError: If the tensor names are not found or shapes are incompatible.
multiply_matrices Performs matrix multiplication between two stored tensors, computing name_a @ name_b. Args: name_a (str): The name of the first tensor. name_b (str): The name of the second tensor. Returns: Tensor: The result of matrix multiplication. Raises: ValueError: If either tensor is not found or their shapes are incompatible.
scale_matrix Scales a stored tensor by a scalar factor. Args: name (str): The name of the tensor to scale. scale_factor (float): The scalar value to multiply the tensor by. in_place (bool): If True, updates the stored tensor; otherwise, returns a new scaled tensor. Returns: Tensor: The scaled tensor. Raises: ValueError: If the tensor name is not found in the store.
matrix_inverse Computes the inverse of a stored square matrix. Args: name (str): The name of the tensor to invert. Returns: Tensor: The inverse of the matrix. Raises: ValueError: If the matrix is not found, is not square, or is singular (non-invertible).
transpose Computes the transpose of a stored tensor. Args: name (str): The name of the tensor to transpose. Returns: Tensor: The transposed tensor. Raises: ValueError: If the tensor name is not found in the store.
determinant Computes the determinant of a stored square matrix. Args: name (str): The name of the matrix. Returns: float: The determinant of the matrix. Raises: ValueError: If the matrix is not found or is not square.
rank Computes the rank of a stored tensor. Args: name (str): The name of the tensor. Returns: int | list[int]: The rank of the matrix. Raises: ValueError: If the tensor name is not found in the store.
compute_eigen Computes the eigenvalues and right eigenvectors of a stored square matrix. Args: name (str): The name of the tensor to analyze. Returns: dict: A dictionary with keys: - 'eigenvalues': list of eigenvalues - 'eigenvectors': list of right eigenvectors, one per column of the result Raises: ValueError: If the tensor is not found or is not a square matrix.
qr_decompose Computes the QR decomposition of a stored matrix. Decomposes the matrix A into A = Q @ R, where Q is an orthogonal matrix and R is an upper triangular matrix. Args: name (str): The name of the matrix to decompose. Returns: dict: A dictionary with keys: - 'q': the orthogonal matrix Q, as nested lists - 'r': the upper triangular matrix R, as nested lists Raises: ValueError: If the matrix is not found or decomposition fails.
svd_decompose Computes the Singular Value Decomposition (SVD) of a stored matrix. Decomposes the matrix A into A = U @ S @ V^T, where U and V^T are orthogonal matrices, and S is a diagonal matrix of singular values. Args: name (str): The name of the matrix to decompose. Returns: dict: A dictionary with keys: - 'u': the left singular vectors, as nested lists - 's': the singular values, as a flat list - 'v_t': the right singular vectors transposed, as nested lists Raises: ValueError: If the matrix is not found or decomposition fails.
find_orthonormal_basis Finds an orthonormal basis for the column space of a stored matrix using QR decomposition. Args: name (str): The name of the matrix. Returns: list[list[float]]: A list of orthonormal basis vectors. Raises: ValueError: If the matrix is not found or decomposition fails.
change_basis Changes the basis of a stored square matrix. Args: name (str): Name of the matrix in the tensor store. new_basis (list[list[float]]): Columns are new basis vectors. Returns: Tensor: Representation of the matrix in the new basis. Raises: ValueError: If the matrix name is not found or non-invertible.
vector_project Projects a stored vector onto another vector. Args: name (str): Name of the stored vector to project. new_vector (list[float]): The vector to project onto. Returns: Tensor: The projection result vector. Raises: ValueError: If the vector name is not found or projection fails.
vector_dot_product Computes the dot product between two stored vectors. Args: name_a (str): Name of the first vector in the tensor store. name_b (str): Name of the second vector in the tensor store. Returns: float: Scalar result of the dot product. Raises: ValueError: If either vector is not found or if the dot product computation fails.
vector_cross_product Computes the cross product of two stored vectors. Args: name_a (str): Name of the first vector in the tensor store. name_b (str): Name of the second vector in the tensor store. Returns: Tensor: Vector result of the cross product. Raises: ValueError: If either vector is not found or if the cross product computation fails.
gradient Computes the symbolic gradient of a scalar function. Args: f_str (str): A string representing a scalar function (e.g., "x**2 + y*z"). Returns: str: A string representation of the symbolic gradient as a vector.
curl Computes the symbolic curl of a vector field, optionally evaluated at a point. Args: f_str (str): A string representing the vector field in list format (e.g., "[x+y, x, 2*z]"). point (list[float], optional): A list of coordinates [x, y, z] to evaluate the curl numerically. Returns: dict: A dictionary with the symbolic curl as a string, and optionally the evaluated vector.
divergence Computes the symbolic divergence of a vector field, optionally evaluated at a point. Args: f_str (str): A string representing the vector field in list format (e.g., "[x+y, x, 2*z]"). point (list[float], optional): A list of coordinates [x, y, z] to evaluate the divergence numerically. Returns: dict: A dictionary with the symbolic divergence as a string, and optionally the evaluated scalar.
laplacian Computes the Laplacian of a scalar or vector field symbolically. Args: f_str (str): Scalar function as "x**2 + y*z" or vector "[Fx, Fy, Fz]". is_vector (bool): Set True to compute vector Laplacian. Returns: str: Symbolic result of the Laplacian—scalar or list of 3 components.
directional_deriv Computes symbolic directional derivative of scalar field along a vector direction. Args: f_str (str): Expression like "x*y*z". u (list[float]): Direction vector [vx, vy, vz]. unit (bool): True if u should be normalized before calculating directional derivative. Set to True by default. Returns: str: Symbolic result as string.
plot_vector_field Plots a 3D vector field from a string "[u(x,y,z), v(x,y,z), w(x,y,z)]" Args: f_str: string representation of 3D field, e.g. "[z, -y, x]". bounds: (xmin, xmax, ymin, ymax, zmin, zmax) n: grid resolution per axis Returns: Displayed Matplotlib 3D quiver plot (no image return needed)
plot_function Plots a 2D or 3D mathematical function from a symbolic expression string. Args: expr_str: string representation of a function in x or x and y, e.g. "x**2" or "sin(sqrt(x**2 + y**2))" xlim: (xmin, xmax) range for x-axis ylim: (ymin, ymax) range for y-axis (used in 2D or 3D) grid: resolution of the plot grid Returns: A rendered Image of the function using Matplotlib. - 2D plot if the expression contains only x - 3D surface plot if the expression contains both x and y