Gretl MCP

v0.2.1
io.github.OndrejLapes/gretl-mcp Checked 1 hour ago Published 6 months ago

Run Hansl/Gretl econometrics workflows via MCP with GUI launch and artifacts.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

gretl_version

Return the installed Gretl version by running gretlcli.

ParameterTypeDescription
gretlCliPathstringOptional explicit path to gretlcli or gretlcli.exe.

gretl_gui_version

Return the installed Gretl GUI version by running gretl.exe --version.

ParameterTypeDescription
gretlGuiPathstringOptional explicit path to gretl or gretl.exe.
timeoutSecondsintegerMaximum time to wait for gretl.exe --version. Defaults to 10 seconds.

gretl_gui_launch

Launch the visible Gretl desktop GUI, optionally opening a local dataset/script or running a provided script on startup.

ParameterTypeDescription
englishbooleanForce Gretl GUI to use English.
filePathstringOptional local dataset or script file to open in the Gretl GUI.
gretlGuiPathstringOptional explicit path to gretl or gretl.exe.
newInstancebooleanLaunch a new Gretl GUI instance instead of reusing an existing one.
runScriptbooleanWhen filePath points to a script, launch Gretl with --run filePath.
safeModebooleanWhen script is provided, block shell-like commands and absolute file reads/writes.
scriptstringOptional Gretl/Hansl script to write and open with --run in the GUI.
workspaceRootstringOptional directory where GUI script workspaces are created.

gretl_run_script

Run any Gretl/Hansl script through gretlcli. By default this also requires opening the same workflow in the visible Gretl GUI.

ParameterTypeDescription
script *stringGretl/Hansl script to run.
displayInGretlbooleanOpen a visible Gretl GUI script window for this run. Defaults to true outside CI.
gretlCliPathstringOptional explicit path to gretlcli or gretlcli.exe.
gretlGuiPathstringOptional explicit path to gretl or gretl.exe.
guiNewInstancebooleanOpen a new Gretl GUI instance for the visible script.
keepWorkspacebooleanKeep the run workspace so generated artifacts remain available.
requireGuibooleanRequire the visible Gretl GUI to open for this workflow. Defaults to true outside CI.
safeModebooleanWhen true, blocks shell-like commands and absolute file writes.
timeoutSecondsintegerMaximum runtime in seconds. Defaults to 30, max 300.
workspaceRootstringOptional directory where run workspaces are created.

gretl_run_commands

Run one or more raw Gretl command lines. By default this also requires opening the same workflow in the visible Gretl GUI.

ParameterTypeDescription
commands *arrayGretl command lines to run in order.
displayInGretlbooleanOpen the generated command script in the visible Gretl GUI. Defaults to true outside CI.
gretlCliPathstringOptional explicit path to gretlcli or gretlcli.exe.
gretlGuiPathstringOptional explicit path to gretl or gretl.exe.
guiNewInstancebooleanOpen a new Gretl GUI instance for the visible script.
keepWorkspacebooleanKeep the run workspace so generated artifacts remain available.
requireGuibooleanRequire the visible Gretl GUI to open for this workflow. Defaults to true outside CI.
safeModebooleanWhen true, blocks shell-like commands and absolute file writes.
timeoutSecondsintegerMaximum runtime in seconds. Defaults to 30, max 300.
workspaceRootstringOptional directory where run workspaces are created.

gretl_run_script_file

Run an existing local Gretl .inp script file with gretlcli. By default this also requires opening the same workflow in the visible Gretl GUI.

ParameterTypeDescription
scriptPath *stringPath to an existing local Gretl .inp script.
displayInGretlbooleanOpen the script file in the visible Gretl GUI after running. Defaults to true outside CI.
gretlCliPathstring
gretlGuiPathstring
guiNewInstanceboolean
requireGuibooleanRequire the visible Gretl GUI to open for this workflow. Defaults to true outside CI.
safeModebooleanWhen true, validates the script before running it.
scriptOptnumberOptional numeric value passed to Gretl as --scriptopt.
timeoutSecondsinteger
workingDirectorystringWorking directory for the script. Defaults to the script file directory.

gretl_capabilities

List Gretl commands, built-in functions, and package-management help from the installed Gretl version.

ParameterTypeDescription
displayInGretlbooleanOpen the generated help script in Gretl GUI. Defaults to false for this reference tool.
gretlCliPathstring
gretlGuiPathstring
includeFunctionsbooleanInclude Gretl's built-in accessors and functions from help functions.
includePackageHelpbooleanInclude help for pkg and makepkg.
timeoutSecondsinteger

gretl_package

Install, 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.

ParameterTypeDescription
action *stringGretl pkg action to perform.
displayInGretlbooleanOpen the generated package command script in Gretl GUI. Defaults to true outside CI.
gretlCliPathstring
gretlGuiPathstring
guiNewInstanceboolean
keepWorkspaceboolean
localbooleanUse pkg --local for a local .gfn or .zip package file.
packageNamestringPackage name, local package path, URL, or addons for index. Required except index defaults to addons.
quietbooleanUse pkg --quiet.
requireGuibooleanRequire the visible Gretl GUI to open for this workflow. Defaults to true outside CI.
stagingbooleanUse pkg --staging for package installs from Gretl staging.
timeoutSecondsinteger
verbosebooleanUse pkg --verbose.
workspaceRootstring

gretl_make_package

Build 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.

ParameterTypeDescription
packagePath *stringOutput path ending in .gfn or .zip.
displayInGretlbooleanOpen the generated makepkg script in Gretl GUI. Defaults to true outside CI.
gretlCliPathstring
gretlGuiPathstring
guiNewInstanceboolean
indexbooleanWrite the auxiliary package XML index file.
keepWorkspaceboolean
quietbooleanUse makepkg --quiet.
requireGuibooleanRequire the visible Gretl GUI to open for this workflow. Defaults to true outside CI.
timeoutSecondsinteger
translationsbooleanWrite the auxiliary i18n C strings file.
workspaceRootstring

gretl_help

Ask 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.

ParameterTypeDescription
commandName *stringGretl command name.
displayInGretlbooleanOpen a visible Gretl GUI script window for this help request. Defaults to true outside CI.
gretlCliPathstring
gretlGuiPathstring
requireGuibooleanRequire the visible Gretl GUI to open for this workflow. Defaults to true outside CI.

gretl_dataset_summary

Open a Gretl-supported dataset file, return summary statistics, and open the same workflow in Gretl GUI by default.

ParameterTypeDescription
datasetPath *stringPath to a CSV, gdt, Excel, Stata, SPSS, or other Gretl-supported dataset.
displayInGretlbooleanOpen a visible Gretl GUI script window for this workflow. Defaults to true outside CI.
gretlCliPathstring
gretlGuiPathstring
guiNewInstanceboolean
requireGuibooleanRequire the visible Gretl GUI to open for this workflow. Defaults to true outside CI.
safeModeboolean
timeoutSecondsinteger

gretl_ols

Open a dataset, estimate an OLS model, and open the same workflow in Gretl GUI by default.

ParameterTypeDescription
datasetPath *stringPath to a Gretl-supported dataset.
dependentVariable *stringDependent variable name.
independentVariables *arrayIndependent variable names.
displayInGretlbooleanOpen a visible Gretl GUI script window for this workflow. Defaults to true outside CI.
gretlCliPathstring
gretlGuiPathstring
guiNewInstanceboolean
includeConstantboolean
requireGuibooleanRequire the visible Gretl GUI to open for this workflow. Defaults to true outside CI.
safeModeboolean
timeoutSecondsinteger