@bicharts/chart-mcp 0.6.54 → 0.6.55
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/README.md +7 -1
- package/dist/check-chart.mjs +1 -1
- package/dist/index.mjs +91 -86
- package/package.json +1 -1
- package/skills/bic-charts/SKILL.md +31 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bicharts/chart-mcp",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.55",
|
|
4
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.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mcp",
|
|
@@ -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
|
-
|
|
469
|
-
`
|
|
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
|
-
|
|
592
|
-
|
|
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
|
-
|
|
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,11 @@ 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
|
|
753
|
-
|
|
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 likely cut off at that size: deal with it before you call the chart done.
|
|
773
|
+
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:
|
|
774
|
+
- Signed in? `npx rayfin login status` (a subcommand, not a `--status` flag); `npx rayfin login` if not.
|
|
754
775
|
- Name the workspace: `npx rayfin up -w "<workspace>"`. Left out, it deploys to My Workspace.
|
|
755
776
|
- The Fabric item is named by `id:` in `rayfin/rayfin.yml`, not `name:`. Two projects with the same
|
|
756
777
|
`id:` in one workspace deploy into one item: give each its own `id:`, or deploy with
|