@blueprint-chart/docs 0.1.20 → 0.1.22
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/dist/manifest.json +8 -1
- package/package.json +3 -3
- package/src/guide/getting-started.md +2 -1
- package/src/guide/mcp.md +139 -0
package/dist/manifest.json
CHANGED
|
@@ -109,9 +109,16 @@
|
|
|
109
109
|
"slug": "getting-started",
|
|
110
110
|
"group": "guide",
|
|
111
111
|
"title": "getting started",
|
|
112
|
-
"blurb": "Blueprint Chart is published as four packages on NPM. Pick the one that matches what you're building.",
|
|
112
|
+
"blurb": "Blueprint Chart is published as four packages on NPM, plus a separate `@blueprint-chart/mcp` server for authoring charts with AI. Pick the one that matches what you're building.",
|
|
113
113
|
"mdPath": "guide/getting-started.md"
|
|
114
114
|
},
|
|
115
|
+
{
|
|
116
|
+
"slug": "mcp",
|
|
117
|
+
"group": "guide",
|
|
118
|
+
"title": "mcp",
|
|
119
|
+
"blurb": "Describe the chart you want; let your AI assistant build it. The",
|
|
120
|
+
"mdPath": "guide/mcp.md"
|
|
121
|
+
},
|
|
115
122
|
{
|
|
116
123
|
"slug": "palettes",
|
|
117
124
|
"group": "guide",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blueprint-chart/docs",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.22",
|
|
4
4
|
"description": "Public documentation for Blueprint Chart — handbook, guide, BPC DSL spec, and lib API reference.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"vitepress": "^1.5.0",
|
|
49
49
|
"vitest": "^3.2.4",
|
|
50
50
|
"vue": "^3.5",
|
|
51
|
-
"@blueprint-chart/lib": "0.1.
|
|
52
|
-
"@blueprint-chart/ui": "0.1.
|
|
51
|
+
"@blueprint-chart/lib": "0.1.22",
|
|
52
|
+
"@blueprint-chart/ui": "0.1.22"
|
|
53
53
|
},
|
|
54
54
|
"scripts": {
|
|
55
55
|
"dev": "vitepress dev src --host 0.0.0.0 --port 4445",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Getting Started
|
|
2
2
|
|
|
3
|
-
Blueprint Chart is published as four packages on NPM. Pick the one that matches what you're building.
|
|
3
|
+
Blueprint Chart is published as four packages on NPM, plus a separate `@blueprint-chart/mcp` server for authoring charts with AI. Pick the one that matches what you're building.
|
|
4
4
|
|
|
5
5
|
<table>
|
|
6
6
|
<thead><tr><th>Package</th><th>When to use it</th></tr></thead>
|
|
@@ -9,6 +9,7 @@ Blueprint Chart is published as four packages on NPM. Pick the one that matches
|
|
|
9
9
|
<tr><td nowrap><a href="https://www.npmjs.com/package/@blueprint-chart/ui"><code>@blueprint-chart/ui</code></a></td><td>Vue 3 component library — forms, panels, navigation, scene timeline, layout primitives.</td></tr>
|
|
10
10
|
<tr><td nowrap><a href="https://www.npmjs.com/package/@blueprint-chart/editor"><code>@blueprint-chart/editor</code></a></td><td>The full SPA — runs on top of <code>lib</code> + <code>ui</code>. Deployed at <a href="https://blueprintchart.com">blueprintchart.com</a>.</td></tr>
|
|
11
11
|
<tr><td nowrap><a href="https://www.npmjs.com/package/@blueprint-chart/docs"><code>@blueprint-chart/docs</code></a></td><td>The markdown source of this site — handbook, guide, BPC DSL spec, and lib API reference. Exposes <code>listDocs</code> / <code>getDoc</code> + <code>manifest.json</code> for tooling such as <code>@blueprint-chart/mcp</code>.</td></tr>
|
|
12
|
+
<tr><td nowrap><a href="https://www.npmjs.com/package/@blueprint-chart/mcp"><code>@blueprint-chart/mcp</code></a></td><td>MCP server (separate repo) — lets Claude, Claude Code, Cursor, or any MCP client author <code>.bpc</code> files, grounded in the handbook with a parse + render feedback loop. See <a href="/guide/mcp">Authoring with AI</a>.</td></tr>
|
|
12
13
|
</tbody>
|
|
13
14
|
</table>
|
|
14
15
|
|
package/src/guide/mcp.md
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# Authoring with AI
|
|
2
|
+
|
|
3
|
+
Describe the chart you want; let your AI assistant build it. The
|
|
4
|
+
[`@blueprint-chart/mcp`](https://github.com/blueprint-chart/mcp) server connects Blueprint
|
|
5
|
+
Chart to any [Model Context Protocol](https://modelcontextprotocol.io) client — Claude (web,
|
|
6
|
+
desktop, and Code), ChatGPT, Cursor, VS Code, and more. The model reads the dataviz handbook,
|
|
7
|
+
writes the `.bpc`, validates it, and renders it — so you get a real, accessible chart from a
|
|
8
|
+
sentence instead of guesswork.
|
|
9
|
+
|
|
10
|
+
## How it works
|
|
11
|
+
|
|
12
|
+
The MCP gives your assistant a tight, grounded loop:
|
|
13
|
+
|
|
14
|
+
**read the handbook → write `.bpc` → `validate_dsl` → `render` → iterate**
|
|
15
|
+
|
|
16
|
+
It is primed on Blueprint Chart's dataviz pedagogy *before* it writes a line of DSL, then
|
|
17
|
+
closes the loop with deterministic parse + render feedback instead of hallucinating syntax.
|
|
18
|
+
|
|
19
|
+
## Connect your client
|
|
20
|
+
|
|
21
|
+
There are two ways to connect: use the **hosted** endpoint (nothing to install) or **run the
|
|
22
|
+
server locally** with `npx`.
|
|
23
|
+
|
|
24
|
+
### Hosted — `mcp.blueprintchart.com`
|
|
25
|
+
|
|
26
|
+
Point any remote-capable client at the public endpoint. There's nothing to install and no token
|
|
27
|
+
to configure — it's open.
|
|
28
|
+
|
|
29
|
+
**Endpoint:** `https://mcp.blueprintchart.com`
|
|
30
|
+
|
|
31
|
+
- **Claude.ai (web)** — requires a Claude Pro, Team, or Enterprise plan:
|
|
32
|
+
1. Open **Settings → Connectors**.
|
|
33
|
+
2. Click **Add custom integration**.
|
|
34
|
+
3. Paste `https://mcp.blueprintchart.com` and save. There's no auth header to enter.
|
|
35
|
+
- **ChatGPT** — add `https://mcp.blueprintchart.com` as a custom connector (no authentication).
|
|
36
|
+
- **Cursor** — **Settings → MCP → Add server**, then enter the URL.
|
|
37
|
+
- **Claude Code** — add it over HTTP:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
claude mcp add blueprint-chart --transport http https://mcp.blueprintchart.com
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Local — run it with `npx`
|
|
44
|
+
|
|
45
|
+
Prefer to run the server on your own machine (for desktop apps, offline use, or full control)?
|
|
46
|
+
`npx` fetches it on demand — nothing is installed globally.
|
|
47
|
+
|
|
48
|
+
::: code-group
|
|
49
|
+
|
|
50
|
+
```bash [Claude Code]
|
|
51
|
+
claude mcp add blueprint-chart -- npx -y @blueprint-chart/mcp
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
```json [Claude Desktop]
|
|
55
|
+
{
|
|
56
|
+
"mcpServers": {
|
|
57
|
+
"blueprint-chart": {
|
|
58
|
+
"command": "npx",
|
|
59
|
+
"args": ["-y", "@blueprint-chart/mcp"]
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
```json [Cursor]
|
|
66
|
+
{
|
|
67
|
+
"mcpServers": {
|
|
68
|
+
"blueprint-chart": {
|
|
69
|
+
"command": "npx",
|
|
70
|
+
"args": ["-y", "@blueprint-chart/mcp"]
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
```json [VS Code]
|
|
77
|
+
{
|
|
78
|
+
"servers": {
|
|
79
|
+
"blueprint-chart": {
|
|
80
|
+
"type": "stdio",
|
|
81
|
+
"command": "npx",
|
|
82
|
+
"args": ["-y", "@blueprint-chart/mcp"]
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
:::
|
|
89
|
+
|
|
90
|
+
Any other MCP client works too — run `npx -y @blueprint-chart/mcp` over stdio and drop it into
|
|
91
|
+
that client's server config.
|
|
92
|
+
|
|
93
|
+
## Tools
|
|
94
|
+
|
|
95
|
+
| Tool | Purpose |
|
|
96
|
+
| --- | --- |
|
|
97
|
+
| `validate_dsl` | Parse `.bpc`; returns `{ valid, errors[], warnings[] }` — each error carries a `code`, `message`, and actionable `suggestion` |
|
|
98
|
+
| `inspect_dsl` | Summarize a `.bpc`: chart type, scenes, series/row counts, feature flags |
|
|
99
|
+
| `recommend_chart_type` | Rank chart types for a given column shape and row count |
|
|
100
|
+
| `render` | Render to SVG (default) or PNG, with structured errors on failure |
|
|
101
|
+
| `list_chart_types` | List all renderable chart types |
|
|
102
|
+
| `describe_chart_type` | Properties, when-to-use, and data shape for one chart type |
|
|
103
|
+
| `get_example` | Fetch a canonical `.bpc` sample by chart type or name |
|
|
104
|
+
| `get_grammar` | Full DSL syntax reference |
|
|
105
|
+
|
|
106
|
+
## Resources
|
|
107
|
+
|
|
108
|
+
The handbook, DSL grammar, guides, chart-type docs, and canonical samples are all exposed as
|
|
109
|
+
`bpc://` resources — the same content you're reading on this site:
|
|
110
|
+
|
|
111
|
+
- `bpc://grammar` — the full DSL syntax reference
|
|
112
|
+
- `bpc://handbook/<slug>` — dataviz pedagogy (choosing, color, typography, accessibility, …)
|
|
113
|
+
- `bpc://guide/<slug>` — usage guides (scenes, palettes, data transforms, …)
|
|
114
|
+
- `bpc://chart-types/<slug>` — per-chart-type docs
|
|
115
|
+
- `bpc://samples/<id>` — canonical `.bpc` examples
|
|
116
|
+
- `bpc://reference/dsl/<slug>` and `bpc://reference/api/<slug>` — the full reference
|
|
117
|
+
|
|
118
|
+
## Example
|
|
119
|
+
|
|
120
|
+
> **You:** Make a horizontal bar chart of English letter frequencies — top 10, highlight E.
|
|
121
|
+
>
|
|
122
|
+
> **Your assistant:** *(calls `list_chart_types` and `get_example`, writes the `.bpc`, calls
|
|
123
|
+
> `validate_dsl` to confirm it parses, then `render` and shows you the image and the source)*
|
|
124
|
+
|
|
125
|
+
```bpc
|
|
126
|
+
chart bar-horizontal {
|
|
127
|
+
title = "E is the most frequent letter in English"
|
|
128
|
+
sort = descending
|
|
129
|
+
valueLabels = true
|
|
130
|
+
highlight "E"
|
|
131
|
+
data { "E" = 12.70; "T" = 9.06; "A" = 8.17; ... }
|
|
132
|
+
}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## Learn more
|
|
136
|
+
|
|
137
|
+
Full setup, the complete tool/resource reference, and release notes live in the
|
|
138
|
+
[MCP repository](https://github.com/blueprint-chart/mcp) and on
|
|
139
|
+
[npm](https://www.npmjs.com/package/@blueprint-chart/mcp).
|