gauss-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@gauss-mcprun a regression of y on x and show the coefficient estimates"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
gauss-mcp
Drive GAUSS from Python, and expose it to LLM clients over the Model Context Protocol.
Author: Dr Merwan Roudane
Built and tested against GAUSS 26.1.1 on Windows.
Why this exists
Aptech publishes a reference for AI assistants so they write better GAUSS, but writing is not running: an assistant that cannot execute the code never learns whether it worked or what the numbers were. This connects an assistant to a real GAUSS installation, so the results come from GAUSS rather than from the model.
Related MCP server: julia-mcp
How it drives GAUSS
Through tgauss, the terminal build that ships with an ordinary GAUSS
installation — not the GAUSS Engine, which is richer but needs a separate
licence key from Aptech.
Each call is its own tgauss process, so nothing would normally carry over.
The workspace is saved on the way out and restored on the way in, which makes a
run of calls behave like one continuous session: a matrix built in one call is
still there in the next.
Install
The distribution is gauss-lang-mcp on PyPI: plain gauss-mcp was already
taken by an unrelated package about import workflows, nothing to do with the
Aptech language. The import name stays gauss_mcp.
pip install "gauss-lang-mcp[pandas]"GAUSS is found automatically under C:\gauss* and C:\Program Files\gauss*.
Set GAUSS_HOME to choose between installations.
Library use
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...]]Values cross as CSV rather than as printed text, so they keep full double precision instead of GAUSS's display rounding:
g.run("pi_like = 3.14159265358979;")
g.get_scalar("pi_like") # 3.14159265358979, every digitpandas both ways:
frame = g.to_dataframe(["x", "y"])
g.from_dataframe(frame)MCP server use
{
"mcpServers": {
"gauss": { "command": "gauss-lang-mcp" }
}
}Tools
Tool | Purpose |
| Where GAUSS is, its version, what the workspace holds |
| Main tool. Run GAUSS code and return what it printed |
| Every symbol with its type and dimensions |
| Type and shape of one symbol |
| Read a matrix out at full precision |
| Create a matrix from numbers given in the conversation |
| Move data between files and the workspace |
| Start again from empty |
Errors
GAUSS reports its own code, message and line, and those are passed through:
GaussError: G0025: Undefined symbol: 'no_such_thing' on line 2The line refers to your code. The workspace restore is prepended to every generated program, which shifts GAUSS's own numbering by a line; that offset is corrected before you see it.
Behaviour worth knowing
Characteristics of GAUSS and of tgauss that this package handles for you,
each confirmed against a live installation rather than assumed.
The exit code is always 0, whether the program succeeded or died. It carries nothing, so errors are read from stderr instead.
stdout is clean. The banner and job header go to stderr, so the program's own output needs no filtering.
GAUSS compiles before it runs. An undefined symbol anywhere means nothing executed and no output appears. A runtime error leaves the output produced up to that point, followed by "Program execute failed".
Symbol names ignore case.
Xandxare the same symbol, so assigning to one overwrites the other. This surprises people arriving from R or Python.The child must not inherit stdin. Under MCP, the server's stdin is the JSON-RPC stream; a
tgaussthat inherited it would read the protocol itself. Every subprocess call detaches stdin.Restoring a workspace uses
use, notloadall.saveallwrites a.gcganduse <name>;must be the first statement of the program that reads it.
Tests
python tests/test_offline.py # 10 tests, no GAUSS needed
python tests/test_live.py # 24 tests, drives a real installationLicence
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