@smallwebco/tinypivot-mcp 0.2.10 → 0.4.0

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tinypivot",
3
- "version": "0.2.10",
4
- "description": "Interactive Data IDE inside Claude — turn CSV, TSV, JSON, JSONL, API/MCP outputs, and SQL results from any database into interactive charts, deterministic pivot tables, data grids, screenshot-ready terminal cards, and Excel exports.",
3
+ "version": "0.4.0",
4
+ "description": "Data analysis studio inside Claude — turn CSV, TSV, JSON, JSONL, API/MCP outputs, and SQL results from any database into interactive charts, deterministic pivot tables, data grids, screenshot-ready terminal cards, and Excel exports.",
5
5
  "author": {
6
6
  "name": "Small Web, LLC",
7
7
  "url": "https://tiny-pivot.com"
package/README.md CHANGED
@@ -1,6 +1,18 @@
1
1
  # @smallwebco/tinypivot-mcp
2
2
 
3
- Interactive **TinyPivot MCP Server, MCP App (`ui://tinypivot/app.html`) & Native Claude Plugin** — turn CSV, TSV, JSON, JSONL, API/MCP tool outputs, and SQL results from **any database** (BigQuery, Snowflake, MySQL, DuckDB, Databricks, PostgreSQL, SQLite) into interactive charts, deterministic pivot tables, data grids, screenshot-ready terminal cards, a live Ghostty TUI, drill-through modals, and Excel exports directly inside your AI harness (Antigravity, Claude Code, Claude Desktop, Cursor, OpenCode, Codex CLI, pi, and any SEP-1865 MCP Apps host).
3
+ **TinyPivot Studio: a data analysis workspace your AI agent works in, and you can check.** Your agent loads files, runs SQL and builds charts and pivot tables through TinyPivot. Each step shows up live in the Studio, a local page in your browser, with the reason the agent gave and the exact SQL behind it. Edit that SQL and rerun it, reopen any earlier result, and send the agent notes it picks up on its next step. In the chat, TinyPivot keeps to a compact chart or table card so you can follow progress.
4
+
5
+ Works with Antigravity, Claude Code, Claude Desktop, Cursor, OpenCode, Codex CLI, pi and any MCP Apps host. Reads CSV, TSV, JSON, JSONL and Parquet files, rows from other MCP tools, and SQL results from any database.
6
+
7
+ ## TinyPivot Studio
8
+
9
+ In a terminal agent, the first TinyPivot step opens the Studio at `http://127.0.0.1:47317` (set `TINYPIVOT_OPEN_STUDIO=0` to open it yourself; a Studio tab left open from an earlier session reconnects instead of opening a new one). It has three parts:
10
+
11
+ - **Trace:** every step, newest last, marked as the agent's or yours, with its reason (the `why` the agent passes), what it shows (for example `line chart: sum(mrr) by month`), the row count, and the SQL or file filter behind it. File loads are shown as the SQL that reproduces them.
12
+ - **SQL editor:** edit a step's SQL, or write new SQL over local files and loaded tables, and run it with DuckDB, read-only. The result replaces the view, keeps the step's chart when its fields still exist, and joins the trace as your step.
13
+ - **Notes to the agent:** write what to check or change, optionally about one step. The agent receives your notes at the end of its next TinyPivot reply. To send one at once, **Copy as prompt** puts the note, the step and its SQL on your clipboard.
14
+
15
+ History holds every table the agent pulled (30 days, on your machine), and the Studio can reopen any of them without re-running the query. The Studio only answers this machine, on its own address, and accepts changes only from its own page.
4
16
 
5
17
  ## Quick Setup
6
18
 
@@ -80,7 +92,7 @@ In terminal-first harnesses (**Claude Code, Ghostty, OpenCode, pi, Codex CLI**),
80
92
  cat metrics.csv | npx @smallwebco/tinypivot-mcp@latest --open
81
93
  ```
82
94
 
83
- TinyPivot also runs a live SSE-synced localhost Companion Data IDE (`http://127.0.0.1:<port>`) for interactive filtering, drill-through, and exports.
95
+ `--open` shows the rows in TinyPivot Studio (`http://127.0.0.1:47317`) for filtering, drill-through and exports.
84
96
 
85
97
  ## Works With Any Database (Not Postgres-Only)
86
98
 
@@ -100,7 +112,7 @@ TinyPivot MCP ships with a generous **Free tier** out of the box — no account
100
112
  | Pivot Table (`sum` aggregation) | Included | All aggregations & calculated fields |
101
113
  | Data Grid (sort, filter, search, copy Markdown, CSV export) | Included | Included |
102
114
  | Framed Terminal Cards & Live Ghostty TUI (`tinypivot-mcp tui`) | Included (subtle `tiny-pivot.com` signature) | Included (watermark-free) |
103
- | Terminal Companion Data IDE (`--open` / live SSE) | Included | Included |
115
+ | TinyPivot Studio (trace, SQL editor, notes, history) | Included | Included |
104
116
  | Universal DB support via `load_file`, stdin pipe & `load_data` | Included | Included |
105
117
  | Dataset row limit | Up to 2,500 rows (explicitly bannered if truncated) | Unlimited |
106
118
  | Visual themes | `Code` theme (Dark & Light) | All 10 themes (`Code`, `Phosphor`, `Nord`, `Thermal`, `Mono`, `Paper`, `Greenbar`, `1-Bit`, `Amber CRT`, `Green CRT`) |
@@ -119,11 +131,16 @@ Unlock Pro or Team at [tiny-pivot.com/pricing](https://tiny-pivot.com/pricing).
119
131
  |---|---|
120
132
  | `open_tinypivot` | Opens TinyPivot (side pane, sidebar, or inline). Works with `{}` using the built-in sample dataset. |
121
133
  | `load_file` | Loads a local `.csv`, `.tsv`, `.json`, or `.jsonl` file (including SQL CLI exports from any database) with 0 raw rows entering LLM context; pass `chartConfig` / `pivotConfig` to render in 1 call. Pass `where` (for example `[{"field":"year","equals":[2026]}]`) to load only the rows a question is about; filtering runs on disk. |
134
+ | `query` | Runs one read-only DuckDB `SELECT` over local CSV, Parquet or JSON files and over loaded datasets (tables named by dataset id), then charts or pivots the result. Rows never enter the model's context. DuckDB (about 20 MB) downloads once, on first use, into `~/.cache/tinypivot`. |
122
135
  | `load_data` | Loads flat JSON rows already in memory (<500 rows) from any other MCP tool, API, or small SQL query without writing a temp CSV; renders chart + pivot in 1 call. |
123
136
  | `configure_pivot` | Computes a deterministic pivot table via `@smallwebco/tinypivot-core` (zero LLM math errors). |
124
137
  | `configure_chart` | Configures and opens the interactive Chart Builder (`bar`, `stackedBar`, `line`, `area`, `pie`, `donut`, etc.). |
125
138
  | `query_postgres` | *(Optional Pro)* Runs AST-validated read-only `SELECT` queries directly against `DATABASE_URL` and opens results in TinyPivot. |
126
139
  | `list_datasets` | Lists all loaded datasets, row counts, and inferred schemas. |
140
+ | `profile` | Describes each column of a loaded dataset: empty share, number and date ranges, commonest values. |
141
+ | `history` | Lists every earlier pull, or reopens one by id without re-querying. Pulls are saved locally under `~/.local/share/tinypivot/history` for 30 days. |
142
+
143
+ Data tools take an optional `why`: one sentence the agent writes about each step, shown in the Studio trace.
127
144
 
128
145
  ## Environment Variables (Optional)
129
146
 
@@ -131,9 +148,11 @@ Unlock Pro or Team at [tiny-pivot.com/pricing](https://tiny-pivot.com/pricing).
131
148
  - `DATABASE_URL` — Optional PostgreSQL connection string for direct read-only `query_postgres` (Pro). The tool is only offered to the model when this is set. Works with **any** database (BigQuery, Snowflake, MySQL, DuckDB, Databricks, SQLite, Postgres) today via CLI/file handoff (`load_file`), stdin pipe, or MCP piping (`load_data`)
132
149
  - `TINYPIVOT_ALLOWED_TABLES` — Comma-separated table allowlist for `query_postgres`
133
150
  - `TINYPIVOT_TELEMETRY=0` or `DO_NOT_TRACK=1` — Disable anonymous usage telemetry
134
- - `TINYPIVOT_NO_COMPANION=1` — Disable the localhost Companion Data IDE server
135
- - `TINYPIVOT_PORT` — Fixed localhost port for the Companion Data IDE server
136
- - `TINYPIVOT_REPRINT_CARDS` — Set to `0` so the model does not reprint each chart card in a terminal. Saves about 400 output tokens per question; the card stays visible in the Data IDE, the `tui` pane and pi.
151
+ - `TINYPIVOT_NO_COMPANION=1` — Disable the localhost Studio server
152
+ - `TINYPIVOT_PORT` — Localhost port for the Studio (default `47317`; another free port is used when it is taken, unless this is set)
153
+ - `TINYPIVOT_OPEN_STUDIO` — Set to `0` so the first TinyPivot step in a terminal agent does not open the Studio in your browser
154
+ - `TINYPIVOT_REPRINT_CARDS` — Set to `0` so the model does not reprint each chart card in a terminal. Saves about 400 output tokens per question; the card stays visible in the Studio, the `tui` pane and pi.
155
+ - `TINYPIVOT_HISTORY` — Set to `0` to stop saving pulls to history. `TINYPIVOT_HISTORY_DAYS` sets how long they are kept (default 30).
137
156
 
138
157
  ## Privacy & Telemetry
139
158