|
1 | 1 | # STAMP MCP Server |
2 | 2 |
|
3 | | -A FastMCP-based Model Context Protocol server wrapping [STAMP](https://github.com/KatherLab/STAMP)’s CLI, enabling seamless integration of STAMP preprocessing, training, encoding, evaluation, and inference into LLM-based pipelines. |
| 3 | +A FastMCP-based Model Context Protocol server wrapping [STAMP](https://github.com/KatherLab/STAMP)'s tools, enabling seamless integration of STAMP preprocessing, training, encoding, evaluation, and inference into LLM-based pipelines. |
4 | 4 |
|
5 | 5 | ## Overview |
6 | 6 |
|
7 | 7 | This server lets LLM agents invoke STAMP tools via structured calls. It exposes the following tools: |
8 | 8 |
|
9 | | -- `preprocess_stamp(...)`: tile & extract WSI features |
10 | | -- `train_stamp(...)`: train weakly supervised models |
11 | | -- `crossval_stamp(...)`: k-fold cross‑validation |
12 | | -- `deploy_stamp(...)`: inference on held‑out data |
13 | | -- `encode_slides_stamp(...)`: slide-level feature encoding |
14 | | -- `encode_patients_stamp(...)`: patient-level feature encoding |
15 | | -- `heatmaps_stamp(...)`: model-based heatmap visualization |
16 | | -- `statistics_stamp(...)`: compute classification metrics |
17 | | -- `read_file(...)` & `list_files(...)`: safe disk access |
18 | | -- `check_available_devices()`: query Torch/Platform device availability |
19 | | - |
20 | | -Each tool serializes config into YAML, launches `stamp <mode>`, streams logs back, and returns stdout/stderr. |
| 9 | +- `preprocess_stamp()`: tile & extract WSI features |
| 10 | +- `train_stamp()`: train weakly supervised models |
| 11 | +- `crossval_stamp()`: k-fold cross‑validation |
| 12 | +- `deploy_stamp()`: inference on held‑out data |
| 13 | +- `encode_slides_stamp()`: slide-level feature encoding |
| 14 | +- `encode_patients_stamp()`: patient-level feature encoding |
| 15 | +- `heatmaps_stamp()`: model-based heatmap visualization |
| 16 | +- `statistics_stamp()`: compute classification metrics |
| 17 | +- `read_file()` & `list_files()`: safe disk access |
| 18 | +- `check_available_devices()`: query Torch/Platform device availability |
| 19 | +- `analyze_csv()` & `list_column_values`: useful for clinical and slide tables |
| 20 | + |
| 21 | +Each tool serializes config into YAML and directly calls STAMP's internal `_run_cli()` function, streaming logs back in real-time and returning execution results. |
21 | 22 |
|
22 | 23 | ## Installation |
23 | 24 | To run the MCP server is as simple as intalling STAMP as it is explained in the main README.md file, but adding `--extra mcp` to the command. For a GPU repository installation it would be like this: |
|
0 commit comments