New advertisers: 50% off your first month with code FIRSTMONTHSee slots
ondrejlapes avatar

Gretl MCP

ondrejlapes/gretlmcp

Runs Gretl and Hansl econometrics scripts, commands, and package builds, with GUI launch.

GitHub stars
3
tools
12
transport
STDIO
env vars
4
last updated
May 15, 2026
View on GitHub

What it does

  • Runs work through gretl_run_script, gretl_run_commands, and gretl_run_script_file, which return output, artifacts, and GUI details
  • Manages packages with gretl_package and gretl_make_package, and inspects installed commands with gretl_capabilities and gretl_help
  • Runs dataset summaries and OLS with gretl_dataset_summary and gretl_ols on local files only; URLs are rejected
  • Requires a local Gretl 2026b or newer install with gretlcli and runs over stdio, with safe mode on by default
  • Designed for econometrics teaching, forecasting comparisons, and generating Hansl workflows from prompts

Tools

12 tools

Public tool metadata for what this MCP can expose to an agent.

gretl_versionChecks Gretl availability.

Checks Gretl availability.

No parameter schema in public metadata yet.

gretl_gui_versionChecks Gretl GUI availability.

Checks Gretl GUI availability.

No parameter schema in public metadata yet.

gretl_gui_launchLaunches the visible Gretl desktop GUI.

Launches the visible Gretl desktop GUI.

No parameter schema in public metadata yet.

gretl_capabilitiesLists installed Gretl commands, functions, and package help.

Lists installed Gretl commands, functions, and package help.

No parameter schema in public metadata yet.

gretl_run_scriptRuns a Gretl/Hansl script and requires GUI opening by default.

Runs a Gretl/Hansl script and requires GUI opening by default.

No parameter schema in public metadata yet.

gretl_run_commandsRuns raw Gretl command lines and requires GUI opening by default.

Runs raw Gretl command lines and requires GUI opening by default.

No parameter schema in public metadata yet.

gretl_run_script_fileRuns an existing local `.inp` file and requires GUI opening by default.

Runs an existing local `.inp` file and requires GUI opening by default.

No parameter schema in public metadata yet.

gretl_packageRuns native `pkg` actions such as install, query, run-sample, unload, remove, and index.

Runs native `pkg` actions such as install, query, run-sample, unload, remove, and index.

No parameter schema in public metadata yet.

gretl_make_packageBuilds `.gfn` or `.zip` function packages with `makepkg`.

Builds `.gfn` or `.zip` function packages with `makepkg`.

No parameter schema in public metadata yet.

gretl_helpReturns Gretl help for a command.

Returns Gretl help for a command.

No parameter schema in public metadata yet.

gretl_dataset_summaryOpens a local dataset, returns summary statistics, and requires GUI opening by default.

Opens a local dataset, returns summary statistics, and requires GUI opening by default.

No parameter schema in public metadata yet.

gretl_olsOpens a local dataset, estimates an OLS model, and requires GUI opening by default.

Opens a local dataset, estimates an OLS model, and requires GUI opening by default.

No parameter schema in public metadata yet.

Configuration

GRETL_CLI

Optional explicit path to gretlcli or gretlcli.exe.

GRETL_GUI

Optional explicit path to the visible Gretl GUI executable.

GRETLMCP_WORKSPACE_DIR

Optional parent directory for Gretl run workspaces and generated artifacts.

GRETLMCP_OPEN_GUI

Set to false to prevent script-running tools from opening visible Gretl GUI windows by default.

Readme

Gretl MCP

npm version GitHub stars

Built for AI agents: run Hansl/Gretl workflows, get graph screenshots, and view calculations in the real Gretl GUI.

It lets MCP clients run Gretl/Hansl scripts, raw Gretl command lines, existing .inp files, package operations, package builds, help lookups, dataset summaries, and OLS models. The generic gretl_run_script tool is the main path for prompt-generated Gretl workflows: the client writes Hansl from the user's request, runs it through Gretl, and returns Gretl's output plus generated artifacts.

Keywords: Claude Gretl, MCP econometrics, Hansl AI, Gretl GUI automation.

Key Features


View the full README on GitHub

Details

Repository
github.com/ondrejlapes/gretlmcp
Categories
Data & Analytics, Research & Academic
Package
gretl-mcp
Transport
STDIO
Registry
MCP registry, active

Similar to Gretl MCP

More Data & Analytics