NumPy Calculator
NumPy MCP サーバー
NumPy による数値計算用のモデルコンテキストプロトコル (MCP) サーバー
NumPyを用いた数学的な計算と演算を提供するモデルコンテキストプロトコル(MCP)サーバー。このサーバーは、標準化されたMCPインターフェースを通じて様々な数学ツールを公開しており、Claudeやその他のMCP互換LLMを介して直接数値計算を実行することが容易になります。
特徴
基本的な算術演算(加算)
線形代数計算(行列の乗算、固有値分解)
統計分析(平均、中央値、標準偏差、最小値、最大値)
多項式フィッティング
Related MCP server: mcp-numpy
インストール
Claude Desktop によるクイックセットアップ
最も早く始める方法は、このサーバーを Claude Desktop に直接インストールすることです。
# Install the server in Claude Desktop
mcp install server.py --name "NumPy Calculator"手動インストール
このプロジェクトは依存関係の管理にUVを使用しています。インストールするには:
# Install UV if you haven't already
curl -LsSf https://astral.sh/uv/install.sh | sh
# Clone the repository
git clone https://github.com/yourusername/math-mcp.git
cd math-mcp
# Create virtual environment and install dependencies
uv venv
source .venv/bin/activate # On Unix/macOS
# or
# .venv\Scripts\activate # On Windows
uv pip install -r requirements.txt使用法
開発テスト
MCP Inspector を使用してサーバーをローカルでテストします。
mcp dev server.pyクロードデスクトップ統合
Claude Desktop にサーバーをインストールします。
mcp install server.py --name "NumPy Calculator"サーバーはClaude Desktopの「NumPy Calculator」で利用できるようになります。
たとえば、Claude に数学演算を実行してもらうことでこれを使用できます。
「行列[[1, 2], [3, 4]]の固有値を計算する」
「[1, 2, 3, 4, 5]の平均と標準偏差を求めよ」
「行列[[1, 0], [0, 1]]と[[2, 3], [4, 5]]を乗算します」
直接実行
高度な使用法またはカスタム展開の場合:
python server.py
# or
mcp run server.py利用可能な機能
サーバーは、MCP インターフェイスを通じて次の数学関数を提供します。
基本的な算術
add(a: int, b: int) -> int: 2つの整数を加算する
線形代数
matrix_multiply(matrix_a: List[List[float]], matrix_b: List[List[float]]) -> List[List[float]]: 2つの行列を乗算するeigen_decomposition(matrix: List[List[float]]) -> Tuple[List[float], List[List[float]]]: 正方行列の固有値と固有ベクトルを計算する
統計
statistical_analysis(data: List[float]) -> dict[str, float]: 以下のデータを含むデータセットの基本統計を計算します。平均
中央値
標準偏差
最小値
最大値
データ分析
polynomial_fit(x: List[float], y: List[float], degree: int = 2) -> List[float]: 指定された次数の多項式を与えられたデータポイントに適合させる
発達
プロジェクト構造
math-mcp/
├── requirements.txt
├── README.md
└── server.pyコード品質
このプロジェクトは厳格なコード品質基準に準拠しています。
コードベース全体の型ヒント
Googleスタイルに準拠した包括的なドキュメント文字列
数値演算のエラー処理
依存関係
NumPy: 数値計算と線形代数演算用
FastMCP: モデルコンテキストプロトコルサーバ実装用
ライセンス
このプロジェクトは MIT ライセンスに基づいてライセンスされています。
謝辞
優れた科学計算ライブラリを提供するNumPyチーム
標準化された LLM インタラクションを可能にするモデル コンテキスト プロトコル (MCP)
This server cannot be deployed
Maintenance
Related MCP Connectors
This MCP server enables users to perform scientific computations regarding linear algebra and vect…
Educational MCP server with 17 math/stats tools, visualizations, and persistent workspace
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Related MCP Servers
- AlicenseAqualityCmaintenanceA Model Context Protocol server that provides basic mathematical and statistical functions to LLMs, enabling them to perform accurate numerical calculations through a simple API.1320 npm186MIT
- AlicenseBqualityCmaintenanceAn MCP server that exposes NumPy functionality as tools, enabling array creation, manipulation, mathematical operations, linear algebra, random sampling, statistics, and element-wise math through natural language.72MIT
- AlicenseAqualityCmaintenanceA Model Context Protocol server that exposes 8 mathematical tools (arithmetic, algebra, calculus, matrix operations, statistics, probability, unit conversions) to any MCP-compatible AI agent, enabling mathematical computations without code.88 npm1MIT
- AlicenseAqualityBmaintenanceA Model Context Protocol server providing mathematical and scientific computing capabilities via NumPy, pandas, SciPy, and Matplotlib, with 19 tools for linear algebra, statistics, numerical methods, data processing, and plotting.19MIT