optuna/optuna-mcp
The Optuna MCP Server is a Model Context Protocol (MCP) server to interact with Optuna APIs.
Platform-specific configuration:
{
"mcpServers": {
"optuna-mcp": {
"command": "npx",
"args": [
"-y",
"optuna-mcp"
]
}
}
}Add the config above to .claude/settings.json under the mcpServers key.
[](https://www.python.org) [](https://pypi.python.org/pypi/optuna-mcp) [](https://github.com/optuna/optuna-mcp) [](https://github.com/optuna/optuna-mcp/actions/workflows/tests.yml)
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": "/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",
"--storaLoading reviews...