Skip to main content

An MCP server that exposes NumPy functionality

Project description

mcp-numpy

An MCP server that exposes NumPy functionality

PyPI Python Coverage Ruff

Install

pip install mcp-numpy

Usage

As an MCP Server

To use with Claude Desktop or other MCP clients, add to your mcp.json:

{
  "mcpServers": {
    "mcp-numpy": {
      "command": "mcp-numpy"
    }
  }
}

Available Tools

The server exposes the following NumPy functionality as MCP tools:

Array Creation

  • np_array - Create a NumPy array
  • np_zeros - Create zeros array
  • np_ones - Create ones array
  • np_full - Create array filled with value
  • np_arange - Create array with range
  • np_linspace - Create evenly spaced array
  • np_eye - Create identity matrix
  • np_diag - Create diagonal array

Array Manipulation

  • np_reshape - Reshape array
  • np_transpose - Transpose array
  • np_concatenate - Concatenate arrays
  • np_split - Split array
  • np_tile - Tile array
  • np_repeat - Repeat elements
  • np_squeeze - Remove single-dimensional entries
  • np_flatten - Flatten array

Mathematical Operations

  • np_sum, np_mean, np_std, np_var - Summary statistics
  • np_min, np_max, np_argmin, np_argmax - Min/max operations
  • np_dot, np_matmul, np_cross - Matrix operations
  • np_trace, np_cumsum, np_cumprod, np_diff - Array operations

Linear Algebra

  • np_inv - Matrix inverse
  • np_det - Matrix determinant
  • np_eig - Eigenvalues and eigenvectors
  • np_svd - Singular value decomposition
  • np_solve - Solve linear system
  • np_linalg_norm - Matrix/vector norm

Random

  • np_rand - Random floats
  • np_randn - Random normal
  • np_randint - Random integers
  • np_random_choice - Random choice
  • np_shuffle - Shuffle array

Statistics

  • np_percentile, np_quantile - Percentiles/quantiles
  • np_histogram - Histogram
  • np_correlate, np_corrcoef - Correlation

Element-wise Math

  • np_add, np_subtract, np_multiply, np_divide - Arithmetic
  • np_power, np_mod - Power and modulo
  • np_sqrt, np_abs - Basic math
  • np_exp, np_log, np_log10 - Logarithms
  • np_sin, np_cos, np_tan - Trigonometry
  • np_arcsin, np_arccos, np_arctan - Inverse trig
  • np_sinh, np_cosh, np_tanh - Hyperbolic

Array Properties

  • np_shape, np_ndim, np_size, np_dtype - Properties
  • npastype - Type conversion

Development

git clone https://github.com/daedalus/mcp-numpy.git
cd mcp-numpy
pip install -e ".[test]"

# run tests
pytest

# format
ruff format src/ tests/

# lint
ruff check src/ tests/

# type check
mypy src/

mcp-name: io.github.daedalus/mcp-numpy

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_numpy-0.1.0.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_numpy-0.1.0-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file mcp_numpy-0.1.0.tar.gz.

File metadata

  • Download URL: mcp_numpy-0.1.0.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mcp_numpy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 981ac4ce24eb3b4b0747573898cb676d474556c4586859711992a112b0e3b81e
MD5 f7e2480bcd1754021294ec95f3ebd957
BLAKE2b-256 886e80736d5c8017daa8b7dcbf7d51b27c55ae5c3ce316d182125ec033fc3f88

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_numpy-0.1.0.tar.gz:

Publisher: pypi-publish.yml on daedalus/mcp-numpy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_numpy-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mcp_numpy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mcp_numpy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 45127f8649c407d91fa1db2daee75ec8be4c9f12539c6b2786b9be83bb25acac
MD5 a531a482b3aaff7a1e3929e2ea53d217
BLAKE2b-256 cc4158aeda71a65e7f55251f0a2cfe65bae1e54e73b02a80409fe24e9f7335bd

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_numpy-0.1.0-py3-none-any.whl:

Publisher: pypi-publish.yml on daedalus/mcp-numpy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page