@barivia/barsom-mcp 0.2.4 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -16
- package/dist/index.d.ts +1 -1
- package/dist/index.js +527 -495
- package/dist/index.js.map +1 -1
- package/dist/views/src/views/training-monitor/index.html +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @barivia/barsom-mcp
|
|
2
2
|
|
|
3
|
-
MCP proxy for the Barivia Analytics Engine -- connects any stdio MCP client (Cursor, Claude Desktop, etc.) to the barSOM cloud API.
|
|
3
|
+
MCP proxy for the Barivia Analytics Engine -- connects any stdio MCP client (Cursor, Claude Desktop, etc.) to the barSOM cloud API. 13 tools covering the full data analysis lifecycle: upload, preview, train, analyze, compare, and export.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -32,16 +32,14 @@ This is the standard pattern for MCP servers distributed as npm packages (same a
|
|
|
32
32
|
|
|
33
33
|
Legacy `BARSOM_API_KEY` / `BARSOM_API_URL` are also accepted as fallbacks.
|
|
34
34
|
|
|
35
|
-
## Tools (
|
|
35
|
+
## Tools (13)
|
|
36
36
|
|
|
37
37
|
### Data Management
|
|
38
38
|
|
|
39
39
|
| Tool | Description |
|
|
40
40
|
|---|---|
|
|
41
|
-
| `
|
|
42
|
-
| `
|
|
43
|
-
| `preview_dataset` | Inspect columns, statistics, sample rows, detect datetime columns, suggest temporal features |
|
|
44
|
-
| `delete_dataset` | Delete dataset and S3 artifacts |
|
|
41
|
+
| `datasets` | upload: add CSV; preview: inspect columns/stats/samples before train_som; subset: create subset by row_range or filter; delete: remove dataset |
|
|
42
|
+
| `list` | List datasets (type=datasets) or jobs (type=jobs; optional dataset_id filter) |
|
|
45
43
|
|
|
46
44
|
### Training Lifecycle
|
|
47
45
|
|
|
@@ -49,20 +47,16 @@ Legacy `BARSOM_API_KEY` / `BARSOM_API_URL` are also accepted as fallbacks.
|
|
|
49
47
|
|---|---|
|
|
50
48
|
| `train_som` | Submit training job with full control: model type (SOM/RSOM/SOM-SOFT/RSOM-SOFT), grid size, epochs, learning rate curves, feature weights, cyclic encoding, temporal features |
|
|
51
49
|
| `get_job_status` | Check training progress and estimated completion |
|
|
52
|
-
| `
|
|
53
|
-
| `list_jobs` | List all jobs with status, parameters, and timing |
|
|
54
|
-
| `delete_job` | Delete job and all result artifacts |
|
|
50
|
+
| `manage_job` | Cancel (action=cancel) or delete (action=delete) a job |
|
|
55
51
|
|
|
56
52
|
### Results & Export
|
|
57
53
|
|
|
58
54
|
| Tool | Description |
|
|
59
55
|
|---|---|
|
|
60
|
-
| `get_results` | Download results with inline images and quality metrics |
|
|
61
|
-
| `
|
|
62
|
-
| `get_weights` | Export raw SOM weight matrix and normalization parameters |
|
|
63
|
-
| `get_node_data` | Per-node hit counts and feature-value distributions |
|
|
56
|
+
| `get_results` | Download results with inline images and quality metrics; use figures to request specific plots (e.g. figures: ["umatrix"] or figures: "all") |
|
|
57
|
+
| `get_job_export` | Export training_log (learning curves), weights (weight matrix + node_coords), or nodes (per-node statistics) |
|
|
64
58
|
|
|
65
|
-
### Analysis (
|
|
59
|
+
### Analysis (10 types via `analyze`)
|
|
66
60
|
|
|
67
61
|
| Type | Description |
|
|
68
62
|
|---|---|
|
|
@@ -75,6 +69,7 @@ Legacy `BARSOM_API_KEY` / `BARSOM_API_URL` are also accepted as fallbacks.
|
|
|
75
69
|
| `transition_flow` | Temporal trajectory analysis with quiver plots |
|
|
76
70
|
| `local_density` | Node neighborhood density analysis |
|
|
77
71
|
| `feature_gradient` | Spatial gradient magnitude across the SOM |
|
|
72
|
+
| `quality_report` | Extended quality metrics (trustworthiness, neighborhood preservation, recommendations) |
|
|
78
73
|
|
|
79
74
|
### Advanced Analysis
|
|
80
75
|
|
|
@@ -82,8 +77,7 @@ Legacy `BARSOM_API_KEY` / `BARSOM_API_URL` are also accepted as fallbacks.
|
|
|
82
77
|
|---|---|
|
|
83
78
|
| `compare_runs` | Side-by-side metric comparison across training runs |
|
|
84
79
|
| `project_variable` | Project a derived variable onto a trained SOM |
|
|
85
|
-
| `transition_flow` | Dedicated temporal flow analysis |
|
|
86
|
-
| `quality_report` | Extended quality metrics (trustworthiness, neighborhood preservation) |
|
|
80
|
+
| `transition_flow` | Dedicated temporal flow analysis (submit job, poll, return flow plot) |
|
|
87
81
|
|
|
88
82
|
### System
|
|
89
83
|
|
|
@@ -100,6 +94,10 @@ When adding or refining tools, follow [MCP best practices](https://modelcontextp
|
|
|
100
94
|
- **Explicit parameter descriptions** — Each parameter should describe format, constraints, and when to use it
|
|
101
95
|
- **Bounded capability** — Focused tools with specific contracts; prefer narrow, testable actions over broad ones
|
|
102
96
|
|
|
97
|
+
## Data preparation
|
|
98
|
+
|
|
99
|
+
To train on a subset of your data (e.g. first 2000 rows, or rows where region=Europe) without re-uploading: use **datasets(action=subset)** with `row_range` and/or `filter` to create a new dataset, then **train_som** on the new dataset_id; or pass **row_range** in **train_som** params for a one-off training slice.
|
|
100
|
+
|
|
103
101
|
## How It Works
|
|
104
102
|
|
|
105
103
|
The proxy implements the MCP stdio transport locally and translates tool calls into REST API requests to the Barivia backend. Results are returned as rich MCP content with text summaries, inline base64 images, and resource links.
|