← Back to directory
O

Optuna MCP Server

Official
Optimize and analyze with Optuna through conversation.
Category
Dev Tools #207 of 751
Stars
★ 95 Popular
Transport
stdio (local process)
Runtime
Python 3.12+ · Docker
Credentials
No credential needed
License
MIT
Last commit
Tools
24
55FMRS · C

The README lists study management, trial, visualization, and dashboard tools, and provides uv and Docker configuration examples for Claude Desktop. The server path is the repository root. No server manifest was provided, so the transport is inferred from the stdio-style client configuration example.

Strongest · Setup experience 13/20 Weakest · Reliability 9/20

Reliability
9/20
Security and permissions
10/20
Maintenance
10/20
Documentation
13/20
Setup experience
13/20
Why each score
Reliability 9/20
The README lists study, trial, visualization, and dashboard tools with basic parameter descriptions, but provides no manifest, implementation, test results, or evidence of the initialization and tool-list handshake. The static material makes basic functionality plausible, but cannot confirm that declarations match behavior; error handling and edge cases are also undocumented, so points are deducted.
Security and permissions 10/20
The supplied material shows no malware, credential theft, or real secrets in installation examples. However, tools can create or modify study and trial data and launch a dashboard, while the documentation does not describe permission boundaries, data exposure, or confirmation for risky operations. Points are deducted for missing evidence of security controls and data flows.
Maintenance 10/20
The repository is not archived and declares an MIT license; the README also shows test-workflow and PyPI-version badges. The supplied material contains no commit or release history, dependency update evidence, security-response channel, or maintainer-response evidence. Maintenance and governance are only partly verifiable, so points are deducted.
Documentation 13/20
The README includes concrete installation examples, a tool and parameter list, use cases, and several examples. It lacks troubleshooting, operating limits, authentication and data-flow explanations, and manifest or implementation evidence to verify tool behavior. It is useful for onboarding, but evidence and operational details are incomplete, so it does not receive full marks.
Setup experience 13/20
The README provides uvx and Docker paths, Claude Desktop configuration examples, and an option for persistent storage. Users must install a runtime first, adjust paths and volume mounts manually, and there is no platform compatibility information or verifiable evidence of a successful connection. The steps are fairly clear but require manual configuration, so points are deducted.

Static review · not runReviewed 2026-11-29

Read the FMRS scoring method →

Fit and risk

What it can accessWrites / deletes local filesConnects to a database

Best for

  • Users who want to create, run, and analyze Optuna studies through an MCP client.
  • Users who need trial visualizations or the Optuna Dashboard.

Not for

  • Users who do not use Optuna or need optimization and trial analysis.
  • Users who need a hosted service, authentication, or client configuration not documented in the README.

Required permissions

  • Needs access to the configured Optuna storage to create or read studies and trials; for persistent storage, the specified path must be available.
  • Launching the dashboard requires access to the configured port; the README default is 58080.

Risks and side effects

  • The tools can create studies, suggest parameters, and submit trial results; callers should verify study names, search spaces, and result values.
  • The dashboard starts on a configured port; the README example accesses it at localhost:58080.
  • The README does not describe authentication or remote access controls, so avoid exposing the dashboard to untrusted networks.

Setup

Before you start

Runtime:Python 3.12+ · Docker

Install Astral's uv, add the README configuration to your MCP client's configuration file, then restart Claude Desktop. You can pass --storage to specify Optuna storage for persistence. The README also provides a Docker configuration example.

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

Shown for Claude Desktop. Other clients may use a different file or key (VS Code uses "servers") — the configurator below converts it.

.vscode/mcp.json
{
  "servers": {
    "Optuna": {
      "command": "/path/to/uvx",
      "args": [
        "optuna-mcp"
      ]
    }
  }
}

Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).

~/.codex/config.toml
[mcp_servers.Optuna]
command = "/path/to/uvx"
args = ["optuna-mcp"]

Append to ~/.codex/config.toml (OpenAI Codex CLI uses TOML).

Terminal
claude mcp add Optuna -- /path/to/uvx optuna-mcp

Run it in a terminal; replace any <…> placeholders with your own values first.

Check that it works

Confirm the Optuna tools appear in your client’s tool list, then ask it to create a minimization study and check that the server responds.

Troubleshooting

  1. Confirm uv is installed and set command to the actual local path for uvx.
  2. Restart Claude Desktop after changing its configuration.
  3. For persistent storage, check that the --storage URI and database file path are correct and accessible.
  4. If the dashboard does not start, check that the port is available and confirm the configured port.

Things to try

Once connected, you can ask your AI assistant things like:

  • Create a minimization Optuna study named “Optimize-2D-Sphere.”
  • Suggest two float parameters x and y in the range [-1, 1] for the current study.
  • Plot the optimization history so far.
  • Launch the Optuna dashboard.

Tools 24

create_study writes
Create a study with a name and optimization directions, or load it if it already exists.
set_sampler writes
Set the sampler for a study.
get_all_study_names read-only
Get all study names from storage.
set_metric_names writes
Set labels for each objective value.
get_metric_names read-only
Get the metric names.
get_directions read-only
Get the study's optimization directions.
get_trials read-only
Get all trials in CSV format.
best_trial read-only
Get the best trial.
Show 16 more tools
best_trials read-only
Return trials on the study's Pareto front.
ask writes
Suggest new parameters with Optuna using a search space.
tell writes
Report the result of a trial.
set_trial_user_attr writes
Set user attributes for a trial.
get_trial_user_attrs read-only
Get a trial's user attributes.
plot_optimization_history read-only
Return an optimization history plot.
plot_hypervolume_history read-only
Return a hypervolume history plot.
plot_pareto_front read-only
Return a Pareto front plot for multi-objective optimization.
plot_contour read-only
Return a contour plot.
plot_parallel_coordinate read-only
Return a parallel coordinate plot.
plot_slice read-only
Return a slice plot.
plot_param_importances read-only
Return a parameter importances plot.
plot_edf read-only
Return an EDF plot.
plot_timeline read-only
Return a timeline plot.
plot_rank read-only
Return a rank plot.
launch_optuna_dashboard writes
Launch the Optuna Dashboard; the default port is 58080.

Use cases

Automate hyperparameter optimization with an LLM.
Analyze Optuna optimization results interactively through a chat interface.
Optimize the inputs and outputs of other MCP tools.
Launch the Optuna Dashboard to inspect optimization results interactively.

Supported clients

Claude Desktop

Listed from the project's documentation, not tested by this site.

Overview

Optuna MCP Server is an MCP server for interacting with Optuna APIs. It can create and manage studies, suggest and report trials, produce optimization visualizations, and launch the Optuna Dashboard. The README shows a configuration example for Claude Desktop.

Similar servers

Source revision c59e6340c763 Data synced 2026-12-05 Read the FMRS scoring method Markdown

Maintainer badge: embed FMRS score

Paste this Markdown into your repository README to display a live score badge:

README.md
[![FollowMCP](https://followmcp.com/badges/optuna-mcp.svg)](https://followmcp.com/en/servers/optuna-mcp)