@silverpoint/mcp 0.0.0-stage → 0.7.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 +21 -0
- package/README.md +78 -2
- package/agent-catalog.json +10868 -0
- package/dist/bin.js +5 -0
- package/dist/chunk-3FJJQMGW.js +11961 -0
- package/dist/http.d.ts +7 -0
- package/dist/http.js +71 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +1 -0
- package/dist/server-BXBjhMwX.d.ts +221 -0
- package/package.json +53 -3
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,79 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @silverpoint/mcp
|
|
2
2
|
|
|
3
|
-
|
|
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
|
+
Over stdio, for a local client:
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
npx @silverpoint/mcp
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
For Claude Code:
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
claude mcp add silverpoint -- npx -y @silverpoint/mcp
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Tools
|
|
30
|
+
|
|
31
|
+
| Tool | What it answers |
|
|
32
|
+
|---|---|
|
|
33
|
+
| `get_version` | The silverpoint version described, the Reflex wrapper it is joined with, and the protocol version |
|
|
34
|
+
| `list_charts`, `get_chart` | The charts, by family, intent or data shape; one chart's props, fields and imports |
|
|
35
|
+
| `list_components`, `get_component` | The UI components; one component's props, binding, events and slots |
|
|
36
|
+
| `recommend_chart` | Up to five charts for a data shape and an intent, from a reviewed table |
|
|
37
|
+
| `generate_code` | The imports, stylesheets and code for one chart or component in one framework |
|
|
38
|
+
| `validate_props` | Every diagnostic the core raises for a chart's props, and the props it does not declare |
|
|
39
|
+
| `render_chart` | The chart's canonical render as a standalone SVG, the ground's stylesheet inlined |
|
|
40
|
+
| `check_palette` | The contrast findings of a palette preset or of your own palette's fields |
|
|
41
|
+
| `search_catalog` | A token search over names, summaries, prop docs and diagnostic codes |
|
|
42
|
+
|
|
43
|
+
Every result carries the version it describes. A name the catalog does not hold is a tool error with
|
|
44
|
+
the closest valid names.
|
|
45
|
+
|
|
46
|
+
## Resources and prompts
|
|
47
|
+
|
|
48
|
+
`silverpoint://catalog`, `silverpoint://diagnostics`, `silverpoint://charts/{slug}`,
|
|
49
|
+
`silverpoint://components/{slug}` and `silverpoint://guides/{topic}`, the `silverpoint` skill's
|
|
50
|
+
guides as Markdown (`choosing-charts`, `grounds-and-palettes`, `dashboard`, `ui-components`,
|
|
51
|
+
`overlays`, `timeline`, `react`, `vue`, `angular`, `reflex`). The prompts are `choose-chart` and
|
|
52
|
+
`build-dashboard`.
|
|
53
|
+
|
|
54
|
+
## In your own server
|
|
55
|
+
|
|
56
|
+
```ts
|
|
57
|
+
import { createServer, AGENT_CATALOG } from '@silverpoint/mcp';
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
`createServer()` returns an `McpServer` from the MCP TypeScript SDK, ready to connect to any
|
|
61
|
+
transport.
|
|
62
|
+
|
|
63
|
+
Over HTTP, `@silverpoint/mcp/http` serves stateless Streamable HTTP on Web `Request` and `Response`,
|
|
64
|
+
so any serverless runtime can call it:
|
|
65
|
+
|
|
66
|
+
```ts
|
|
67
|
+
import { handler } from '@silverpoint/mcp/http';
|
|
68
|
+
|
|
69
|
+
export const POST = handler;
|
|
70
|
+
export const OPTIONS = handler;
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Each request gets a server of its own and leaves nothing behind. Only POST carries messages (GET and
|
|
74
|
+
DELETE answer 405, since there are no sessions), CORS is open, a body over 256 KB is refused with
|
|
75
|
+
413 before it is parsed, and nothing is logged.
|
|
76
|
+
|
|
77
|
+
## License
|
|
78
|
+
|
|
79
|
+
MIT
|