Price Per TokenPrice Per Token
Scientific Computation MCP Server

Scientific Computation MCP Server

by Aman-Amith-Shastry

GitHub 2 4,084 uses Remote
0

About

Scientific Computation MCP Server provides a natural language interface for performing mathematical operations using computational libraries like NumPy and SymPy. Users can execute complex linear algebra and calculus operations without directly interacting with Python code. Key features include: - Tensor storage and management with create, view, and delete operations for vectors and matrices - Matrix arithmetic operations including addition, subtraction, multiplication, and scalar scaling - Advanced matrix computations such as inverse, transpose, determinant, and rank calculations - Integration with NumPy and SymPy for robust numerical and symbolic mathematics - Natural language interface that makes scientific computing accessible without programming knowledge

Tools 26

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: np.ndarray: A NumPy array with the specified shape. 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: dict: The in-store dictionary for tensors

delete_tensor

Deletes a tensor from the in-memory tensor store. Args: name (str): The name of the tensor to delete. 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. Args: name_a (str): The name of the first tensor. name_b (str): The name of the second tensor. Returns: np.ndarray: The result of element-wise addition. Raises: ValueError: If the tensor names are not found or shapes are incompatible.

subtract_matrices

Adds two stored tensors element-wise. Args: name_a (str): The name of the first tensor. name_b (str): The name of the second tensor. Returns: np.ndarray: 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. Args: name_a (str): The name of the first tensor. name_b (str): The name of the second tensor. Returns: np.ndarray: 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: np.ndarray: 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: np.ndarray: 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: np.ndarray: 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': np.ndarray - 'eigenvectors': np.ndarray 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': np.ndarray, the orthogonal matrix Q - 'r': np.ndarray, the upper triangular matrix R 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': np.ndarray, the left singular vectors - 's': np.ndarray, the singular values - 'v_t': np.ndarray, the right singular vectors transposed 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: np.ndarray: 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: np.ndarray: 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: np.ndarray: 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: np.ndarray: 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

README

[](https://mseep.ai/app/aman-amith-shastry-scientific-computation-mcp)

Scientific Computation MCP

[](https://smithery.ai/server/@Aman-Amith-Shastry/scientific_computation_mcp)

[](https://mseep.ai/app/5927ad38-70f6-4f5b-9778-e61ec902d735)

[](https://lobehub.com/mcp/aman-amith-shastry-scientific_computation_mcp)

Installation Guide

Claude Desktop

Open Claude Desktop's configuration file (claude_desktop_config.json) and add the following:

  • Mac/Linux:
  • {
      "mcpServers": {
        "numpy_mcp": {
          "command": "npx",
          "args": [
            "-y",
            "@smithery/cli@latest",
            "run",
            "@Aman-Amith-Shastry/scientific_computation_mcp",
            "--key",
            ""
          ]
        }
      }
    }
    

  • Windows:
  • {
      "mcpServers": {
        "numpy_mcp": {
          "command": "cmd",
          "args": [
            "/c",
            "npx",
            "-y",
            "@smithery/cli@latest",
            "run",
            "@Aman-Amith-Shastry/scientific_computation_mcp",
            "--key",
            ""
          ]
        }
      }
    }
    

    Or alternatively, run the following command:

    npx -y @smithery/cli@latest install @Aman-Amith-Shastry/scientific_computation_mcp --client claude --key 
    

    Restart Claude to load the server properly

    Cursor

    If you prefer to access the server through Cursor instead, then run the following command:

    npx -y @smithery/cli@latest install @Aman-Amith-Shastry/scientific_computation_mcp --client cursor --key 
    

    Components of the Server

    Tools

    #### Tensor storage

  • ``create_tensor`: Creates a new tensor based on a given name, shape, and values, and adds it to the tensor store. For the purposes of this server, tensors are vectors and matrices.
  • `view_tensor`: Display the contents of a tensor from the store .
  • `delete_tensor`: Deletes a tensor based on its name in the tensor store.
  • #### Linear Algebra

  • `add_matrices`: Adds two matrices with the provided names, if compatible.
  • `subtract_matrices`: Subtracts two matrices with the provided names, if compatible.
  • `multiply_matrices`: Multiplies two matrices with the provided names, if compatible.
  • `scale_matrix`: Scales a matrix of the provided name by a certain factor, in-place by default.
  • `matrix_inverse`: Computes the inverse of the matrix with the provided name.
  • `transpose`: Computes the transpose of the inverse of the matrix of the provided name.
  • `determinant`: Computes the determinant of the matrix of the provided name.
  • `rank`: Computes the rank (number of pivots) of the matrix of the provided name.
  • `compute_eigen`: Calculates the eigenvectors and eigenvalues of the matrix of the provided name.
  • `qr_decompose`: Computes the QR factorization of the matrix of the provided name. The columns of Q are an orthonormal basis for the image of the matrix, and R is upper triangular.
  • `svd_decompose`: Computes the Singular Value Decomposition of the matrix of the provided name.
  • `find_orthonormal_basis`: Finds an orthonormal basis for the matrix of the provided name. The vectors returned are all pair-wise orthogonal and are of unit length.
  • `change_basis`: Computes the matrix of the provided name in the new basis.
  • #### Vector Calculus

  • `vector_project`: Projects a vector in the tensor store to the specified vector in the same vector space
  • `vector_dot_product`: Computes the dot product of two vectors in the tensor stores based on their provided names.
  • `vector_cross_product`: Computes the cross product of two vectors in the tensor stores based on their provided names.
  • `gradient`: Computes the gradient of a multivariable function based on the input function. Example call: `gradient("x^2 + 2xyz + zy^3")`. Do NOT include the function name (like f(x, y, z) = ...).
  • ``curl`: Computes the curl of a vector field based on the input vector field. The input string must be formatted as a python list. Example call: `curl("[3xy, 2z^4, 2y]"")`.
  • `divergence`Computes the divergence of a vector field based on the input vector field. The input string must be formatted as a python list. Example call: `divergence("[3xy, 2z^4, 2y]"")`.
  • `laplacian`Computes the laplacian of a scalar function (as the divergence of the gradient) or a vector field (where a component-wise laplacian is computed). If a scalar function is the input, it must be input in the same format as in the `gradient` tool. If the input is a vector field, it must be input in the same manner as the `curl/divergence
  • Related MCP Servers

    AI Research Assistant

    AI Research Assistant

    hamid-vakilzadeh

    AI Research Assistant provides comprehensive access to millions of academic papers through the Semantic Scholar and arXiv databases. This MCP server enables AI coding assistants to perform intelligent literature searches, citation network analysis, and paper content extraction without requiring an API key. Key features include: - Advanced paper search with multi-filter support by year ranges, citation thresholds, field of study, and publication type - Title matching with confidence scoring for finding specific papers - Batch operations supporting up to 500 papers per request - Citation analysis and network exploration for understanding research relationships - Full-text PDF extraction from arXiv and Wiley open-access content (Wiley TDM token required for institutional access) - Rate limits of 100 requests per 5 minutes with options to request higher limits through Semantic Scholar

    Web & Search
    12 8
    Linkup

    Linkup

    LinkupPlatform

    Linkup is a real-time web search and content extraction service that enables AI assistants to search the web and retrieve information from trusted sources. It provides source-backed answers with citations, making it ideal for fact-checking, news gathering, and research tasks. Key features of Linkup: - Real-time web search using natural language queries to find current information, news, and data - Page fetching to extract and read content from any webpage URL - Search depth modes: Standard for direct-answer queries and Deep for complex research across multiple sources - Source-backed results with citations and context from relevant, trustworthy websites - JavaScript rendering support for accessing dynamic content on JavaScript-heavy pages

    Web & Search
    2 24
    Math-MCP

    Math-MCP

    EthanHenrickson

    Math-MCP is a computation server that enables Large Language Models (LLMs) to perform accurate numerical calculations through the Model Context Protocol. It provides precise mathematical operations via a simple API to overcome LLM limitations in arithmetic and statistical reasoning. Key features of Math-MCP: - Basic arithmetic operations: addition, subtraction, multiplication, division, modulo, and bulk summation - Statistical analysis functions: mean, median, mode, minimum, and maximum calculations - Rounding utilities: floor, ceiling, and nearest integer rounding - Trigonometric functions: sine, cosine, tangent, and their inverses with degrees and radians conversion support

    Developer Tools
    22 81