A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/optuna/optuna-mcp below:

optuna/optuna-mcp: The Optuna MCP Server is a Model Context Protocol (MCP) server to interact with Optuna APIs.

A Model Context Protocol (MCP) server that automates optimization and analysis using Optuna.

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": "uvx",
      "args": [
        "optuna-mcp"
      ]
    }
  }
}

Additionally, you can specify the Optuna storage with the --storage argument to persist the results.

{
  "mcpServers": {
    "Optuna": {
      "command": "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"
      ]
    }
  }
}
Tools provided by Optuna MCP

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.

Optimizing the 2D-Sphere Function

Here we present a simple example of optimizing the 2D-Sphere function, along with example prompts and the summary of the LLM responses.

Starting the Optuna Dashboard and Analyzing Optimization Results

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.

By default, the Optuna dashboard will be launched on port 58080. You can access it by navigating to http://localhost:58080 in your web browser as shown below:

Optuna dashboard provides various visualizations to analyze the optimization results, such as optimization history, parameter importances, and more.

Optimizing the FFmpeg Encoding Parameters

This demo showcases how to use the Optuna MCP server to automatically find optimal FFmpeg encoding parameters. It optimizes x264 encoding options to maximize video quality (measured by the SSIM score) while keeping encoding time reasonable.

Check out examples/ffmpeg for details.

Optimizing the Cookie Recipe

In this example, we will optimize a cookie recipe, referencing the paper titled "Bayesian Optimization for a Better Dessert".

Check out examples/cookie-recipe for details.

Optimizing the Matplotlib Configuration Default and optimized figures by Optuna MCP.

This example optimizes a Matplotlib configuration.

Check out examples/auto-matplotlib for details.

MIT License (see LICENSE).


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4