@smallwebco/tinypivot-mcp 0.0.0-stage → 0.1.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/LICENSE.md +78 -0
- package/README.md +67 -2
- package/dist/app/index.html +1489 -0
- package/dist/chunk-2ESYSVXG.js +48 -0
- package/dist/chunk-NVYPTGIN.js +741 -0
- package/dist/chunk-VLD3SN2I.js +9983 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +487 -0
- package/dist/excel-FT5GZR62.js +59094 -0
- package/dist/index.d.ts +166 -0
- package/dist/index.js +41 -0
- package/dist/p256-4W2AZLMI.js +2207 -0
- package/dist/sha256-GIR2THAJ.js +19 -0
- package/package.json +77 -3
- package/rules/AGENTS.md +8 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# TinyPivot License
|
|
2
|
+
|
|
3
|
+
## Free Tier (MIT License)
|
|
4
|
+
|
|
5
|
+
Copyright (c) 2024 TinyPivot
|
|
6
|
+
|
|
7
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
of the Free Tier features of this software and associated documentation files
|
|
9
|
+
(the "Software"), to deal in the Software without restriction, including without
|
|
10
|
+
limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
11
|
+
and/or sell copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
furnished to do so, subject to the following conditions:
|
|
13
|
+
|
|
14
|
+
### Free Tier Features Include:
|
|
15
|
+
- Basic data grid display with sorting
|
|
16
|
+
- Column filtering with unique values
|
|
17
|
+
- Keyboard navigation and cell selection
|
|
18
|
+
- Copy/paste support
|
|
19
|
+
- Row striping and hover states
|
|
20
|
+
- Responsive column widths
|
|
21
|
+
- Cell number formatting
|
|
22
|
+
|
|
23
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
24
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
25
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Pro License (Commercial)
|
|
30
|
+
|
|
31
|
+
The following features require a Pro license:
|
|
32
|
+
|
|
33
|
+
### Pro Features:
|
|
34
|
+
- **Pivot Table**: Full pivot table functionality with drag-and-drop configuration
|
|
35
|
+
- **Advanced Aggregations**: Sum, Count, Average, Min, Max, Count Distinct
|
|
36
|
+
- **Row/Column Totals**: Automatic total calculations
|
|
37
|
+
- **Percentage Mode**: View data as % of row, column, or grand total
|
|
38
|
+
- **Column/Row Grouping**: Multi-level grouping for pivot tables
|
|
39
|
+
- **Session Persistence**: Auto-save and restore pivot configuration
|
|
40
|
+
- **Priority Support**: Direct email support and issue prioritization
|
|
41
|
+
|
|
42
|
+
### Pricing:
|
|
43
|
+
- **Single Project**: $49 one-time payment
|
|
44
|
+
- **Unlimited Projects**: $149 one-time payment
|
|
45
|
+
- **Team License (up to 10 devs)**: $399 one-time payment
|
|
46
|
+
|
|
47
|
+
### How to Purchase:
|
|
48
|
+
Visit https://tiny-pivot.com/#pricing to purchase a license.
|
|
49
|
+
|
|
50
|
+
After purchase, you'll receive a license key to unlock Pro features:
|
|
51
|
+
|
|
52
|
+
```typescript
|
|
53
|
+
import { DataGrid, setLicenseKey } from 'tinypivot'
|
|
54
|
+
|
|
55
|
+
setLicenseKey('YOUR_LICENSE_KEY')
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### License Validation:
|
|
59
|
+
- License keys are validated locally (no network calls)
|
|
60
|
+
- Keys are tied to your npm username or organization
|
|
61
|
+
- Licenses are perpetual with 1 year of updates included
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Terms
|
|
66
|
+
|
|
67
|
+
1. **No Removal of Attribution**: Free tier users must keep the "Powered by TinyPivot"
|
|
68
|
+
watermark visible. Pro license removes this requirement.
|
|
69
|
+
|
|
70
|
+
2. **No Redistribution**: You may not redistribute this library as part of another
|
|
71
|
+
component library or framework.
|
|
72
|
+
|
|
73
|
+
3. **No Sub-licensing**: Licenses cannot be transferred or sub-licensed.
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
For questions about licensing, contact: license@tiny-pivot.com
|
|
78
|
+
|
package/README.md
CHANGED
|
@@ -1,3 +1,68 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @smallwebco/tinypivot-mcp
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Interactive **TinyPivot MCP Server & MCP App** (`ui://tinypivot/app.html`) — turn CSV, TSV, JSON, JSONL, inline agent outputs, and read-only PostgreSQL queries into interactive charts, pivot tables, data grids, 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
|
+
|
|
5
|
+
## 1-Command Setup
|
|
6
|
+
|
|
7
|
+
Auto-detect and wire all installed AI harnesses on your machine:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npx @smallwebco/tinypivot-mcp init
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Options:
|
|
14
|
+
|
|
15
|
+
- `--targets=claude,claude-desktop,cursor,opencode,antigravity,pi,codex` — configure specific harnesses
|
|
16
|
+
- `--license=TP-...` — include your `TINYPIVOT_LICENSE_KEY` in the generated MCP config
|
|
17
|
+
- `--local` — wire a local build (`node .../dist/cli.js`) for local development
|
|
18
|
+
- `--no-rules` — skip adding the auto-use TinyPivot rule to `~/.claude/CLAUDE.md`
|
|
19
|
+
- `--dry-run` — preview changes without modifying files
|
|
20
|
+
|
|
21
|
+
## Free vs. Pro
|
|
22
|
+
|
|
23
|
+
TinyPivot MCP ships with a generous **Free tier** out of the box — no account or API key required:
|
|
24
|
+
|
|
25
|
+
| Capability | Free | Pro / Team |
|
|
26
|
+
|---|---|---|
|
|
27
|
+
| Core Charts (`bar`, `stackedBar`, `line`, `area`, `pie`, `donut`) | Included | Included + all chart types |
|
|
28
|
+
| Pivot Table (`sum` aggregation) | Included | All aggregations & calculated fields |
|
|
29
|
+
| Data Grid (sort, filter, search, copy Markdown, CSV export) | Included | Included |
|
|
30
|
+
| Terminal Companion Data IDE (`--open` / live SSE) | Included | Included |
|
|
31
|
+
| Dataset row limit | Up to 2,500 rows (explicitly bannered if truncated) | Unlimited |
|
|
32
|
+
| Visual themes | `Code` theme (Dark & Light) | All 5 themes (`Code`, `Phosphor`, `Nord`, `Thermal`, `Mono`) |
|
|
33
|
+
| Drill-Through modals | — | Included |
|
|
34
|
+
| Formatted `.xlsx` Excel export | — | Included |
|
|
35
|
+
| Read-only `query_postgres` (`DATABASE_URL`) | — | Included |
|
|
36
|
+
| Watermark-free UI | — | Included |
|
|
37
|
+
|
|
38
|
+
> **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
|
+
|
|
40
|
+
Unlock Pro or Team at [tiny-pivot.com/mcp](https://tiny-pivot.com/mcp).
|
|
41
|
+
|
|
42
|
+
## Tools
|
|
43
|
+
|
|
44
|
+
| Tool | Purpose |
|
|
45
|
+
|---|---|
|
|
46
|
+
| `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 and renders a chart/pivot in a single call. |
|
|
48
|
+
| `load_data` | Loads flat JSON rows from any other MCP tool (e.g. Stripe, GitHub, API) directly into TinyPivot. |
|
|
49
|
+
| `configure_pivot` | Computes a deterministic pivot table via `@smallwebco/tinypivot-core` (zero LLM math errors). |
|
|
50
|
+
| `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. |
|
|
52
|
+
| `list_datasets` | Lists all loaded datasets, row counts, and inferred schemas. |
|
|
53
|
+
|
|
54
|
+
## Environment Variables (Optional)
|
|
55
|
+
|
|
56
|
+
- `TINYPIVOT_LICENSE_KEY` — TinyPivot Pro/Team license key (`TP-...`)
|
|
57
|
+
- `DATABASE_URL` — PostgreSQL connection string for read-only `query_postgres` (Pro)
|
|
58
|
+
- `TINYPIVOT_ALLOWED_TABLES` — Comma-separated table allowlist for `query_postgres`
|
|
59
|
+
- `TINYPIVOT_TELEMETRY=0` or `DO_NOT_TRACK=1` — Disable anonymous usage telemetry
|
|
60
|
+
- `TINYPIVOT_NO_COMPANION=1` — Disable the localhost Companion Data IDE server
|
|
61
|
+
- `TINYPIVOT_PORT` — Fixed localhost port for the Companion Data IDE server
|
|
62
|
+
|
|
63
|
+
## Privacy & Telemetry
|
|
64
|
+
|
|
65
|
+
TinyPivot MCP sends minimal, **zero-PII** anonymous usage pings (`event`, `tool`, `rowBucket`, `client`, `tier`, `truncated`, `version`, `os`, and a random local UUID) to help us improve harness compatibility and reliability.
|
|
66
|
+
|
|
67
|
+
- **Never collected:** row data, column names, SQL queries, file paths, hostnames, or user identities.
|
|
68
|
+
- **Opt out anytime:** set `TINYPIVOT_TELEMETRY=0` or `DO_NOT_TRACK=1` in your environment or MCP server `env` block.
|