by optuna
Optimize hyper parameters effortlessly with Optuna, the best AutoML software for automated analysis, visualization, and
Automates hyperparameter tuning and optimization using the Optuna framework. Lets AI assistants optimize model parameters and analyze results through interactive visualizations.
Optuna is an official MCP server published by optuna that provides AI assistants with tools and capabilities via the Model Context Protocol. Optimize hyper parameters effortlessly with Optuna, the best AutoML software for automated analysis, visualization, and It is categorized under ai ml, analytics data.
You can install Optuna in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.
MIT
Optuna is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.
Add new capabilities to Claude beyond text generation
Example
Access external data sources, execute code, interact with tools and services
Transform Claude from chatbot to action-taking agent
Provide Claude with access to relevant context and data
Example
Load project documentation, access knowledge bases, query databases
Get more accurate, context-aware responses
Automate multi-step workflows combining AI and external tools
Example
Research → Summarize → Create document → Send notification
Complete complex tasks end-to-end without manual steps
Share your MCP server with the developer community
Optuna is among the better-indexed MCP projects we tried; the explainx.ai summary tracks the official description.
Strong directory entry: Optuna surfaces stars and publisher context so we could sanity-check maintenance before adopting.
Strong directory entry: Optuna surfaces stars and publisher context so we could sanity-check maintenance before adopting.
Optuna has been reliable for tool-calling workflows; the MCP profile page is a good permalink for internal docs.
I recommend Optuna for teams standardizing on MCP; the explainx.ai page compares cleanly with sibling servers.
According to our notes, Optuna benefits from clear Model Context Protocol framing — fewer ambiguous “AI plugin” claims.
Optuna reduced integration guesswork — categories and install configs on the listing matched the upstream repo.
I recommend Optuna for teams standardizing on MCP; the explainx.ai page compares cleanly with sibling servers.
I recommend Optuna for teams standardizing on MCP; the explainx.ai page compares cleanly with sibling servers.
Optuna reduced integration guesswork — categories and install configs on the listing matched the upstream repo.
showing 1-10 of 57
A Model Context Protocol (MCP) server that automates optimization and analysis using Optuna.
<img width="840" alt="image" src="https://raw.githubusercontent.com/optuna/optuna-mcp/main/examples/sphere2d/images/sphere2d-6.png" />The Optuna MCP Server can be used in the following use cases, for example.
For details, see the Examples section.
The Optuna MCP server can be installed using uv or Docker.
This section explains how to install the Optuna MCP server, using Claude Desktop as an example MCP client.
Before starting the installation process, install uv from Astral.
Then, add the Optuna MCP server configuration to the MCP client.
To include it in Claude Desktop, go to Claude > Settings > Developer > Edit Config > claude_desktop_config.json
and add the following:
{
"mcpServers": {
"Optuna": {
"command": "/path/to/uvx",
"args": [
"optuna-mcp"
]
}
}
}
Additionally, you can specify the Optuna storage with the --storage argument to persist the results.
{
"mcpServers": {
"Optuna": {
"command": "/path/to/uvx",
"args": [
"optuna-mcp",
"--storage",
"sqlite:///optuna.db"
]
}
}
}
After adding this, please restart Claude Desktop application. For more information about Claude Desktop, check out the quickstart page.
You can also run the Optuna MCP server using Docker. Make sure you have Docker installed and running on your machine.
{
"mcpServers": {
"Optuna": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"--net=host",
"-v",
"/PATH/TO/LOCAL/DIRECTORY/WHICH/INCLUDES/DB/FILE:/app/workspace",
"optuna/optuna-mcp:latest",
"--storage",
"sqlite:////app/workspace/optuna.db"
]
}
}
}
The Optuna MCP provides the following tools. Specifically, it offers primitive functions of Optuna such as Study, Trial, Visualization, and Dashboard. Since MCP clients know the list of tools and the details of each tool, users do not need to remember those details.
study_name : name of the study (string, required).directions: The directions of optimization (list of literal strings minimize/maximize, optional).name : the name of the sampler (string, required).metric_names : The list of metric names for each objective (list of strings, required).search_space : the search space for Optuna (dictionary, required).trial_number : the trial number (integer, required).values : the result of the trial (float or list of floats, required).trial_number: the trial number (integer, required).key: the key of the user attribute (string, required).value: the value of the user attribute (any type, required).trial_number: the trial number (integer, required).target: index to specify which value to display (integer, optional).target_name: target’s name to display on the axis label (string, optional).reference_point : a list of reference points to calculate the hypervolume (list of floats, required).target_names: objective name list used as the axis titles (list of strings, optional).include_dominated_trials: a flag to include all dominated trial's objective values (boolean, optional).targets: a list of indices to specify the objective values to display. (list of integers, optional).params : parameter list to visualize (list of strings, optional).target : an index to specify the value to display (integer, required).target_name : target’s name to display on the color bar (string, required).params : parameter list to visualize (list of strings, optional).target : an index to specify the value to display (integer, required).target_name : target’s name to display on the axis label and the legend (string, required).params : parameter list to visualize (list of strings, optional).target : an index to specify the value to display (integer, required).target_name : target’s name to display on the axis label (string, required).params : parameter list to visualize (list of strings, optional).target : an index to specify the value to display (integer/null, optional).target_name : target’s name to display on the legend (string, required).target : an index to specify the value to display (integer, required).target_name : target’s name to display on the axis label (string, required).params : parameter list to visualize (list of strings, optional).target : an index to specify the value to display (integer, required).target_name : target’s name to display on the color bar (string, required).port: server port (integer, optional, default: 58080).Here we present a simple example of optimizing the 2D-Sphere function, along with example prompts and the summary of the LLM responses.
| User prompt | Output in Claude |
|---|---|
| (Launch Claude Desktop) | <img alt="1" src="https://raw.githubusercontent.com/optuna/optuna-mcp/main/examples/sphere2d/images/sphere2d-1.png" /> |
| Please create an Optuna study named "Optimize-2D-Sphere" for minimization. | <img alt="2" src="https://raw.githubusercontent.com/optuna/optuna-mcp/main/examples/sphere2d/images/sphere2d-2.png" /> |
| Please suggest two float parameters x, y in [-1, 1]. | <img alt="3" src="https://raw.githubusercontent.com/optuna/optuna-mcp/main/examples/sphere2d/images/sphere2d-3.png" /> |
| Please report the objective value x**2 + y**2. To calculate the value, please use the JavaScript interpreter and do not round the values. | <img alt="4" src="https://raw.githubusercontent.com/optuna/optuna-mcp/main/examples/sphere2d/images/sphere2d-4.png" /> |
| Please suggest another parameter set and evaluate it. | <img alt="5" src="https://raw.githubusercontent.com/optuna/optuna-mcp/main/examples/sphere2d/images/sphere2d-5.png" /> |
| Please plot the optimization history so far. | <img alt="6" src="https://raw.githubusercontent.com/optuna/optuna-mcp/main/examples/sphere2d/images/sphere2d-6.png" /> |
You can also start the Optuna dashboard via the MCP server to analyze the optimization results interactively.
| User prompt | Output in Claude |
|---|---|
| Please launch the Optuna dashboard. | <img alt="7" src="https://raw.githubusercontent.com/optuna/optuna-mcp/main/examples/optuna-dashboard/images/optuna-dashboard-1.png" /> |
By default, the Optuna dashboard will be launched on port 58080. You c
Prerequisites
Time Estimate
15-60 minutes depending on server complexity
Steps
Troubleshooting
✓ Do
✗ Don't
💡 Pro Tips
Architecture
Model Context Protocol standardizes how AI hosts (Claude, Cursor) communicate with external tools and data sources through server implementations.
Protocols
Compatibility
✓ Use when
Use when you need Claude to access external data, execute actions, or integrate with tools. Best for extending AI capabilities beyond conversation.
✗ Avoid when
Avoid when native integrations exist (use official APIs directly), for real-time critical systems, or when security/compliance requires zero external dependencies.