@smallwebco/tinypivot-mcp 0.3.0 → 0.5.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.
- package/.claude-plugin/plugin.json +2 -2
- package/README.md +34 -6
- package/dist/app/index.html +78 -75
- package/dist/{chunk-AFGC2C4J.js → chunk-E6DYPT62.js} +933 -119
- package/dist/cli.js +36 -18
- package/dist/index.d.ts +304 -83
- package/dist/index.js +9 -1
- package/package.json +4 -4
- package/server.json +3 -3
- package/skills/tinypivot/SKILL.md +6 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tinypivot",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.5.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,30 @@
|
|
|
1
1
|
# @smallwebco/tinypivot-mcp
|
|
2
2
|
|
|
3
|
-
|
|
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
|
+
- **Messages to the agent, with data:** write what to check or change, optionally about one step, and attach data: click a row, drill into a pivot cell, or attach the current view. It goes to the agent with the dataset id, so the agent can query the rest itself.
|
|
14
|
+
- **AI Analyst (Pro):** the Analyst tab answers questions about the loaded data. Your own agent answers, not a separate model or API key, and the SQL it suggests runs locally, read-only.
|
|
15
|
+
|
|
16
|
+
How a message reaches your agent depends on the harness. The Studio shows which one applies:
|
|
17
|
+
|
|
18
|
+
| Agent | How Studio messages arrive |
|
|
19
|
+
|---|---|
|
|
20
|
+
| pi | Live: TinyPivot's pi extension starts a turn, and the answer comes back to the Studio. Run `npx @smallwebco/tinypivot-mcp@latest init` once to install or update the extension. |
|
|
21
|
+
| Claude Code | Live when started with `claude --dangerously-load-development-channels server:tinypivot` (Claude Code channels, a research preview). The agent answers with `studio_reply`. Otherwise, with its next TinyPivot reply. |
|
|
22
|
+
| Hosts with MCP sampling | The Analyst answers with the host's own model, outside the conversation. |
|
|
23
|
+
| Others | With the agent's next TinyPivot reply. **Copy as prompt** puts the message, the step, its SQL and the data on your clipboard to paste now. |
|
|
24
|
+
|
|
25
|
+
In desktop and IDE hosts that show TinyPivot inline (Claude Desktop, VS Code, Cursor), click a row or drill into a pivot cell, then **Send to chat** to post it to the conversation with your comment.
|
|
26
|
+
|
|
27
|
+
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
28
|
|
|
5
29
|
## Quick Setup
|
|
6
30
|
|
|
@@ -80,7 +104,7 @@ In terminal-first harnesses (**Claude Code, Ghostty, OpenCode, pi, Codex CLI**),
|
|
|
80
104
|
cat metrics.csv | npx @smallwebco/tinypivot-mcp@latest --open
|
|
81
105
|
```
|
|
82
106
|
|
|
83
|
-
|
|
107
|
+
`--open` shows the rows in TinyPivot Studio (`http://127.0.0.1:47317`) for filtering, drill-through and exports.
|
|
84
108
|
|
|
85
109
|
## Works With Any Database (Not Postgres-Only)
|
|
86
110
|
|
|
@@ -100,7 +124,7 @@ TinyPivot MCP ships with a generous **Free tier** out of the box — no account
|
|
|
100
124
|
| Pivot Table (`sum` aggregation) | Included | All aggregations & calculated fields |
|
|
101
125
|
| Data Grid (sort, filter, search, copy Markdown, CSV export) | Included | Included |
|
|
102
126
|
| Framed Terminal Cards & Live Ghostty TUI (`tinypivot-mcp tui`) | Included (subtle `tiny-pivot.com` signature) | Included (watermark-free) |
|
|
103
|
-
|
|
|
127
|
+
| TinyPivot Studio (trace, SQL editor, notes, history) | Included | Included |
|
|
104
128
|
| Universal DB support via `load_file`, stdin pipe & `load_data` | Included | Included |
|
|
105
129
|
| Dataset row limit | Up to 2,500 rows (explicitly bannered if truncated) | Unlimited |
|
|
106
130
|
| Visual themes | `Code` theme (Dark & Light) | All 10 themes (`Code`, `Phosphor`, `Nord`, `Thermal`, `Mono`, `Paper`, `Greenbar`, `1-Bit`, `Amber CRT`, `Green CRT`) |
|
|
@@ -128,15 +152,19 @@ Unlock Pro or Team at [tiny-pivot.com/pricing](https://tiny-pivot.com/pricing).
|
|
|
128
152
|
| `profile` | Describes each column of a loaded dataset: empty share, number and date ranges, commonest values. |
|
|
129
153
|
| `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. |
|
|
130
154
|
|
|
155
|
+
Data tools take an optional `why`: one sentence the agent writes about each step, shown in the Studio trace.
|
|
156
|
+
|
|
131
157
|
## Environment Variables (Optional)
|
|
132
158
|
|
|
133
159
|
- `TINYPIVOT_LICENSE_KEY` — TinyPivot MCP Pro/Team license key (`TP-MCPP-...` or `TP-MCPT-...`; note that UI Library `TP-PRO*` keys apply to `@smallwebco/tinypivot-react`/`-vue` only)
|
|
134
160
|
- `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`)
|
|
135
161
|
- `TINYPIVOT_ALLOWED_TABLES` — Comma-separated table allowlist for `query_postgres`
|
|
136
162
|
- `TINYPIVOT_TELEMETRY=0` or `DO_NOT_TRACK=1` — Disable anonymous usage telemetry
|
|
137
|
-
- `TINYPIVOT_NO_COMPANION=1` — Disable the localhost
|
|
138
|
-
- `TINYPIVOT_PORT` —
|
|
139
|
-
- `
|
|
163
|
+
- `TINYPIVOT_NO_COMPANION=1` — Disable the localhost Studio server
|
|
164
|
+
- `TINYPIVOT_PORT` — Localhost port for the Studio (default `47317`; when it is taken, the Studio uses a free port and the tool replies link to it)
|
|
165
|
+
- `TINYPIVOT_CLAUDE_CHANNEL` — `1` or `0` overrides whether TinyPivot offers Claude Code a channel. By default it does when Claude Code was started with this server in `--channels` or `--dangerously-load-development-channels`.
|
|
166
|
+
- `TINYPIVOT_OPEN_STUDIO` — Set to `0` so the first TinyPivot step in a terminal agent does not open the Studio in your browser
|
|
167
|
+
- `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.
|
|
140
168
|
- `TINYPIVOT_HISTORY` — Set to `0` to stop saving pulls to history. `TINYPIVOT_HISTORY_DAYS` sets how long they are kept (default 30).
|
|
141
169
|
|
|
142
170
|
## Privacy & Telemetry
|