gauss-mcp
gauss-mcp
GAUSS を Python から操作し、Model Context Protocol 経由で LLM クライアントに公開します。
著者: Dr Merwan Roudane
Windows 上の GAUSS 26.1.1 に対して構築・テスト済みです。
存在する理由
Aptech は AI アシスタント向けのリファレンスを公開しており、より良い GAUSS コードを書けるようにしています。しかし、書くことは実行することではありません。コードを実行できないアシスタントは、それが機能したかどうか、数値が何だったかを決して学習できません。このパッケージはアシスタントを実際の GAUSS インストールに接続し、結果がモデルではなく GAUSS から得られるようにします。
Related MCP server: julia-mcp
GAUSS の操作方法
tgauss を通じて操作します。これは通常の GAUSS インストールに同梱されるターミナルビルドです。GAUSS Engine はより高機能ですが、Aptech からの別途ライセンスキーが必要です。
各呼び出しは独立した tgauss プロセスであるため、通常は何も引き継がれません。ワークスペースは終了時に保存され、開始時に復元されるため、一連の呼び出しは 1 つの連続したセッションのように動作します。ある呼び出しで作成した行列は、次の呼び出しでもそのまま存在します。
インストール
配布名は PyPI 上の gauss-lang-mcp です。単純な gauss-mcp は、Aptech 言語とは無関係なインポートワークフローに関する別のパッケージに既に使用されています。インポート名は gauss_mcp のままです。
pip install "gauss-lang-mcp[pandas]"GAUSS は C:\gauss* と C:\Program Files\gauss* の下で自動的に検出されます。GAUSS_HOME を設定すると、インストール先を選択できます。
ライブラリとしての使用
from gauss_mcp import Gauss
with Gauss() as g:
g.run("""
rndseed 90210;
n = 400;
x = rndn(n, 1);
y = 1.25 + 0.8*x + 0.3*rndn(n, 1);
des = ones(n,1)~x;
bhat = invpd(des'des)*des'y;
""")
print(g.get_matrix("bhat")) # [[1.2489...], [0.8043...]]値は印刷されたテキストではなく CSV として渡されるため、GAUSS の表示丸めではなく完全な倍精度が維持されます:
g.run("pi_like = 3.14159265358979;")
g.get_scalar("pi_like") # 3.14159265358979, every digitpandas は双方向で:
frame = g.to_dataframe(["x", "y"])
g.from_dataframe(frame)MCP サーバーとしての使用
{
"mcpServers": {
"gauss": { "command": "gauss-lang-mcp" }
}
}ツール
ツール | 目的 |
| GAUSS の場所、バージョン、ワークスペースの内容 |
| メインツール。 GAUSS コードを実行し、出力された内容を返す |
| すべてのシンボルとその型と次元 |
| 1 つのシンボルの型と形状 |
| 行列を完全な精度で読み出す |
| 会話で与えられた数値から行列を作成する |
| ファイルとワークスペースの間でデータを移動する |
| 空の状態からやり直す |
エラー
GAUSS は独自のコード、メッセージ、行番号を報告し、それらはそのまま渡されます:
GaussError: G0025: Undefined symbol: 'no_such_thing' on line 2行番号はあなたのコードを指します。ワークスペースの復元は生成されたすべてのプログラムの先頭に付加されるため、GAUSS 自身の番号が 1 行ずれます。このずれは表示前に補正されます。
知っておくべき動作
このパッケージが代わりに処理する GAUSS と tgauss の特性です。それぞれ、推測ではなく実際のインストールで確認されています。
終了コードは常に 0 です。プログラムが成功しても失敗しても変わりません。何も伝えないため、エラーは代わりに stderr から読み取られます。
stdout はクリーンです。 バナーとジョブヘッダーは stderr に出力されるため、プログラム自身の出力をフィルタリングする必要はありません。
GAUSS は実行前にコンパイルします。 どこかに未定義のシンボルがあると、何も実行されず、出力も表示されません。実行時エラーが発生すると、その時点までに生成された出力が残り、その後に "Program execute failed" が続きます。
シンボル名は大文字小文字を区別しません。
Xとxは同じシンボルなので、一方に代入すると他方を上書きします。これは R や Python から来た人には驚きです。子プロセスは stdin を継承してはいけません。 MCP では、サーバーの stdin は JSON-RPC ストリームです。これを継承した
tgaussはプロトコル自体を読み取ってしまいます。すべてのサブプロセス呼び出しで stdin を切り離します。ワークスペースの復元には
loadallではなくuseを使用します。saveallは.gcgを書き出し、use <name>;はそれを読み込むプログラムの最初のステートメントでなければなりません。
テスト
python tests/test_offline.py # 10 tests, no GAUSS needed
python tests/test_live.py # 24 tests, drives a real installationライセンス
MIT。Copyright (c) 2026 Merwan Roudane。
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseAqualityDmaintenanceAllows LLMs to execute Wolfram Language code in a secure, session-based environment by providing an interface to interact with a Wolfram Mathematica kernel.33
- AlicenseAqualityBmaintenanceEnables AI assistants to execute Julia code efficiently with persistent sessions, avoiding startup costs and maintaining state across calls.383MIT
- AlicenseAqualityAmaintenanceEnables AI agents to interact with the Baltamatica scientific computing kernel, executing code, managing variables, and running scripts while preserving workspace state across calls.64MIT
- FlicenseNot gradedqualityCmaintenanceEnables ISLI agents and MCP clients to dispatch natural-language coding and terminal tasks to a locally-installed Claude Code CLI, supporting both one-shot execution and persistent sessions with workspace and security controls.
Related MCP Connectors
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Securely search and manage workspace context files for AI agents and teams.
Cross-agent artifact workspace with provenance across Claude Code, Codex, Cursor, LangGraph.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/merwanroudane/mcp_gauss'
If you have feedback or need assistance with the MCP directory API, please join our Discord server