Command Palette

Search for a command to run...

UnylyUnyly
Весь каталог

Gauss Lang

БесплатноНе проверен

Drive GAUSS from Python, and expose it to LLM clients over MCP

GitHubEmbed

Описание

Drive GAUSS from Python, and expose it to LLM clients over MCP

README

Licence Python Platform GAUSS

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.

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 digit

pandas both ways:

frame = g.to_dataframe(["x", "y"])
g.from_dataframe(frame)

MCP server use

{
  "mcpServers": {
    "gauss": { "command": "gauss-lang-mcp" }
  }
}

Tools

Tool Purpose
gauss_status Where GAUSS is, its version, what the workspace holds
run_gauss_code Main tool. Run GAUSS code and return what it printed
list_symbols Every symbol with its type and dimensions
describe_symbol Type and shape of one symbol
get_matrix Read a matrix out at full precision
put_matrix Create a matrix from numbers given in the conversation
read_csv / write_csv Move data between files and the workspace
clear_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 2

The 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. X and x are 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 tgauss that inherited it would read the protocol itself. Every subprocess call detaches stdin.
  • Restoring a workspace uses use, not loadall. saveall writes a .gcg and use <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 installation

Licence

MIT. Copyright (c) 2026 Merwan Roudane.

from github.com/merwanroudane/mcp_gauss

Установить Gauss Lang в Claude Desktop, Claude Code, Cursor

Рекомендуется · одна команда, все IDE
unyly install gauss-lang

Ставит в Claude Desktop, Claude Code, Cursor и VS Code — сам разбирается с npx, uvx и сборкой из исходников.

Впервые? Поставь CLI: curl -fsSL https://unyly.org/install | sh

Или настроить вручную

Выполни в терминале:

claude mcp add gauss-lang -- uvx gauss-lang-mcp

Пошаговые гайды: как установить Gauss Lang

FAQ

Gauss Lang MCP бесплатный?

Да, Gauss Lang MCP бесплатный — установка в пару кликов через Unyly без оплаты.

Нужен ли API-ключ для Gauss Lang?

Нет, Gauss Lang работает без API-ключей и переменных окружения.

Gauss Lang — hosted или self-hosted?

Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.

Как установить Gauss Lang в Claude Desktop, Claude Code или Cursor?

Открой Gauss Lang на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.

Похожие MCP

Notion

Read and write pages in your workspace

Notionавтор: Notion

Linear

Issues, cycles, triage — from Claude

Linearавтор: Linear
Pro

Google Drive

Search and read your Drive files

Googleавтор: Google

mindsdb/mindsdb

Connect and unify data across various platforms and databases with [MindsDB as a single MCP server](https://docs.mindsdb.com/mcp/overview).

mindsdbавтор: mindsdb

fulcradynamics/fulcra-context-mcp

MCP server for accessing personal health and biometric data including sleep stages, heart rate, HRV, glucose, workouts, calendar, and location via the Fulcra Li

fulcradynamicsавтор: fulcradynamics

aymericzip/intlayer

A MCP Server that enhance your IDE with AI-powered assistance for Intlayer i18n / CMS tool: smart CLI access, access to the docs.

aymericzipавтор: aymericzip

rinadelph/Agent-MCP

A framework for creating multi-agent systems using MCP for coordinated AI collaboration, featuring task management, shared context, and RAG capabilities.

rinadelphавтор: rinadelph

WhenLabs-org/when

Developer toolkit: auto-detect stack for AI context files, catch port conflicts, validate .env schemas, spot docs drift, audit dependency licenses, and time cod

WhenLabs-orgавтор: WhenLabs-org

Beltran12138/wecom-docs-mcp-server

WeCom (Enterprise WeChat) document operations via MCP: create, read, and edit Docs and Smartsheets (9 tools). Fills the doc-CRUD gap — existing WeCom MCP server

Beltran12138автор: Beltran12138

madbonez/caldav-mcp

Universal MCP server for CalDAV protocol integration. Works with any CalDAV-compatible calendar server including Yandex Calendar, Google Calendar (via CalDAV),

madbonezавтор: madbonez

Compare Gauss Lang with

Не уверен что выбрать?

Найди свой стек за 60 секунд

Автор?

Embed-бейдж для README

Похожее

Все в категории productivity