@silverpoint/mcp 0.0.0-stage → 0.8.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Ernesto Crespo
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,97 @@
1
- # Temporary Holding Version
1
+ # @silverpoint/mcp
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ A [Model Context Protocol](https://modelcontextprotocol.io) server for
4
+ [silverpoint](https://github.com/ecrespo/silverpoint): it tells an agent what the library holds —
5
+ every chart and UI component, their props, data shapes and diagnostics — recommends a chart for a
6
+ dataset, and writes the code that draws it in React, Vue, Angular or Reflex.
7
+
8
+ Everything it answers comes from the agent catalog, generated from the published types of the same
9
+ silverpoint version, so it never describes a prop that does not exist.
10
+
11
+ ```sh
12
+ npm install @silverpoint/mcp
13
+ ```
14
+
15
+ ## Run it
16
+
17
+ Hosted, over Streamable HTTP, read-only and without an account:
18
+
19
+ ```sh
20
+ claude mcp add --transport http silverpoint https://silverpointweb.vercel.app/mcp
21
+ ```
22
+
23
+ In Claude Code, the `silverpoint` plugin connects the hosted server and installs the `silverpoint`
24
+ skill in one step:
25
+
26
+ ```sh
27
+ /plugin marketplace add ecrespo/silverpoint
28
+ /plugin install silverpoint@silverpoint
29
+ ```
30
+
31
+ Over stdio, for a local client:
32
+
33
+ ```sh
34
+ npx @silverpoint/mcp
35
+ ```
36
+
37
+ For Claude Code:
38
+
39
+ ```sh
40
+ claude mcp add silverpoint -- npx -y @silverpoint/mcp
41
+ ```
42
+
43
+ ## Tools
44
+
45
+ <!-- tools:start -->
46
+ | Tool | What it answers |
47
+ |---|---|
48
+ | `get_version` | The silverpoint version this server describes, the Reflex wrapper it is joined with, and the MCP protocol version. |
49
+ | `list_charts` | Every chart, optionally filtered by family, intent (trend, compare, rank, part-to-whole, distribution, correlation, flow, hierarchy, change, uncertainty, progress, schedule, kpi, network) or data shape (series, categories, parts, matrix, hierarchy, links, points, distribution, intervals, events, single, field). |
50
+ | `get_chart` | One chart’s catalog entry: data shape, fields, props with defaults, names and imports. With `framework`, only that framework’s name, import and prop spelling. |
51
+ | `list_components` | Every UI component, optionally filtered by family (ui, composed, overlay) or group. |
52
+ | `get_component` | One component’s catalog entry: props, binding, events, slots and states. With `framework`, in that framework’s terms. |
53
+ | `recommend_chart` | Up to five charts for a data shape and an intent, ranked by a reviewed table, with the reasons. Deterministic: no model involved. |
54
+ | `generate_code` | The imports, stylesheets and code that draw one chart or one component in React, Vue, Angular or Reflex, using only names, paths and props the catalog holds. `fields` maps the chart’s data roles to your field names. |
55
+ | `search_catalog` | A token search over chart and component names, summaries, prop docs and diagnostic codes, best first; at most 20 hits. |
56
+ | `validate_props` | Builds the chart with the core and returns every diagnostic it raises (code, severity, requirement, message, remedy) and the props it does not declare. |
57
+ | `render_chart` | The canonical render of one chart as a standalone SVG, the ground’s stylesheet inlined: what every adapter draws for the same props, data, size and id. Without `data`, the demo dataset. |
58
+ | `check_palette` | The contrast findings of the core’s checkPalette for a preset or a palette of fields, over a substrate given as a hex or by name. |
59
+ <!-- tools:end -->
60
+
61
+ Every result carries the version it describes. A name the catalog does not hold is a tool error with
62
+ the closest valid names.
63
+
64
+ ## Resources and prompts
65
+
66
+ `silverpoint://catalog`, `silverpoint://diagnostics`, `silverpoint://charts/{slug}`,
67
+ `silverpoint://components/{slug}` and `silverpoint://guides/{topic}`, the `silverpoint` skill's
68
+ guides as Markdown (`choosing-charts`, `grounds-and-palettes`, `dashboard`, `ui-components`,
69
+ `overlays`, `timeline`, `react`, `vue`, `angular`, `reflex`). The prompts are `choose-chart` and
70
+ `build-dashboard`.
71
+
72
+ ## In your own server
73
+
74
+ ```ts
75
+ import { createServer, AGENT_CATALOG } from '@silverpoint/mcp';
76
+ ```
77
+
78
+ `createServer()` returns an `McpServer` from the MCP TypeScript SDK, ready to connect to any
79
+ transport.
80
+
81
+ Over HTTP, `@silverpoint/mcp/http` serves stateless Streamable HTTP on Web `Request` and `Response`,
82
+ so any serverless runtime can call it:
83
+
84
+ ```ts
85
+ import { handler } from '@silverpoint/mcp/http';
86
+
87
+ export const POST = handler;
88
+ export const OPTIONS = handler;
89
+ ```
90
+
91
+ Each request gets a server of its own and leaves nothing behind. Only POST carries messages (GET and
92
+ DELETE answer 405, since there are no sessions), CORS is open, a body over 256 KB is refused with
93
+ 413 before it is parsed, and nothing is logged.
94
+
95
+ ## License
96
+
97
+ MIT