Skip to content

Commit 65cbd10

Browse files
Merge pull request #3 from optuna/update-readme
Update `README.md` and `CONTRIBUTING.md`.
2 parents 68c39b6 + 9932e04 commit 65cbd10

File tree

2 files changed

+65
-44
lines changed

2 files changed

+65
-44
lines changed

CONTRIBUTING.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,44 @@ If you are interested in contributing to Optuna MCP Server, please read the foll
44
If you are new to GitHub, please refer to [our blog](https://medium.com/optuna/optuna-wants-your-pull-request-ff619572302c) for more information.
55

66

7+
## Setup Development Environment
8+
9+
First of all, fork Optuna MCP on GitHub. You can learn about fork in the [official documentation](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo).
10+
11+
After forking, download and install Optuna MCP on your computer as follows:
12+
13+
```
14+
$ git clone [email protected]:YOUR_NAME/optuna-mcp.git
15+
$ cd optuna-mcp
16+
$ uv sync # Install dependencies
17+
$ pwd # Check the path to your optuna-mcp directory.
18+
/PATH/TO/optuna-mcp
19+
$ which uv # Check the path to your uv binary.
20+
/PATH/TO/uv
21+
```
22+
23+
After the installation, configure the MCP client (e.g., Claude Desktop) as explained in the [README.md](README.md#installation).
24+
Please fill the placeholders of path to your uv binary and optuna-mcp directory:
25+
26+
```json
27+
{
28+
"mcpServers": {
29+
"Optuna": {
30+
"command": "/PATH/TO/uv",
31+
"args": [
32+
"--directory",
33+
"/PATH/TO/optuna-mcp",
34+
"run",
35+
"optuna-mcp"
36+
"--storage",
37+
"sqlite:///optuna.db"
38+
],
39+
}
40+
}
41+
}
42+
```
43+
44+
745
## Coding Standards and Guidelines
846

947
Please adhere to the following coding standards and guidelines:

README.md

Lines changed: 27 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,34 @@
33
[![Python](https://img.shields.io/badge/python-3.12%20%7C%203.13-blue)](https://www.python.org)
44
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/optuna/optuna-mcp)
55

6-
The Optuna MCP Server is a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) server to interact with Optuna APIs.
6+
A [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) server that automates optimization and anlysis using [Optuna](http://optuna.org).
77

88
<img width="840" alt="image" src="./examples/sphere2d/images/sphere2d-6.png" />
99

1010
## Use Cases
1111

12-
- Hyperparameter Optimization driven by LLMs
13-
- Interactive analysis of Optuna's optimization history
12+
The Optuna MCP Server can be used in the following use cases, for example.
1413

14+
- Automated hyperparameter optimization by LLMs
15+
- Interactive analysis of Optuna's optimization results via chat interface
16+
- Optimize input and output of other MCP tools
1517

16-
## Prerequisites
17-
18-
Before starting the installation process, ensure to:
19-
20-
1. Install `uv` from [Astral](https://docs.astral.sh/uv/getting-started/installation/)
21-
2. After installing `uv`, execute the command `uv python install 3.12` to install Python 3.12 or a newer version.
22-
3. Lastly, add the server to your MCP client configuration.
18+
For details, see the [Examples section](#examples).
2319

2420
## Installation
2521

26-
### Usage with Claude Desktop
27-
2822
<!-- TODO(c-bata): Remove the following line after publishing to the PyPI and DockerHub-->
2923

3024
*Please note that `optuna-mcp` does not exist on PyPI and DockerHub at the moment.*
3125

26+
The Optuna MCP server can be installed using `uv` or Docker.
27+
This section explains how to install the Optuna MCP server, using Claude Desktop as an example MCP client.
28+
29+
### Usage with uv
30+
31+
Before starting the installation process, install `uv` from [Astral](https://docs.astral.sh/uv/getting-started/installation/).
32+
33+
Then, add the Optuna MCP server configuration to the MCP client.
3234
To include it in Claude Desktop, go to Claude > Settings > Developer > Edit Config > `claude_desktop_config.json`
3335
and add the following:
3436

@@ -37,48 +39,21 @@ and add the following:
3739
"mcpServers": {
3840
"Optuna": {
3941
"command": "uvx",
40-
"args": [
41-
"optuna-mcp",
42-
"--storage",
43-
"sqlite:///optuna.db"
44-
],
42+
"args": ["optuna-mcp"],
4543
}
4644
}
4745
}
4846
```
4947

50-
After adding this, please restart Claude Desktop application.
51-
For more information about Claude Desktop, check out [the quickstart page](https://modelcontextprotocol.io/quickstart/user).
52-
53-
### Build from source
54-
55-
<!-- TODO(c-bata): Change the git url after published to under the optuna org. -->
56-
57-
For those who are interested in the version under development, you can manually clone the repository
58-
and install its dependencies as follows:
59-
60-
```
61-
$ git clone [email protected]:optuna/optuna-mcp.git
62-
$ cd optuna-mcp
63-
$ uv sync # Install dependencies
64-
$ pwd # Check the path to your optuna-mcp directory.
65-
/PATH/TO/optuna-mcp
66-
$ which uv # Check the path to your uv binary.
67-
/PATH/TO/uv
68-
```
69-
70-
After cloning, include the path to your uv binary and optuna-mcp directory in your configuration as follows:
48+
Additionally, you can specify the Optuna storage with the `--storage` argument to persist the results.
7149

7250
```json
7351
{
7452
"mcpServers": {
7553
"Optuna": {
76-
"command": "/PATH/TO/uv",
54+
"command": "uvx",
7755
"args": [
78-
"--directory",
79-
"/PATH/TO/optuna-mcp",
80-
"run",
81-
"optuna-mcp"
56+
"optuna-mcp",
8257
"--storage",
8358
"sqlite:///optuna.db"
8459
],
@@ -87,7 +62,11 @@ After cloning, include the path to your uv binary and optuna-mcp directory in yo
8762
}
8863
```
8964

65+
After adding this, please restart Claude Desktop application.
66+
For more information about Claude Desktop, check out [the quickstart page](https://modelcontextprotocol.io/quickstart/user).
67+
9068
### Usage with Docker
69+
9170
You can also run the Optuna MCP server using Docker. Make sure you have Docker installed and running on your machine.
9271

9372
```json
@@ -111,7 +90,11 @@ You can also run the Optuna MCP server using Docker. Make sure you have Docker i
11190
}
11291
```
11392

114-
## Tools
93+
## Tools provided by Optuna MCP
94+
95+
The Optuna MCP provides the following tools.
96+
Specifically, it offers primitive functions of Optuna such as Study, Trial, Visualization, and Dashboard.
97+
Since MCP clients know the list of tools and the details of each tool, users do not need to remember those details.
11598

11699
### Study
117100

0 commit comments

Comments
 (0)