
Gretl MCP
Bridges Claude and other MCP clients to Gretl's econometrics engine via stdio. You get tools to run Hansl scripts, execute raw command lines, estimate OLS models, and manage function packages. The gretl_run_script tool is the workhorse: it takes prompt-generated Hansl code, feeds it to gretlcli, and returns output plus artifact paths. Most execution tools default to launching the Gretl GUI alongside CLI runs, with configurable flags if you need headless operation. Safe mode blocks shell-like commands in user scripts. Useful when you want an AI agent to prototype time series models, build forecast dashboards, or run specification curves without leaving the chat window.
- GitHub stars
- 3
- tools
- 12
- transport
- STDIO
- env vars
- 4
- last updated
- May 15, 2026
Tools
12 toolsPublic 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.
Sponsors
Configuration
GRETL_CLIOptional explicit path to gretlcli or gretlcli.exe.
GRETL_GUIOptional explicit path to the visible Gretl GUI executable.
GRETLMCP_WORKSPACE_DIROptional parent directory for Gretl run workspaces and generated artifacts.
GRETLMCP_OPEN_GUISet to false to prevent script-running tools from opening visible Gretl GUI windows by default.
Readme
Gretl MCP
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
Details
- Repository
- github.com/ondrejlapes/gretlmcp
- Package
gretl-mcp- Transport
- STDIO
- Registry
- MCP registry, active