@kineviz/gl-mcp 0.0.0-stage → 0.1.1
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/NOTICE +22 -0
- package/README.md +47 -2
- package/dist/cli.js +20113 -0
- package/package.json +10 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Kineviz, Inc.
|
|
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/NOTICE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
@kineviz/gl-mcp
|
|
2
|
+
Copyright 2026 Kineviz, Inc.
|
|
3
|
+
|
|
4
|
+
This product includes software developed at Kineviz, Inc.
|
|
5
|
+
Licensed under the MIT License; see LICENSE.
|
|
6
|
+
|
|
7
|
+
dist/cli.js is a single bundle. It includes code from the following
|
|
8
|
+
third-party packages, each under its own license:
|
|
9
|
+
|
|
10
|
+
@modelcontextprotocol/sdk MIT https://modelcontextprotocol.io
|
|
11
|
+
ajv MIT https://ajv.js.org
|
|
12
|
+
ajv-formats MIT https://github.com/ajv-validator/ajv-formats
|
|
13
|
+
fast-deep-equal MIT https://github.com/epoberezkin/fast-deep-equal
|
|
14
|
+
fast-uri BSD-3-Clause https://github.com/fastify/fast-uri
|
|
15
|
+
json-schema-traverse MIT https://github.com/epoberezkin/json-schema-traverse
|
|
16
|
+
ws MIT https://github.com/websockets/ws
|
|
17
|
+
zod MIT https://zod.dev
|
|
18
|
+
zod-to-json-schema ISC https://github.com/StefanTerdell/zod-to-json-schema
|
|
19
|
+
|
|
20
|
+
License identifiers above are the `license` field each package declares in its
|
|
21
|
+
own package.json, read from the installed versions this release was built
|
|
22
|
+
against.
|
package/README.md
CHANGED
|
@@ -1,3 +1,48 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @kineviz/gl-mcp
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
An MCP server that lets an AI agent drive a live [@kineviz/gl](https://www.npmjs.com/package/@kineviz/gl) graph canvas.
|
|
4
|
+
|
|
5
|
+
It offers 60 typed tools ("verbs") over stdio, such as `describeGraph`, `findPath`,
|
|
6
|
+
`findCentral`, `colorByProperty`, `clusterLayout` and `captureScene`, and forwards each
|
|
7
|
+
call over a local WebSocket to a browser page that runs the canvas.
|
|
8
|
+
|
|
9
|
+
## Use it with Claude Code
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
claude mcp add kineviz-gl -- npx -y @kineviz/gl-mcp
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Any MCP client that can start a stdio server works the same way: the command is
|
|
16
|
+
`npx -y @kineviz/gl-mcp` (or `gl-mcp` after `npm install -g @kineviz/gl-mcp`).
|
|
17
|
+
|
|
18
|
+
## Connect a canvas
|
|
19
|
+
|
|
20
|
+
The server listens on `ws://localhost:8765`. A page with a `GraphCanvas` connects to it
|
|
21
|
+
and answers each `verb_call` message:
|
|
22
|
+
|
|
23
|
+
```js
|
|
24
|
+
import { verbs } from '@kineviz/gl-verbs';
|
|
25
|
+
|
|
26
|
+
ws.onmessage = async (ev) => {
|
|
27
|
+
const msg = JSON.parse(ev.data);
|
|
28
|
+
if (msg.type !== 'verb_call') return;
|
|
29
|
+
const verb = verbs.find((v) => v.name === msg.name);
|
|
30
|
+
const result = await verb.execute(verb.argsSchema.parse(msg.args ?? {}), { api });
|
|
31
|
+
ws.send(JSON.stringify({ type: 'verb_result', callId: msg.callId, result }));
|
|
32
|
+
};
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
The Lab page on the kineviz.gl site does this for you: open it, choose
|
|
36
|
+
"Connect to the bridge", and ask your agent about the graph.
|
|
37
|
+
|
|
38
|
+
## Options
|
|
39
|
+
|
|
40
|
+
| Variable | Default | Meaning |
|
|
41
|
+
|---|---|---|
|
|
42
|
+
| `GL_BRIDGE_WS_PORT` | `8765` | WebSocket port the canvas page connects to |
|
|
43
|
+
|
|
44
|
+
Requires Node 20 or later. One canvas session at a time.
|
|
45
|
+
|
|
46
|
+
## License
|
|
47
|
+
|
|
48
|
+
MIT, the same as @kineviz/gl. See LICENSE and NOTICE.
|