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
+93-55Lines changed: 93 additions & 55 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 **Mimosa-AI**</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,52 +21,73 @@
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
-
### Deploy all tools automatically
34
+
Run Toolomics against a workspace and a port range:
34
35
35
36
```bash
36
37
./start.sh <min port><max port><workspace name>
37
38
```
38
39
39
-
### Deploy using python script
40
+
Example:
40
41
41
-
***Not recommanded, start.sh will handle python, requirements and workpsace installation automatically.***
42
+
```bash
43
+
./start.sh 5000 5099 workspace_mimosa
44
+
```
45
+
46
+
On first run, Toolomics will:
47
+
1. check Python and `pip`
48
+
2. optionally install `requirements.txt`
49
+
3. create or reuse the requested workspace
50
+
4. derive an instance ID from the workspace path
51
+
5. create or update `config_<instance_id>.json` with discovered services and assigned ports
42
52
43
-
First, install the required dependencies, you can use either pip or the faster UV package manager:
53
+
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`.
44
54
45
-
**1. Install dependencies:**
55
+
### Manual Deployment
56
+
57
+
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.
72
+
73
+
## Centralized Workspace
58
74
59
-
All MCP servers execute in a centralized **workspace directory** (default: `workspace/`). This means:
75
+
All MCP servers execute against a centralized workspace directory (default: `workspace/`). This means:
- PDF MCP processes files already present in the workspace
79
+
- Other MCP servers can consume the same files without copying them between tool-specific directories
80
+
81
+
Example paths:
82
+
-`workspace/downloaded_file.pdf`
83
+
-`workspace/extracted_text.txt`
84
+
-`workspace/output_file.json`
64
85
65
86
This centralized approach ensures that AI agents can easily find and work with files across different MCP tools without needing to track file locations.
66
87
67
88
## Multi-Instance Deployment
68
89
69
-
Toolomics supports running **multiple independent instances simultaneously**, each with its own workspace and Docker service isolation.
90
+
Toolomics supports running multiple independent instances simultaneously, each with its own workspace and Docker service isolation.
70
91
71
92
### How It Works
72
93
@@ -76,14 +97,14 @@ Each instance is automatically assigned a unique **instance ID** (8-character ha
76
97
77
98
This means each instance has its own configuration and doesn't interfere with others.
78
99
79
-
**Example: Deploy two instances concurrently**
100
+
**Example: deploy two instances concurrently**
80
101
81
102
```bash
82
103
# Terminal 1: Instance for user Martin
83
-
start.sh 5000 5100 workspace_martin
104
+
./start.sh 5000 5099 workspace_martin
84
105
85
106
# Terminal 2: Instance for user John (simultaneous)
86
-
start.sh 5100 5200 workspace_john
107
+
./start.sh 5100 5199 workspace_john
87
108
```
88
109
89
110
### Automatic Resource Isolation
@@ -95,31 +116,49 @@ Each instance automatically gets isolated resources:
95
116
|**Workspace**| Separate directory (`workspace_martin/`, `workspace_john/`) |
96
117
|**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.
123
+
124
+
## Discovering And Using MCP Services
102
125
103
-
To interact with the tools using a client (e.g., for your AI agent), you can use the `fastmcp` library.
126
+
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.
104
127
105
128
### Finding the MCP Port
106
129
107
-
Each MCP server is assigned a port, which is recorded in the `config.json` file. For example:
130
+
Each MCP server is assigned a port, which is recorded in the instance-specific config file. For example:
108
131
109
132
```json
110
133
[
111
-
{
112
-
"mcp_host/browser/server.py": 5002
113
-
},
114
-
{
115
-
"mcp_host/Rscript/server.py": 5001
116
-
},
117
-
{
118
-
"mcp_host/files/csv/server.py": 5101
119
-
}
134
+
{
135
+
"path": "mcp_host/pdf/server.py",
136
+
"port": 5002,
137
+
"enabled": true
138
+
},
139
+
{
140
+
"path": "mcp_host/image_analysis/server.py",
141
+
"port": 5006,
142
+
"enabled": true
143
+
},
144
+
{
145
+
"path": "mcp_host/shell/docker-compose.yml",
146
+
"port": 5012,
147
+
"enabled": true
148
+
}
120
149
]
121
150
```
122
151
152
+
### Scanning A Predefined Port Range
153
+
154
+
Toolomics includes a helper script that scans `localhost:5000-5200` and enumerates active MCP tools:
155
+
156
+
```bash
157
+
python3 discover_mcp.py
158
+
```
159
+
160
+
This mirrors the local port-range discovery pattern described in the manuscript for Mimosa's tool discovery layer.
161
+
123
162
### Example Client Code
124
163
125
164
Here is an example of how to use a client to interact with an MCP server running on port `5002`:
@@ -146,17 +185,16 @@ async def main():
146
185
# Other MCP tools can access it from the same location
147
186
```
148
187
149
-
## Adding a New MCP
188
+
## Adding A New MCP
150
189
151
190
You can easily add a new tool as an MCP server.
152
191
153
192
### Steps to Add a New MCP
154
193
155
-
1. Create a `server.py` file with your MCP implementation, it should take the port number as first argument (eg: `server.py 5003`).
156
-
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`.
157
-
158
-
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.
159
-
194
+
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.
195
+
2. Place the file in a subfolder of `mcp_host/`, for example `mcp_host/your_tool_name/server.py`.
196
+
3. Run `./start.sh` or `deploy.py` to let Toolomics discover the service and assign it a port.
197
+
4. Set `"enabled": true` for the new service in the generated `config_<instance_id>.json`, then rerun deployment.
160
198
161
199
### Example MCP Implementation
162
200
@@ -165,16 +203,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.
206
-
207
242
## Dockerizing an MCP Server
208
243
209
-
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.
244
+
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.
210
245
211
246
### How It Works
212
247
213
248
If a `docker-compose.yml` file exists in the same directory as your `server.py`, the deployment script will:
214
249
-**Automatically deploy the server in Docker** instead of running it directly on the host
215
250
-**Skip the standalone Python execution** to avoid duplicate deployments
216
251
-**Pass the assigned port** to the Docker container via the `MCP_PORT` environment variable
252
+
-**Pass instance isolation metadata** such as `INSTANCE_ID` and `WORKSPACE_PATH` to the container
217
253
218
254
### Steps to Dockerize an MCP
219
255
@@ -276,8 +312,9 @@ services:
276
312
- "${MCP_PORT}:${MCP_PORT}"
277
313
environment:
278
314
- MCP_PORT=${MCP_PORT}
315
+
- INSTANCE_ID=${INSTANCE_ID}
279
316
volumes:
280
-
- ../../workspace:/workspace
317
+
- ../../${WORKSPACE_PATH}:/app/workspace:rw
281
318
```
282
319
283
320
**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