create_studyLABSCO SUMMARY
Optimisation you can interrogate while it runs.
Optuna is usually driven from a script and read from a dashboard. Here the study is created, sampled and inspected in the same conversation, so why it settled where it did is answered by pulling the trials rather than by re-running anything.
What it is
An interface to Optuna, the hyperparameter optimisation framework. A study is created and configured through tool calls and its trials are read the same way, so running the optimisation and analysing it happen in one place.
What you get
- Studies created, and every study name on the storage listed
- A study's optimisation directions, and its metric names read or set
- The trials of a study, returned for analysis
- The sampler chosen for a study
- Results persisted when you point the study at a storage backend — a local SQLite file keeps them across sessions
Requirements
A recent Python, installed with uv or run from Docker. Without a storage backend the study lives only for the session; point it at one and it is kept.
Setup effort
One command — uvx optuna-mcp
USE CASES
Setting up a search
Create the study with its directions and metric names, so the trials that follow are labelled the way you will read them.
Understanding what the search found
Pull the trials and look at what actually varied, instead of reading only the best value.
Changing how it explores
Set a different sampler when the search is spending its budget in the wrong part of the space.
Picking up a study from last week
List the study names on the storage and open the one you meant.
Optimising something that is not a model
Anything you can score can be the objective, including the output of other tools, with the trials read back the same way.
24 tools
Listed in project docs. Your client may show a different list.
set_samplerget_all_study_namesset_metric_namesget_metric_namesget_directionsget_trialsbest_trialbest_trialsasktellset_trial_user_attrget_trial_user_attrsplot_optimization_historyplot_hypervolume_historyplot_pareto_frontplot_contourplot_parallel_coordinateplot_sliceplot_param_importancesplot_edfplot_timelineplot_ranklaunch_optuna_dashboardBEFORE YOU INSTALL
What to know first
Tools you get
24 tools named in the project's documentation.
Requires
uvx on PATH
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
Server setup
uvx optuna-mcpMCP Clients
Claude Desktop
{
"mcpServers": {
"Optuna": {
"command": "<YOUR_PATH_TO_UVX>",
"args": [
"optuna-mcp"
]
}
}
}