@bicharts/chart-mcp 0.6.70 → 0.6.72

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.
Files changed (3) hide show
  1. package/README.md +33 -2
  2. package/dist/index.mjs +96 -83
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -42,9 +42,10 @@ The main tools:
42
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
- and ranked by the picker's chart-type×renderer weights** (best first), each tagged
45
+ and ordered by how well each type fits this data** (best first), each tagged
46
46
  with its **source language** (JavaScript for D3/Vega, Python for Plotly/matplotlib),
47
- its renderer, and a 0–100 score. Pass `language: "javascript"|"python"` to force it,
47
+ its renderer, and a 0–100 score. `order: "variety"` orders the same list for variety
48
+ instead (newer and less-common types first), for when you want to explore. Pass `language: "javascript"|"python"` to force it,
48
49
  `renderer: "D3"/"PLOTLY"/…` to rank one specific renderer, or `renderer: ""` for the
49
50
  full **renderer-agnostic** eligibility across all renderers (unranked — the wide "what
50
51
  *can* render" net). `top: N` trims to the best N. If the language can't be auto-detected
@@ -272,6 +273,36 @@ The server tells the BIC service three things, and nothing else:
272
273
 
273
274
  Set `BIC_MCP_TELEMETRY=0` in the server's environment to turn all of it off.
274
275
 
276
+ ## Hosted server (`--http`)
277
+
278
+ The same server can also run as a remote MCP endpoint over Streamable HTTP, for clients that only take a URL (chat
279
+ connectors, notebook and dashboard tools). It's how the hosted chart server runs behind the RegiaBI site, which
280
+ checks each caller's sign-in before a request reaches it.
281
+
282
+ ```bash
283
+ npx -y @bicharts/chart-mcp --http --host 127.0.0.1 --port 8799
284
+ ```
285
+
286
+ `BIC_MCP_HOSTED=1` starts it the same way, and `BIC_MCP_HTTP_PORT` sets the port. It answers MCP on `POST /mcp`
287
+ and `GET /healthz`. What's different from the local server:
288
+
289
+ - **Every request needs `Authorization: Bearer <access token>`** (a request without one gets a 401), and that token is
290
+ the only credential its calls send. A license key in the environment or `~/.bic/credentials.json` isn't used, and no
291
+ browser sign-in opens. When the service turns the token away, the tool's answer says to reconnect; your MCP
292
+ client signs in again.
293
+ - **It's stateless:** each request gets a fresh server and no session, so `GET` and `DELETE` on `/mcp` answer 405,
294
+ and a question a tool would ask the client (hover drop lines on a 3D scatter) goes to the agent instead.
295
+ - **Five tools:** `assess_data_shape`, `list_eligible_charts`, `generate_chart`, `preview_request` and `get_guide`. The
296
+ tools that work in your project folder (`check_chart`, `check_app`, `setup_fabric_app`, `query_semantic_model`,
297
+ `suggest_charts`) need the local server, since a remote server can't see your machine.
298
+ - **Tables travel in the request,** as `data` or `csv_text`; `csv_path`, `out_dir`, `preview_html` and `project_dir`
299
+ are refused with a one-line reason. The server profiles the table in memory, sends only the profile to generation
300
+ (exactly what the local server sends) and drops the rows: nothing is written to disk or logged. Charts come back
301
+ inline. With no `language` or `renderer`, it generates JavaScript (D3).
302
+ - **Each request it sends says it came from the hosted server,** and an `X-BIC-Client-IP` header on the incoming
303
+ request is passed on, so the service's limits apply to the person rather than to the server. Run it yourself only
304
+ behind something that checks callers, since it trusts that header.
305
+
275
306
  ## The agent skill (recommended)
276
307
 
277
308
  This package ships `skills/bic-charts/SKILL.md` — the golden path from empty directory to a