You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+92-54Lines changed: 92 additions & 54 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
<h1align="center">Toolomics</h1>
2
2
3
3
<palign="center">
4
-
<em>A suite of MCP-based Tools from the HolobiomicsLab. Used by AI-Agents such as <i>Mimosa-AI</i></em>
4
+
<em>Companion platform for MCP server management and workspace-isolated scientific tool execution for Mimosa and other MCP-compatible agents.</em>
5
5
</p>
6
6
7
7
<palign="center">
@@ -21,14 +21,15 @@
21
21
22
22
---
23
23
24
-
> ***Toolomics***— deploys containerized tools, manages isolated instances, and enables file sharing across AI agents for bioinformatics, metabolomics, molecular docking, and beyond.
24
+
> ***Toolomics***exposes computational tools as discoverable MCP services, manages isolated multi-instance workspaces, and lets agents share files across scientific workflows.
25
25
26
-
**Use cases:**
27
-
- Deploy MCP servers for browser automation, PDF processing, and data extraction
28
-
- Run isolated, multi-instance agent workspaces with automatic resource management
29
-
- Orchestrate containerized bioinformatics pipelines (XCMS, RStudio, Redis) with zero config
26
+
In this repository, Toolomics:
27
+
- discovering MCP services from `server.py` and `docker-compose.yml` definitions under `mcp_host/`
28
+
- assigning ports and recording them in instance-specific `config_<instance_id>.json` files
29
+
- isolating workspaces, Docker projects, volumes, and auxiliary services per deployment instance
30
+
- making files created by one MCP server immediately available to other MCP servers through a shared workspace
30
31
31
-
## Install & deploy tools
32
+
## Quick Start
32
33
33
34
### Deploy all automatically with default setup for Mimosa-AI
34
35
@@ -48,37 +49,57 @@ This would create a workspace `workspace/` and start all Toolomics MCPs servers
48
49
./start.sh <min port><max port><workspace name>
49
50
```
50
51
51
-
### Deploy using python script
52
+
Example:
52
53
53
-
***Not recommanded, start.sh will handle python, requirements and workpsace installation automatically.***
54
+
```bash
55
+
./start.sh 5000 5099 workspace_mimosa
56
+
```
57
+
58
+
On first run, Toolomics will:
59
+
1. check Python and `pip`
60
+
2. optionally install `requirements.txt`
61
+
3. create or reuse the requested workspace
62
+
4. derive an instance ID from the workspace path
63
+
5. create or update `config_<instance_id>.json` with discovered services and assigned ports
54
64
55
-
First, install the required dependencies, you can use either pip or the faster UV package manager:
65
+
Newly discovered services are added with `"enabled": false` by default. Enable the MCP servers you want in the generated config file, then rerun `./start.sh`.
56
66
57
-
**1. Install dependencies:**
67
+
### Manual Deployment
68
+
69
+
If you prefer to run the deployment script directly:
Passing `--config config.json` is supported, but `deploy.py` will automatically expand it to an instance-specific file such as `config_86517947.json` based on the workspace path.
84
+
85
+
## Centralized Workspace
70
86
71
-
All MCP servers execute in a centralized **workspace directory** (default: `workspace/`). This means:
87
+
All MCP servers execute against a centralized workspace directory (default: `workspace/`). This means:
- PDF MCP processes files already present in the workspace
91
+
- Other MCP servers can consume the same files without copying them between tool-specific directories
92
+
93
+
Example paths:
94
+
-`workspace/downloaded_file.pdf`
95
+
-`workspace/extracted_text.txt`
96
+
-`workspace/output_file.json`
76
97
77
98
This centralized approach ensures that AI agents can easily find and work with files across different MCP tools without needing to track file locations.
78
99
79
100
## Multi-Instance Deployment
80
101
81
-
Toolomics supports running **multiple independent instances simultaneously**, each with its own workspace and Docker service isolation.
102
+
Toolomics supports running multiple independent instances simultaneously, each with its own workspace and Docker service isolation.
82
103
83
104
### How It Works
84
105
@@ -88,14 +109,14 @@ Each instance is automatically assigned a unique **instance ID** (8-character ha
88
109
89
110
This means each instance has its own configuration and doesn't interfere with others.
90
111
91
-
**Example: Deploy two instances concurrently**
112
+
**Example: deploy two instances concurrently**
92
113
93
114
```bash
94
115
# Terminal 1: Instance for user Martin
95
-
start.sh 5000 5100 workspace_martin
116
+
./start.sh 5000 5099 workspace_martin
96
117
97
118
# Terminal 2: Instance for user John (simultaneous)
98
-
start.sh 5100 5200 workspace_john
119
+
./start.sh 5100 5199 workspace_john
99
120
```
100
121
101
122
### Automatic Resource Isolation
@@ -107,31 +128,49 @@ Each instance automatically gets isolated resources:
107
128
|**Workspace**| Separate directory (`workspace_martin/`, `workspace_john/`) |
108
129
|**Docker Containers**| Suffixed with instance ID (`xcmsrocker_a3f2b1c9`, `xcmsrocker_f7e2d4a1`) |
This multi-tenant, workspace-isolated design is the same property referenced in the manuscript when Toolomics is described as the companion discovery and execution layer for Mimosa.
135
+
136
+
## Discovering And Using MCP Services
114
137
115
-
To interact with the tools using a client (e.g., for your AI agent), you can use the `fastmcp` library.
138
+
To interact with the tools using a client such as Mimosa or another MCP-compatible agent, you can use the generated config file directly or scan a predefined local port range.
116
139
117
140
### Finding the MCP Port
118
141
119
-
Each MCP server is assigned a port, which is recorded in the `config.json` file. For example:
142
+
Each MCP server is assigned a port, which is recorded in the instance-specific config file. For example:
120
143
121
144
```json
122
145
[
123
-
{
124
-
"mcp_host/browser/server.py": 5002
125
-
},
126
-
{
127
-
"mcp_host/Rscript/server.py": 5001
128
-
},
129
-
{
130
-
"mcp_host/files/csv/server.py": 5101
131
-
}
146
+
{
147
+
"path": "mcp_host/pdf/server.py",
148
+
"port": 5002,
149
+
"enabled": true
150
+
},
151
+
{
152
+
"path": "mcp_host/image_analysis/server.py",
153
+
"port": 5006,
154
+
"enabled": true
155
+
},
156
+
{
157
+
"path": "mcp_host/shell/docker-compose.yml",
158
+
"port": 5012,
159
+
"enabled": true
160
+
}
132
161
]
133
162
```
134
163
164
+
### Scanning A Predefined Port Range
165
+
166
+
Toolomics includes a helper script that scans `localhost:5000-5200` and enumerates active MCP tools:
167
+
168
+
```bash
169
+
python3 discover_mcp.py
170
+
```
171
+
172
+
This mirrors the local port-range discovery pattern described in the manuscript for Mimosa's tool discovery layer.
173
+
135
174
### Example Client Code
136
175
137
176
Here is an example of how to use a client to interact with an MCP server running on port `5002`:
@@ -158,17 +197,16 @@ async def main():
158
197
# Other MCP tools can access it from the same location
159
198
```
160
199
161
-
## Adding a New MCP
200
+
## Adding A New MCP
162
201
163
202
You can easily add a new tool as an MCP server.
164
203
165
204
### Steps to Add a New MCP
166
205
167
-
1. Create a `server.py` file with your MCP implementation, it should take the port number as first argument (eg: `server.py 5003`).
168
-
2. Place the file in a subfolder of the `mcp_host` directory. For example, to add a metabolomics-related tool, create a subfolder like `mcp_host/your_tool_name`.
169
-
170
-
The `deploy.py` script will look for new `server.py` file, attribute a port for your script and add it to `config.json` (unless you manually did by modifying the config.json), finally it will run your script with the assigned port as first argument.
171
-
206
+
1. Create a `server.py` file with your MCP implementation. It should accept the assigned port as either an environment variable or the first command-line argument.
207
+
2. Place the file in a subfolder of `mcp_host/`, for example `mcp_host/your_tool_name/server.py`.
208
+
3. Run `./start.sh` or `deploy.py` to let Toolomics discover the service and assign it a port.
209
+
4. Set `"enabled": true` for the new service in the generated `config_<instance_id>.json`, then rerun deployment.
172
210
173
211
### Example MCP Implementation
174
212
@@ -177,16 +215,17 @@ The `fastmcp` library simplifies the creation of MCP servers. Here's a basic exa
When you run the `start.sh` or `deploy.py` script for the first time, it will automatically assign a port to your new MCP server and save the mapping in the `config.json` file.
218
-
219
254
## Dockerizing an MCP Server
220
255
221
-
For MCP servers that require isolated dependencies or need to run in a containerized environment (e.g., for ML models, system tools, or heavy dependencies), you can deploy them using Docker.
256
+
For MCP servers that require isolated dependencies or need to run in a containerized environment, you can deploy them with Docker. This is one of the main ways Toolomics keeps tool dependencies isolated across concurrent scientific workflows.
222
257
223
258
### How It Works
224
259
225
260
If a `docker-compose.yml` file exists in the same directory as your `server.py`, the deployment script will:
226
261
-**Automatically deploy the server in Docker** instead of running it directly on the host
227
262
-**Skip the standalone Python execution** to avoid duplicate deployments
228
263
-**Pass the assigned port** to the Docker container via the `MCP_PORT` environment variable
264
+
-**Pass instance isolation metadata** such as `INSTANCE_ID` and `WORKSPACE_PATH` to the container
229
265
230
266
### Steps to Dockerize an MCP
231
267
@@ -288,8 +324,9 @@ services:
288
324
- "${MCP_PORT}:${MCP_PORT}"
289
325
environment:
290
326
- MCP_PORT=${MCP_PORT}
327
+
- INSTANCE_ID=${INSTANCE_ID}
291
328
volumes:
292
-
- ../../workspace:/workspace
329
+
- ../../${WORKSPACE_PATH}:/app/workspace:rw
293
330
```
294
331
295
332
**Important**: The build context must be set to the project root (`../..`) to allow the Dockerfile to access `shared.py` and other project files.
Copy file name to clipboardExpand all lines: docs/licensing-notes.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,6 @@ This wording is intended for repository governance documentation and remains sub
25
25
26
26
## Co-authorship context (informational)
27
27
28
-
Current named research co-authors: Martin Legrand, Tao Jiang, Matthieu Feraud, Benjamin Navet, and Louis-Felix Nothias.
28
+
Current named manuscript co-authors: Martin Legrand, Tao Jiang, Matthieu Feraud, Benjamin Navet, Yousouf Taghzouti, Fabien Gandon, Elise Dumont, and Louis-Felix Nothias.
29
29
30
30
This co-authorship note is informational and does not itself determine legal ownership or licensing authority.
0 commit comments