Gretl MCP server
io.github.OndrejLapes/gretl-mcp·v0.2.1·3 starsRun Hansl/Gretl econometrics workflows via MCP with GUI launch and artifacts.
3 stars52 downloads/wk
Reviews
Write oneNobody has reviewed Gretl MCP yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
Gretl MCP tools (12, 3 write)
write = sends, deletes, buys or postsRead from the package source without running it. The installed server may list more.
gretl_capabilitiesList Gretl commands, built-in functions, and package-management help from the installed Gretl version.
gretl_dataset_summaryOpen a Gretl-supported dataset file, return summary statistics, and open the same workflow in Gretl GUI by default.
gretl_gui_launchLaunch the visible Gretl desktop GUI, optionally opening a local dataset/script or running a provided script on startup.
gretl_gui_versionReturn the installed Gretl GUI version by running gretl.exe --version.
gretl_helpAsk Gretl for command help, for example ols, summary, open, arima, or gnuplot. By default this also requires opening the help workflow in the visible Gretl GUI.
gretl_make_packageBuild a Gretl function package (.gfn or .zip) using the native makepkg command. By default this also requires opening the generated workflow in the visible Gretl GUI.
gretl_olsOpen a dataset, estimate an OLS model, and open the same workflow in Gretl GUI by default.
gretl_packageInstall, query, run samples for, unload, remove, or index Gretl function/data packages using the native pkg command. By default this also requires opening the generated workflow in the visible Gretl GUI.
gretl_run_commandswrite actionRun one or more raw Gretl command lines. By default this also requires opening the same workflow in the visible Gretl GUI.
gretl_run_scriptwrite actionRun any Gretl/Hansl script through gretlcli. By default this also requires opening the same workflow in the visible Gretl GUI.
gretl_run_script_filewrite actionRun an existing local Gretl .inp script file with gretlcli. By default this also requires opening the same workflow in the visible Gretl GUI.
gretl_versionReturn the installed Gretl version by running gretlcli.
Public scan report
scanner v0.1.9 · 2026-09-27 · same rubric, same numbers if you re-run it
- Code scan11 source files scanned25/25
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitylocal package, no credentials required12/15
- Maintenancelast push 113 days ago8/15
- Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
How Gretl MCP compares
Against every graded MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 82/100
- higher than 63% of 48,255 servers
- Tools
- 12
- the typical server has 7
- Tools that change things
- 25%
- typical: 0%. Fewer write tools means less an agent can break
- GitHub stars
- 3
- more than 80% of 28,688 servers
- Downloads a week
- 52
- more than 43% of 12,191 servers with a package
What its tools let an agent do: 9 read · 3 change
Install Gretl MCP in Claude Code, Cursor or VS Code
Runs npx -y gretl-mcp on your machine. Read the scan report first; the gateway never runs local packages.
claude mcp add gretl-mcp -- npx -y gretl-mcp
What the publisher says
From the Gretl MCP repository's README, as published. We do not edit it. Read it on GitHub
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 gretlrunscript 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
.inp script files.
- Scriptable Gretl control through gretlcli.
- GUI-first workflow tools that launch gretl.exe and fail if the GUI did not open.
- Capability discovery for Gretl commands, functions, and package commands.
- Generic execution tools for full Hansl scripts, command lists, and local
Package Guide.
- Package tools for pkg and makepkg workflows from the Gretl Function
- High-level tools for version checks, command help, dataset summaries, and OLS.
- Stdio transport, compatible with common MCP clients.
- Safe defaults for arbitrary scripts, with documented escape hatches.
Requirements
- Node.js 20 or newer.
- Gretl 2026b or newer with gretlcli available.
- An MCP client that supports stdio servers.
Getting Started
One-command install (after npm publish):
npx -y gretl-mcp@latest --versionLocal install from GitHub:
git clone https://github.com/OndrejLapes/GretlMCP.git
cd GretlMCP
npm install
npm run buildThen point your MCP client at the built server:
{
"mcpServers": {
"gretl": {
"command": "node",
"args": ["C:\\Users\\YOUR_USER\\GretlMCP\\dist\\index.js"],
"env": {
"GRETL_CLI": "C:\\Users\\YOUR_USER\\tools\\gretl\\gretlcli.exe",
"GRETL_GUI": "C:\\Users\\YOUR_USER\\tools\\gretl\\gretl.exe"
}
}
}
}Visual Walkthrough
Forecast output example (actual vs forecast):
Forecast error panel:
Install Gretl
Windows
Download Gretl from the official page: https://gretl.sourceforge.net/win32/
For a no-admin setup, extract the zip archive to:
C:\Users\YOUR_USER\tools\gretlVerify:
& C:\Users\YOUR_USER\tools\gretl\gretlcli.exe --versionmacOS
Install via Homebrew (if available on your setup) or the Gretl project site:
brew install gretl
gretlcli --versionLinux
Install from your distro packages, then verify:
sudo apt-get install gretl # Debian/Ubuntu example
gretlcli --versionMCP Client Config
Use this JSON config for stdio MCP clients:
{
"mcpServers": {
"gretl": {
"command": "node",
"args": ["C:\\Users\\YOUR_USER\\GretlMCP\\dist\\index.js"],
"env": {
"GRETL_CLI": "C:\\Users\\YOUR_USER\\tools\\gretl\\gretlcli.exe",
"GRETL_GUI": "C:\\Users\\YOUR_USER\\tools\\gretl\\gretl.exe"
}
}
}
}After npm publication, the standard MCP config is:
{
"mcpServers": {
"gretl": {
"command": "npx",
"args": ["-y", "gretl-mcp@latest"],
"env": {
"GRETL_CLI": "C:\\Users\\YOUR_USER\\tools\\gretl\\gretlcli.exe",
"GRETL_GUI": "C:\\Users\\YOUR_USER\\tools\\gretl\\gretl.exe"
}
}
}
}Client Setup
Claude Code
Local GitHub build:
claude mcp add gretl node C:\Users\YOUR_USER\GretlMCP\dist\index.jsnpm install path:
claude mcp add gretl npx -y gretl-mcp@latestCodex
Local GitHub build:
Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
Gretl MCP: common questions
- Is Gretl MCP server safe?
- Mostly: it is graded B (82/100). Read the Gretl MCP safety report
- How do I install Gretl MCP?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does Gretl MCP need an API key?
- No secret keys are declared. It reads 4 settings from the environment.
- Is Gretl MCP maintained?
- The last commit was 151 days ago (2026-06-06). The latest release is v0.2.1.
- How does Gretl MCP compare with other MCP servers?
- safety score 82/100 (higher than 63% of 48,255 servers); tools 12 (the typical server has 7); tools that change things 25% (typical: 0%. Fewer write tools means less an agent can break). Full comparison.