@smallwebco/tinypivot-mcp 0.1.0 → 0.1.2
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 +28 -0
- package/.mcp.json +11 -0
- package/README.md +84 -10
- package/dist/app/index.html +120 -176
- package/dist/{chunk-VLD3SN2I.js → chunk-LZGTF5CC.js} +3073 -1572
- package/dist/cli.js +242 -403
- package/dist/index.d.ts +29 -3
- package/dist/index.js +23 -3
- package/package.json +18 -5
- package/server.json +43 -0
- package/skills/tinypivot/SKILL.md +80 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "tinypivot",
|
|
3
|
+
"version": "0.1.2",
|
|
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.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Small Web, LLC",
|
|
7
|
+
"url": "https://tiny-pivot.com"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://tiny-pivot.com/mcp",
|
|
10
|
+
"repository": "https://github.com/Small-Web-Co/tinypivot",
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"keywords": [
|
|
13
|
+
"tinypivot",
|
|
14
|
+
"mcp",
|
|
15
|
+
"mcp-app",
|
|
16
|
+
"charts",
|
|
17
|
+
"pivot-table",
|
|
18
|
+
"data-grid",
|
|
19
|
+
"analytics",
|
|
20
|
+
"terminal-ui",
|
|
21
|
+
"csv",
|
|
22
|
+
"sql",
|
|
23
|
+
"bigquery",
|
|
24
|
+
"snowflake",
|
|
25
|
+
"postgres",
|
|
26
|
+
"excel"
|
|
27
|
+
]
|
|
28
|
+
}
|
package/.mcp.json
ADDED
package/README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
# @smallwebco/tinypivot-mcp
|
|
2
2
|
|
|
3
|
-
Interactive **TinyPivot MCP Server
|
|
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).
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Quick Setup
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
### Option 1: 1-Command Multi-Harness Setup (Recommended)
|
|
8
|
+
|
|
9
|
+
Auto-detect and wire all installed AI harnesses on your machine (Claude Code, Claude Desktop, Cursor, Antigravity, OpenCode, Codex CLI, and pi):
|
|
8
10
|
|
|
9
11
|
```bash
|
|
10
12
|
npx @smallwebco/tinypivot-mcp init
|
|
@@ -18,6 +20,76 @@ Options:
|
|
|
18
20
|
- `--no-rules` — skip adding the auto-use TinyPivot rule to `~/.claude/CLAUDE.md`
|
|
19
21
|
- `--dry-run` — preview changes without modifying files
|
|
20
22
|
|
|
23
|
+
### Option 2: Install as a Native Claude Code / Claude Desktop Plugin
|
|
24
|
+
|
|
25
|
+
This package ships as a self-contained Claude plugin bundle containing:
|
|
26
|
+
|
|
27
|
+
- `.claude-plugin/plugin.json` — plugin manifest
|
|
28
|
+
- `.mcp.json` — registers `mcpServers.tinypivot` (`npx -y @smallwebco/tinypivot-mcp`)
|
|
29
|
+
- `skills/tinypivot/SKILL.md` — teaches Claude when to invoke TinyPivot automatically, how to render in 1 tool call, when to use `load_data` vs `load_file`, and to echo TinyPivot terminal cards verbatim
|
|
30
|
+
|
|
31
|
+
**Claude Code / Claude Desktop (directly from GitHub marketplace):**
|
|
32
|
+
|
|
33
|
+
```text
|
|
34
|
+
/plugin marketplace add Small-Web-Co/tinypivot
|
|
35
|
+
/plugin install tinypivot@tinypivot
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**Claude Code (from a local clone or unpacked package):**
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
# Try for a single session without installing permanently
|
|
42
|
+
claude --plugin-dir ./packages/mcp
|
|
43
|
+
|
|
44
|
+
# Install permanently into your Claude Code plugin config
|
|
45
|
+
claude plugin install ./packages/mcp
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**Claude Desktop & Claude Code (via 1-command installer):**
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
npx @smallwebco/tinypivot-mcp init --targets=claude,claude-desktop
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Or copy the bundled `.mcp.json` server block directly into Claude Desktop's `claude_desktop_config.json`.
|
|
55
|
+
|
|
56
|
+
> **Make TinyPivot your default chart renderer:** The TinyPivot MCP server advertises authoritative `instructions`, and both `npx @smallwebco/tinypivot-mcp init` (via `~/.claude/CLAUDE.md`) and the native Claude Plugin (`skills/tinypivot/SKILL.md`) automatically route chart, YoY/MoM comparison, and pivot requests to TinyPivot in **Claude Code** and **Claude Code Desktop**. For **Claude Desktop** chat (which may otherwise default to its built-in visualization widget), add this one-line preference under **Settings → General → Personal Preferences**:
|
|
57
|
+
>
|
|
58
|
+
> `Always use the tinypivot MCP server (load_data or load_file with chartConfig/pivotConfig in one call) instead of built-in visualization widgets, HTML/SVG/React chart artifacts, or large Markdown tables whenever I ask for charts, YoY/MoM comparisons, pivot tables, or tabular data analysis.`
|
|
59
|
+
|
|
60
|
+
## Terminal Cards, Stdin Piping & Live Ghostty TUI
|
|
61
|
+
|
|
62
|
+
In terminal-first harnesses (**Claude Code, Ghostty, OpenCode, pi, Codex CLI**), TinyPivot delivers three complementary ways to inspect your data without leaving your terminal:
|
|
63
|
+
|
|
64
|
+
1. **Framed Unicode Terminal Cards:** Every chart and pivot call prints a crisp rounded-border card (`╭─ ... ─╮`) with sub-block bars, stacked multi-series legends, 2x4 Braille line charts, and box-drawn pivot tables with inline sparklines (`▁▂▃▄▅▆▇█`) right in your terminal scrollback.
|
|
65
|
+
2. **Live Split-Pane TUI (`Ghostty` / tmux / any terminal):** Open a side pane and attach directly to your running agent's TinyPivot session via live SSE:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
npx @smallwebco/tinypivot-mcp tui
|
|
69
|
+
# or pass an explicit Companion URL:
|
|
70
|
+
npx @smallwebco/tinypivot-mcp tui http://127.0.0.1:<port>
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Keyboard controls inside the live TUI: `[1] Chart` · `[2] Pivot` · `[3] Data` · `[t] Theme` · `[q] Quit`. Every agent query updates the split pane automatically.
|
|
74
|
+
3. **Direct Stdin Piping & Live Browser Companion:** Pipe CSV or JSON straight from any CLI or SQL tool into TinyPivot without creating temporary files:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
# Pipe any SQL CLI or data command straight into TinyPivot
|
|
78
|
+
duckdb -csv -c "SELECT region, month, SUM(revenue) AS revenue FROM 'sales.parquet' GROUP BY 1, 2" | npx @smallwebco/tinypivot-mcp --open
|
|
79
|
+
psql "$DATABASE_URL" --csv -c "SELECT * FROM monthly_revenue" | npx @smallwebco/tinypivot-mcp --open
|
|
80
|
+
cat metrics.csv | npx @smallwebco/tinypivot-mcp --open
|
|
81
|
+
```
|
|
82
|
+
|
|
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.
|
|
84
|
+
|
|
85
|
+
## Works With Any Database (Not Postgres-Only)
|
|
86
|
+
|
|
87
|
+
TinyPivot is **database-agnostic**. Use whichever data workflow matches your stack:
|
|
88
|
+
|
|
89
|
+
- **BigQuery, Snowflake, MySQL, DuckDB, Databricks, SQLite, ClickHouse, or Postgres (CLI / file handoff — 0 raw rows in LLM context):** Export query output to `.csv`, `.tsv`, `.json`, or `.jsonl` via `bq`, `snowsql`, `mysql`, `duckdb`, `databricks`, or `psql` and pass the path to `load_file` (or pipe stdout straight into `npx @smallwebco/tinypivot-mcp --open`).
|
|
90
|
+
- **Any MCP Server or API (Stripe, GitHub, BigQuery MCP, Snowflake MCP, REST APIs):** Pipe structured JSON rows (<500 rows already in memory) directly into `load_data` with `chartConfig` / `pivotConfig` in a single call — no temp CSV required.
|
|
91
|
+
- **Optional Direct PostgreSQL Connector (Pro):** If you use PostgreSQL and want zero-temp-file SQL execution inside the MCP server itself, set `DATABASE_URL` (and optionally `TINYPIVOT_ALLOWED_TABLES`) to enable the AST-validated, read-only `query_postgres` tool.
|
|
92
|
+
|
|
21
93
|
## Free vs. Pro
|
|
22
94
|
|
|
23
95
|
TinyPivot MCP ships with a generous **Free tier** out of the box — no account or API key required:
|
|
@@ -27,13 +99,15 @@ TinyPivot MCP ships with a generous **Free tier** out of the box — no account
|
|
|
27
99
|
| Core Charts (`bar`, `stackedBar`, `line`, `area`, `pie`, `donut`) | Included | Included + all chart types |
|
|
28
100
|
| Pivot Table (`sum` aggregation) | Included | All aggregations & calculated fields |
|
|
29
101
|
| Data Grid (sort, filter, search, copy Markdown, CSV export) | Included | Included |
|
|
102
|
+
| Framed Terminal Cards & Live Ghostty TUI (`tinypivot-mcp tui`) | Included (subtle `tiny-pivot.com` signature) | Included (watermark-free) |
|
|
30
103
|
| Terminal Companion Data IDE (`--open` / live SSE) | Included | Included |
|
|
104
|
+
| Universal DB support via `load_file`, stdin pipe & `load_data` | Included | Included |
|
|
31
105
|
| Dataset row limit | Up to 2,500 rows (explicitly bannered if truncated) | Unlimited |
|
|
32
106
|
| Visual themes | `Code` theme (Dark & Light) | All 5 themes (`Code`, `Phosphor`, `Nord`, `Thermal`, `Mono`) |
|
|
33
107
|
| Drill-Through modals | — | Included |
|
|
34
108
|
| Formatted `.xlsx` Excel export | — | Included |
|
|
35
|
-
|
|
|
36
|
-
| Watermark-free UI | — | Included |
|
|
109
|
+
| Optional direct `query_postgres` (`DATABASE_URL`) | — | Included |
|
|
110
|
+
| Watermark-free UI & terminal cards | — | Included |
|
|
37
111
|
|
|
38
112
|
> **High-Trust Row Limit:** If a dataset exceeds 2,500 rows on the Free tier, TinyPivot never truncates silently — both the UI (amber top banner) and the tool summary sent to the LLM explicitly state `Showing first 2,500 of N rows — totals reflect this subset only`.
|
|
39
113
|
|
|
@@ -44,17 +118,17 @@ Unlock Pro or Team at [tiny-pivot.com/mcp](https://tiny-pivot.com/mcp).
|
|
|
44
118
|
| Tool | Purpose |
|
|
45
119
|
|---|---|
|
|
46
120
|
| `open_tinypivot` | Opens TinyPivot (side pane, sidebar, or inline). Works with `{}` using the built-in sample dataset. |
|
|
47
|
-
| `load_file` | Loads a local `.csv`, `.tsv`, `.json`, or `.jsonl` file
|
|
48
|
-
| `load_data` | Loads flat JSON rows from any other MCP tool
|
|
121
|
+
| `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. |
|
|
122
|
+
| `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. |
|
|
49
123
|
| `configure_pivot` | Computes a deterministic pivot table via `@smallwebco/tinypivot-core` (zero LLM math errors). |
|
|
50
124
|
| `configure_chart` | Configures and opens the interactive Chart Builder (`bar`, `stackedBar`, `line`, `area`, `pie`, `donut`, etc.). |
|
|
51
|
-
| `query_postgres` | *(Pro)* Runs AST-validated read-only `SELECT` queries against `DATABASE_URL` and opens results in TinyPivot. |
|
|
125
|
+
| `query_postgres` | *(Optional Pro)* Runs AST-validated read-only `SELECT` queries directly against `DATABASE_URL` and opens results in TinyPivot. |
|
|
52
126
|
| `list_datasets` | Lists all loaded datasets, row counts, and inferred schemas. |
|
|
53
127
|
|
|
54
128
|
## Environment Variables (Optional)
|
|
55
129
|
|
|
56
|
-
- `TINYPIVOT_LICENSE_KEY` — TinyPivot Pro/Team license key (`TP-...`)
|
|
57
|
-
- `DATABASE_URL` — PostgreSQL connection string for read-only `query_postgres` (Pro)
|
|
130
|
+
- `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)
|
|
131
|
+
- `DATABASE_URL` — Optional PostgreSQL connection string for direct read-only `query_postgres` (Pro). 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`)
|
|
58
132
|
- `TINYPIVOT_ALLOWED_TABLES` — Comma-separated table allowlist for `query_postgres`
|
|
59
133
|
- `TINYPIVOT_TELEMETRY=0` or `DO_NOT_TRACK=1` — Disable anonymous usage telemetry
|
|
60
134
|
- `TINYPIVOT_NO_COMPANION=1` — Disable the localhost Companion Data IDE server
|