graphein-mcp 0.4.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 +106 -0
- package/dist/chunk-N5KVZBDZ.js +338 -0
- package/dist/chunk-N5KVZBDZ.js.map +1 -0
- package/dist/index.d.ts +104 -0
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -0
- package/dist/server.d.ts +1 -0
- package/dist/server.js +17 -0
- package/dist/server.js.map +1 -0
- package/package.json +69 -0
- package/resources/agent-guide.md +719 -0
- package/resources/chart-spec.schema.json +7828 -0
- package/resources/spec-reference.md +1382 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/server.ts"],"sourcesContent":["#!/usr/bin/env node\r\n/**\r\n * Stdio entry point for `graphein-mcp`. Connect this from any MCP client\r\n * (Claude Desktop, Copilot, Cursor, …) by pointing it at `npx graphein-mcp`.\r\n *\r\n * The MCP stdio transport speaks JSON-RPC over stdout, so **nothing** here may\r\n * write to stdout — all diagnostics go to stderr.\r\n */\r\nimport { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';\r\nimport { createServer } from './create-server.js';\r\n\r\nasync function main(): Promise<void> {\r\n const server = createServer();\r\n const transport = new StdioServerTransport();\r\n await server.connect(transport);\r\n // The transport keeps the process alive while the client is connected.\r\n}\r\n\r\nmain().catch((err) => {\r\n console.error('[graphein-mcp] fatal:', err);\r\n process.exitCode = 1;\r\n});\r\n"],"mappings":";;;;;;AAQA,SAAS,4BAA4B;AAGrC,eAAe,OAAsB;AACnC,QAAM,SAAS,aAAa;AAC5B,QAAM,YAAY,IAAI,qBAAqB;AAC3C,QAAM,OAAO,QAAQ,SAAS;AAEhC;AAEA,KAAK,EAAE,MAAM,CAAC,QAAQ;AACpB,UAAQ,MAAM,yBAAyB,GAAG;AAC1C,UAAQ,WAAW;AACrB,CAAC;","names":[]}
|
package/package.json
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "graphein-mcp",
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Model Context Protocol server for Graphein — wraps generate → validate → repair → render → critique into one tool call, and serves Graphein's schema + agent guide as resources so a model that never saw the API can still build correct charts.",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "Sachin Patney <sachin.patney@gmail.com>",
|
|
8
|
+
"homepage": "https://github.com/spatney/graphein/tree/main/packages/mcp#readme",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/spatney/graphein.git",
|
|
12
|
+
"directory": "packages/mcp"
|
|
13
|
+
},
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/spatney/graphein/issues"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"visualization",
|
|
19
|
+
"charts",
|
|
20
|
+
"dataviz",
|
|
21
|
+
"graphein",
|
|
22
|
+
"agent",
|
|
23
|
+
"mcp",
|
|
24
|
+
"model-context-protocol",
|
|
25
|
+
"llm",
|
|
26
|
+
"tool"
|
|
27
|
+
],
|
|
28
|
+
"sideEffects": false,
|
|
29
|
+
"main": "./dist/index.js",
|
|
30
|
+
"module": "./dist/index.js",
|
|
31
|
+
"types": "./dist/index.d.ts",
|
|
32
|
+
"bin": {
|
|
33
|
+
"graphein-mcp": "./dist/server.js"
|
|
34
|
+
},
|
|
35
|
+
"exports": {
|
|
36
|
+
".": {
|
|
37
|
+
"types": "./dist/index.d.ts",
|
|
38
|
+
"import": "./dist/index.js"
|
|
39
|
+
},
|
|
40
|
+
"./package.json": "./package.json"
|
|
41
|
+
},
|
|
42
|
+
"files": [
|
|
43
|
+
"dist",
|
|
44
|
+
"resources",
|
|
45
|
+
"README.md",
|
|
46
|
+
"LICENSE"
|
|
47
|
+
],
|
|
48
|
+
"engines": {
|
|
49
|
+
"node": ">=18"
|
|
50
|
+
},
|
|
51
|
+
"publishConfig": {
|
|
52
|
+
"access": "public"
|
|
53
|
+
},
|
|
54
|
+
"scripts": {
|
|
55
|
+
"build": "tsup",
|
|
56
|
+
"dev": "tsup --watch",
|
|
57
|
+
"start": "node dist/server.js",
|
|
58
|
+
"sync:resources": "node scripts/sync-resources.mjs",
|
|
59
|
+
"test": "vitest run",
|
|
60
|
+
"typecheck": "tsc --noEmit",
|
|
61
|
+
"prepack": "tsup"
|
|
62
|
+
},
|
|
63
|
+
"dependencies": {
|
|
64
|
+
"@graphein/node": "^0.4.0",
|
|
65
|
+
"@modelcontextprotocol/sdk": "^1.20.0",
|
|
66
|
+
"graphein": "^0.4.0",
|
|
67
|
+
"zod": "^3.23.0"
|
|
68
|
+
}
|
|
69
|
+
}
|