Skip to content

Commit a40c161

Browse files
Update README.md and CONTRIBUTING.md.
1 parent 3285c1d commit a40c161

File tree

2 files changed

+68
-44
lines changed

2 files changed

+68
-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: 30 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,36 @@
11
# Optuna MCP Server
22

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

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

77
## Use Cases
88

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

11+
- Automated hyperparameter optimization by LLMs
12+
- Interactive analysis of Optuna's optimization results via chat interface
13+
- Optimize input and output of other MCP tools
1214

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

2117
## Installation
2218

23-
### Usage with Claude Desktop
24-
2519
<!-- TODO(c-bata): Remove the following line after publishing to the PyPI and DockerHub-->
2620

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

23+
The Optuna MCP server can be installed using `uv` or Docker.
24+
This section explains how to install the Optuna MCP server, using Claude Desktop as an example MCP client.
25+
26+
### Usage with uv
27+
28+
Before starting the installation process, ensure to:
29+
30+
1. Install `uv` from [Astral](https://docs.astral.sh/uv/getting-started/installation/)
31+
2. After installing `uv`, execute the command `uv python install 3.12` to install Python 3.12 or a newer version.
32+
33+
Then, add the Optuna MCP server configuration to the MCP client.
2934
To include it in Claude Desktop, go to Claude > Settings > Developer > Edit Config > `claude_desktop_config.json`
3035
and add the following:
3136

@@ -34,48 +39,21 @@ and add the following:
3439
"mcpServers": {
3540
"Optuna": {
3641
"command": "uvx",
37-
"args": [
38-
"optuna-mcp",
39-
"--storage",
40-
"sqlite:///optuna.db"
41-
],
42+
"args": ["optuna-mcp"],
4243
}
4344
}
4445
}
4546
```
4647

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

6950
```json
7051
{
7152
"mcpServers": {
7253
"Optuna": {
73-
"command": "/PATH/TO/uv",
54+
"command": "uvx",
7455
"args": [
75-
"--directory",
76-
"/PATH/TO/optuna-mcp",
77-
"run",
78-
"optuna-mcp"
56+
"optuna-mcp",
7957
"--storage",
8058
"sqlite:///optuna.db"
8159
],
@@ -84,7 +62,11 @@ After cloning, include the path to your uv binary and optuna-mcp directory in yo
8462
}
8563
```
8664

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+
8768
### Usage with Docker
69+
8870
You can also run the Optuna MCP server using Docker. Make sure you have Docker installed and running on your machine.
8971

9072
```json
@@ -108,7 +90,11 @@ You can also run the Optuna MCP server using Docker. Make sure you have Docker i
10890
}
10991
```
11092

111-
## 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.
11298

11399
### Study
114100

0 commit comments

Comments
 (0)