Skip to content

Commit f90705b

Browse files
Update README.md and CONTRIBUTING.md.
1 parent 68c39b6 commit f90705b

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
@@ -3,32 +3,37 @@
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, ensure to:
32+
33+
1. Install `uv` from [Astral](https://docs.astral.sh/uv/getting-started/installation/)
34+
2. After installing `uv`, execute the command `uv python install 3.12` to install Python 3.12 or a newer version.
35+
36+
Then, add the Optuna MCP server configuration to the MCP client.
3237
To include it in Claude Desktop, go to Claude > Settings > Developer > Edit Config > `claude_desktop_config.json`
3338
and add the following:
3439

@@ -37,48 +42,21 @@ and add the following:
3742
"mcpServers": {
3843
"Optuna": {
3944
"command": "uvx",
40-
"args": [
41-
"optuna-mcp",
42-
"--storage",
43-
"sqlite:///optuna.db"
44-
],
45+
"args": ["optuna-mcp"],
4546
}
4647
}
4748
}
4849
```
4950

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:
51+
Additionally, you can specify the Optuna storage with the `--storage` argument to persist the results.
7152

7253
```json
7354
{
7455
"mcpServers": {
7556
"Optuna": {
76-
"command": "/PATH/TO/uv",
57+
"command": "uvx",
7758
"args": [
78-
"--directory",
79-
"/PATH/TO/optuna-mcp",
80-
"run",
81-
"optuna-mcp"
59+
"optuna-mcp",
8260
"--storage",
8361
"sqlite:///optuna.db"
8462
],
@@ -87,7 +65,11 @@ After cloning, include the path to your uv binary and optuna-mcp directory in yo
8765
}
8866
```
8967

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

9375
```json
@@ -111,7 +93,11 @@ You can also run the Optuna MCP server using Docker. Make sure you have Docker i
11193
}
11294
```
11395

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

116102
### Study
117103

0 commit comments

Comments
 (0)