Optuna MCP Server

The Optuna MCP Server can be used in the following use cases, for example.

Local serverstdioGo

What is the Optuna MCP Server?

The Optuna MCP Server can be used in the following use cases, for example.

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
create_studyCreate a new Optuna study with the given study_name and directions.
study_namename of the study (string, required).
directionsThe directions of optimization (list of literal strings minimize/maximize, optional).
set_samplerSet the sampler for the study.
get_all_study_namesGet all study names from the storage.
set_metric_namesSet metric_names. Metric_names are labels used to distinguish what each objective value is.
metric_namesThe list of metric names for each objective (list of strings, required).
get_metric_namesGet metric_names.
get_directionsGet the directions of the study.
get_trialsGet all trials in a CSV format.
best_trialGet the best trial.
best_trialsReturn trials located at the Pareto front in the study.
askSuggest new parameters using Optuna.
search_spacethe search space for Optuna (dictionary, required).
tellReport the result of a trial.
trial_numberthe trial number (integer, required).
valuesthe result of the trial (float or list of floats, required).
set_trial_user_attrSet user attributes for a trial.
keythe key of the user attribute (string, required).
valuethe value of the user attribute (any type, required).
get_trial_user_attrsGet user attributes in a trial.
plot_optimization_historyReturn the optimization history plot as an image.
targetan index to specify the value to display (integer, required).
target_nametarget’s name to display on the color bar (string, required).
plot_hypervolume_historyReturn the hypervolume history plot as an image.
reference_pointa list of reference points to calculate the hypervolume (list of floats, required).
plot_pareto_frontReturn the Pareto front plot as an image for multi-objective optimization.
target_namesobjective name list used as the axis titles (list of strings, optional).
include_dominated_trialsa flag to include all dominated trial's objective values (boolean, optional).
targetsa list of indices to specify the objective values to display. (list of integers, optional).
plot_contourReturn the contour plot as an image.
paramsparameter list to visualize (list of strings, optional).
plot_parallel_coordinateReturn the parallel coordinate plot as an image.
plot_sliceReturn the slice plot as an image.
plot_param_importancesReturn the parameter importances plot as an image.
plot_edfReturn the EDF plot as an image.
plot_timelineReturn the timeline plot as an image.
plot_rankReturn the rank plot as an image.
launch_optuna_dashboardLaunch the Optuna dashboard.
portserver port (integer, optional, default: 58080).

How to install the Optuna MCP Server

{
  "mcpServers": {
    "Optuna": {
      "command": "/path/to/uvx",
      "args": [
        "optuna-mcp"
      ]
    }
  }
}

From the project documentation. Replace placeholders and example paths before connecting.

Example prompts to try

  • “Use Optuna MCP to Study.”
  • “Use Optuna MCP to Trial.”
  • “Use Optuna MCP to Visualization.”

Frequently asked questions

The Optuna MCP Server can be used in the following use cases, for example. Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.