@bicharts/chart-mcp 0.6.54 → 0.6.56

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bicharts/chart-mcp",
3
- "version": "0.6.54",
4
- "description": "MCP (Model Context Protocol) stdio server for BIC AI charts: profile a dataset locally, then generate chart code that has passed the BIC backend's render gates. Works with any MCP-capable client (Claude Code, Claude Desktop, Cursor, Copilot Studio). Requires a BIC trial or paid account.",
3
+ "version": "0.6.56",
4
+ "description": "MCP (Model Context Protocol) stdio server for BIC AI charts: profile a dataset locally, then generate chart code that has passed the BIC backend's render gates. Works with any MCP-capable client (Claude Code, Claude Desktop, Cursor, Copilot Studio). An account pays to author charts; the code it writes is yours and runs with no licence.",
5
5
  "keywords": [
6
6
  "mcp",
7
7
  "modelcontextprotocol",
@@ -43,8 +43,8 @@
43
43
  },
44
44
  "// dependencies": "NONE, deliberately. dist/ bundles every module the server uses, so a runtime dependency installs nothing it needs - it only makes npx fetch that package (and its tree) before the first start. Everything the bundle carries is a devDependency; scripts/verify-package.mjs fails the release if a dependency appears or a shipped file imports anything but Node's built-ins.",
45
45
  "devDependencies": {
46
- "@bicharts/chart-host": "^0.6.52",
47
- "@bicharts/shape-core": "^0.6.52",
46
+ "@bicharts/chart-host": "^0.6.56",
47
+ "@bicharts/shape-core": "^0.6.56",
48
48
  "@modelcontextprotocol/sdk": "^1.0.0",
49
49
  "@types/node": "^20.0.0",
50
50
  "@types/papaparse": "^5.3.14",
@@ -21,6 +21,16 @@ Skip this if you already have a table. If you are holding a semantic model, a wa
21
21
  a database, **you** pick the fields — the tools take a table, not a model, and they cannot see
22
22
  what you can. Three decisions, and the third is the one that goes wrong.
23
23
 
24
+ **Asked which charts suit the model itself** ("good chart types for this dataset", "what could we
25
+ chart here")? Over a semantic model in a Fabric App, `suggest_charts` answers in one call: it reads
26
+ the model's tables, measures and relationships, finds its natural views (measures by place, flows
27
+ between places, measures over time, measures by category), queries each at its grain, keeps the
28
+ measures that vary there and asks the eligibility engine what fits each. Answer from its reply -
29
+ the counts in it are the model's own - and build the one the person picks from the rows it saved
30
+ (`.bic/data/<view>.csv`, the DAX beside it). Pass `views` (`columns` as `Table[Column]`, `measures`
31
+ by name, or your own `dax`) to ask about other groupings. Elsewhere, pull each candidate grouping
32
+ and ask `list_eligible_charts` about each.
33
+
24
34
  **Fields and filters** follow from the question. *"All loans over the last 6 months, highlighting
25
35
  those which defaulted, paying attention to credit score"* wants `LoanId`, `Defaulted`,
26
36
  `CreditScore`, filtered to six months.
@@ -464,9 +474,12 @@ build.
464
474
  `src/lib/bic-chart-options.ts` (`useBicChartOptions()`: the app's Fabric theme - palette, foreground,
465
475
  background - as chart options, so charts follow light and dark) and `src/components/bic-chart-panel.tsx`
466
476
  (`<BicChartPanel result={useSemanticModelQuery(...)}>`: a box that measures itself and shows the query's
467
- loading, error and empty states), and ignores `.bic/`. It also puts every `@microsoft/rayfin-*` package on one version
468
- (the template installs one too old to deploy, and `rayfin init` later upgrades only some of them - its reply lists every
469
- `package.json` range it changed; an app already on one deployable version is left alone), and adds
477
+ loading, error and empty states), and ignores `.bic/`. It also puts every `@microsoft/rayfin-*` package on one version -
478
+ npm's latest, the release `rayfin init` installs, so run it before `rayfin init` and init has nothing left to split
479
+ (`rayfin init` installs the latest of only some packages, which leaves two copies of `rayfin-auth` on any other version).
480
+ Its reply lists every `package.json` range it changed and names the Rayfin version installed; an app already on npm's
481
+ latest is left alone. It fixes the template's own `scripts/validate-visual.spec.mjs`, which fails under ESM on a fresh
482
+ scaffold (its reply says so), and adds
470
483
  `.agents/skills/regiabi-charts/SKILL.md` beside the template's skills, for agents that read that folder. It never
471
484
  overwrites a file, and its reply ends with a worked example.
472
485
 
@@ -487,7 +500,7 @@ simply offered other charts. Save the result to a file and pass `csv_path`, or p
487
500
  `RevenuePerCapita`, and apply the SAME rename to the live rows at run time - the chart reads columns by
488
501
  name. Pass the model's metadata as you rename: `isMeasure`, `format` and `description` (from
489
502
  `INFO.VIEW.MEASURES()` / `INFO.VIEW.COLUMNS()`) go on each column in `data`, which is the context a
490
- Power BI visual gets for free.
503
+ Power BI visual gets for free. In `INFO.VIEW.COLUMNS()` a column's name is `[Name]`, not `[Column]`.
491
504
 
492
505
  **Steps 1-3 are one call: `query_semantic_model`.** Give it the chart's DAX (`dax`, or a `.dax` file) and a
493
506
  `name`; it runs the query through the project's own `fabric-app-data` CLI, renames the headers (dropping the
@@ -588,11 +601,14 @@ it. Anything saved against a mark - a note, a flag - is keyed the same way, neve
588
601
 
589
602
  **Notes (or flags) on marks, end to end.** People leave a note on a country, a route, a product, and see
590
603
  it on that mark: the notes live in Rayfin's data service, and the badge is the chart's `annotations`.
591
- Every Rayfin fact here was checked on Rayfin 1.36.1, a preview - where your installed version differs,
592
- its own docs (`node_modules/@microsoft/rayfin-guide/assets/docs/data/`) win.
604
+ This recipe was checked against Rayfin's own docs for Rayfin 1.36.1 (a preview), the version
605
+ `setup_fabric_app` installs as this is written, and on that version it IS the version-matched source:
606
+ follow it as written, and read Rayfin's docs (`node_modules/@microsoft/rayfin-guide/assets/docs/data/`)
607
+ only for what it doesn't cover. `setup_fabric_app`'s reply names the version it installed; where that
608
+ differs from 1.36.1, Rayfin's docs win.
593
609
 
594
- *a. Turn the data service on.* The data app template ships it off. Run `setup_fabric_app` first -
595
- `setup_fabric_app` puts every `@microsoft/rayfin-*` package on one version - then:
610
+ *a. Turn the data service on.* The data app template ships it off. Run `setup_fabric_app` first (it puts every `@microsoft/rayfin-*` package on one version:
611
+ npm's latest, the release `rayfin init` installs), then:
596
612
 
597
613
  ```bash
598
614
  npx rayfin init --services auth,data --auth-methods fabric --dialect mssql --overwrite --project-name <id from rayfin/rayfin.yml> .
@@ -740,6 +756,8 @@ export function NotesDialog({ title, notes, onAdd, onClose }: {
740
756
  Style it with the app's own tokens. The table and the permissions are created on the next
741
757
  `npx rayfin up`, and every later `rayfin up` applies entity changes.
742
758
 
759
+ Don't stand up a backend to test notes; the deploy creates the tables. Finish with `npx tsc -b` and the tests, and say the notes go live on deploy.
760
+
743
761
  **7. A reader's choice inside a chart is view state.** A what-if chart's rate and horizon are its
744
762
  own controls, reported through `viewState` on `<BicChart>` (`uiState` / `setUiState` in the
745
763
  integration contract). To save a named scenario, store that - don't rebuild the slider beside it.
@@ -749,8 +767,13 @@ service - the notes recipe above), `VisualContainer` headers, deployment. The ch
749
767
  render inside them.
750
768
 
751
769
  **9. Check every chart, then deploy.** Check every chart locally with this server's `check_chart` tool,
752
- at the size the layout gives it - you don't need to deploy to check a chart. Then `npx tsc -b` and the
753
- tests. Deploying (`npx rayfin up`), on Rayfin 1.36.1:
770
+ at the size the panel will give it - by default it reads the chart's `minChartWidth` and `minChartHeight`
771
+ off its `BicChartPanel`, so pass no size unless you mean another one. A `WARNING` line in its reply is a
772
+ label cut off at that size: deal with it before you call the chart done. The reply says whether more room fixes it.
773
+ Never edit the generated chart code by hand: if something's wrong with a generated chart, regenerate it
774
+ (`generate_chart` with a prompt describing the fix) or report it.
775
+ You don't need to deploy to check a chart. Then `npx tsc -b` and the tests. Deploying (`npx rayfin up`), on Rayfin 1.36.1:
776
+ - Signed in? `npx rayfin login status` (a subcommand, not a `--status` flag); `npx rayfin login` if not.
754
777
  - Name the workspace: `npx rayfin up -w "<workspace>"`. Left out, it deploys to My Workspace.
755
778
  - The Fabric item is named by `id:` in `rayfin/rayfin.yml`, not `name:`. Two projects with the same
756
779
  `id:` in one workspace deploy into one item: give each its own `id:`, or deploy with
@@ -758,6 +781,8 @@ tests. Deploying (`npx rayfin up`), on Rayfin 1.36.1:
758
781
  - Deleted the app outside Rayfin? `rayfin/.deployments.json` still names the deleted item, so the next
759
782
  `rayfin up` fails with 404 Not Found. Move that file aside and deploy again.
760
783
 
784
+ What it costs: only the calls that author a chart (generate_chart, and the eligibility lists beyond a free hourly allowance) draw on the account. The chart code they write is the user's to keep and ship: it needs no licence, account, credits or connection to us to run, view or deploy, for any number of viewers.
785
+
761
786
  ## 4. Things that will otherwise cost you time
762
787
 
763
788
  - **Place names, not coordinates.** If your data has city/state/ZIP but no lat/lon, pass a