@bicharts/chart-mcp 0.6.68 → 0.6.70

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 CHANGED
@@ -26,7 +26,7 @@ engine knows what ~90 chart types can honestly say, it will sometimes propose a
26
26
 
27
27
  **What it costs: authoring, and nothing else.** The calls that write a chart (and the
28
28
  eligibility lists beyond a free hourly allowance) are metered on your account. What they
29
- write is yours: the chart code needs no licence, no account, no credits and no connection to
29
+ write is yours: the chart code needs no license, no account, no credits and no connection to
30
30
  us to run, view, deploy, ship or keep, for any number of viewers, forever. The host that draws
31
31
  it, `@bicharts/chart-host`, is open source (Apache-2.0), and the generated code makes no calls
32
32
  home. See section 1(d) of the [RegiaBI terms](https://bizintelligencechampions.com/terms-regiabi)
@@ -39,7 +39,7 @@ The main tools:
39
39
  credentials, no data leaves the machine. The free-teaser tool.
40
40
  - **`list_eligible_charts`** — the **authoritative** list of chart types that can
41
41
  render this data (server-side policy, not a local guess; **no LLM**, but a network
42
- call to the engine and therefore **metered** — see Credentials).
42
+ call to the engine and therefore **metered** — see Signing in).
43
43
  By default it **auto-detects the project's language** (JS/TS vs Python from the
44
44
  working dir) and returns the charts for THAT language — **scoped to its renderers
45
45
  and ranked by the picker's chart-type×renderer weights** (best first), each tagged
@@ -48,10 +48,10 @@ The main tools:
48
48
  `renderer: "D3"/"PLOTLY"/…` to rank one specific renderer, or `renderer: ""` for the
49
49
  full **renderer-agnostic** eligibility across all renderers (unranked — the wide "what
50
50
  *can* render" net). `top: N` trims to the best N. If the language can't be auto-detected
51
- and none is given, the tool asks you to specify one. **Credentials required** — no LLM
52
- is not the same as no cost, because eligibility *is* the engine's own answer. Free within
53
- a generous hourly allowance; beyond it a call may draw usage credits. A live licence
54
- additionally unlocks *draft* types.
51
+ and none is given, the tool asks you to specify one. **An account is required** (the first
52
+ call signs you in) — no LLM is not the same as no cost, because eligibility *is* the
53
+ engine's own answer. Free within a generous hourly allowance; beyond it a call may draw
54
+ usage credits. A live license additionally unlocks *draft* types.
55
55
  - **`suggest_charts`** — "which charts suit this model?" in one call, for a semantic model in a
56
56
  Microsoft Fabric App on Rayfin's data app template: reads the model's tables, measures and
57
57
  relationships through the project's own `fabric-app-data` CLI, finds its natural views (by place,
@@ -132,31 +132,45 @@ Example (a semantic-model query result):
132
132
  }
133
133
  ```
134
134
 
135
- ## Credentials (`generate_chart` and `list_eligible_charts`)
135
+ ## Signing in (`generate_chart` and `list_eligible_charts`)
136
136
 
137
- **A trial or paid BIC account is required — no freemium.** Use the same
138
- **License Key**, **Licensee**, and **Secret Key** from your BIC account (the ones
139
- the Power BI visual's license settings use).
137
+ **Nothing to configure.** The first call that needs an account opens your browser on the
138
+ BIC sign-in page, waits for you, and then finishes the call it was making — no second
139
+ command, no retry. No account yet? The page leads with **Create a free account**, and a
140
+ new account starts a free trial. **A trial or paid BIC account is required — no freemium.**
140
141
 
141
- `assess_data_shape` needs no credentials at all — it runs entirely locally in
142
+ - The sign-in link is printed to the server's log before the browser opens (and sent as a
143
+ log message to clients that show them), so on a machine where no browser opens you can
144
+ open it yourself.
145
+ - Your sign-in is kept in `~/.bic/oauth.json` (readable only by you; override with
146
+ `BIC_OAUTH_FILE`), separately for each service address, and renewed quietly while you
147
+ keep using it.
148
+ - Each signed-in machine shows up on your account page, and you can sign any of them out
149
+ there. Its next call asks you to sign in again.
150
+
151
+ Why a sign-in rather than a key: a key pasted into a config file tends to end up in a
152
+ committed `.mcp.json`, and one key can't be switched off for a single machine. A sign-in
153
+ keeps the secret out of your files and can be revoked per machine.
154
+
155
+ `assess_data_shape` needs no account at all — it runs entirely locally in
142
156
  `@bicharts/shape-core` and never calls the backend. `list_eligible_charts` **does**
143
- need them: it is the server's own eligibility verdict, not a local guess, which is
157
+ need one: it is the server's own eligibility verdict, not a local guess, which is
144
158
  the whole reason it is worth calling. It is free within a generous hourly allowance;
145
159
  beyond that, a call may draw usage credits from the account (both knobs are
146
160
  server-configured), so don't put it inside a tight loop. Use of the API and this MCP
147
161
  server is covered by the
148
162
  [RegiaBI Programmatic Access Terms](https://bizintelligencechampions.com/terms-regiabi).
149
163
 
150
- Two ways to supply them — env wins over the file:
164
+ ### Settings
151
165
 
152
- **1. Env vars** (via the MCP server's `env` block — see registration below):
166
+ All optional, in the MCP server's `env` block (see registration below):
153
167
 
154
168
  | Var | Meaning |
155
169
  | --- | --- |
156
- | `BIC_LICENSE_KEY` | required |
157
- | `BIC_LICENSEE` | required (account name) |
158
- | `BIC_SECRET_KEY` | optional |
159
170
  | `BIC_URL` | override backend (default `https://bizintelligencechampions.com`) |
171
+ | `BIC_SIGNIN` | `off` turns the browser sign-in off (CI, containers); with no key set, a call then fails with a message naming the key settings |
172
+ | `BIC_SIGNIN_WAIT_MS` | how long a call waits for you to finish signing in (default `180000`, 3 minutes); past it, the call returns the sign-in link |
173
+ | `BIC_OAUTH_FILE` | where the sign-in is kept (default `~/.bic/oauth.json`) |
160
174
  | `BIC_MCP_REASONING` | OPTIONAL override of the default reasoning mode (else `""` = leave-to-visual, same as the PBI visual) |
161
175
  | `BIC_MCP_MODEL` | OPTIONAL override of the default model (else `""` = the account's IsDefault model, same as the visual) |
162
176
  | `BIC_MCP_TIMEOUT_MS` | OPTIONAL: how long one `generate_chart` call waits, recovery included (default `900000`, 15 minutes) |
@@ -193,6 +207,21 @@ needs**:
193
207
  `BIC_MCP_REASONING=CP`/`1P` *would* finish faster, but that trades away visual parity
194
208
  (no validator) — prefer raising the timeout.
195
209
 
210
+ ### Advanced: a license key (CI, containers, machines with no browser)
211
+
212
+ A key is the way in where no person is at the machine to sign in. It's the same
213
+ **License Key**, **Licensee** and **Secret Key** from your BIC account (the ones the
214
+ Power BI visual's license settings use). **When a key is set, it wins:** the server
215
+ sends it exactly as before and never opens a sign-in. Env wins over the file:
216
+
217
+ **1. Env vars:**
218
+
219
+ | Var | Meaning |
220
+ | --- | --- |
221
+ | `BIC_LICENSE_KEY` | the license key |
222
+ | `BIC_LICENSEE` | the account name it was issued to |
223
+ | `BIC_SECRET_KEY` | optional |
224
+
196
225
  **2. A credentials file** — so secrets never sit in a project-committed
197
226
  `.mcp.json`. Default `~/.bic/credentials.json` (override with
198
227
  `BIC_CREDENTIALS_FILE`):
@@ -204,7 +233,9 @@ needs**:
204
233
  (`secretKey` optional.)
205
234
 
206
235
  Prefer the file, or a **user-scoped** `claude mcp add` (stored in your user
207
- config), over putting secrets in a repo-committed `.mcp.json`.
236
+ config), over putting secrets in a repo-committed `.mcp.json`. On a machine with no
237
+ browser, set `BIC_SIGNIN=off` too, so a missing key fails at once instead of waiting
238
+ for a sign-in nobody can finish.
208
239
 
209
240
  Note: this package deliberately does NOT contain the freemium key-mint secret —
210
241
  consistent with trial/paid-only access, and safe if the folder is ever published.
@@ -277,15 +308,15 @@ difference is not knowing the API, it is not knowing the shape of the answer.
277
308
  claude mcp add --scope user bic-chart -- npx -y @bicharts/chart-mcp
278
309
  ```
279
310
 
280
- `--scope user` stores it in your user config so it works in every project. With
281
- credentials in `~/.bic/credentials.json` you need no `-e` flags at all; add them only
282
- if you prefer env vars:
311
+ `--scope user` stores it in your user config so it works in every project. That's the
312
+ whole setup: the first chart call signs you in through your browser. Only a machine with
313
+ no browser needs a key (see *Advanced: a license key*):
283
314
 
284
315
  ```powershell
285
- claude mcp add --scope user bic-chart -e BIC_LICENSE_KEY=... -e BIC_LICENSEE=... -- npx -y @bicharts/chart-mcp
316
+ claude mcp add --scope user bic-chart -e BIC_LICENSE_KEY=... -e BIC_LICENSEE=... -e BIC_SIGNIN=off -- npx -y @bicharts/chart-mcp
286
317
  ```
287
318
 
288
- or in a project `.mcp.json`:
319
+ or in a project `.mcp.json` (no secrets in it, so it's safe to commit):
289
320
 
290
321
  ```json
291
322
  {