auigrid-mcp-server 0.1.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 +44 -0
- package/data/api-index.json +8069 -0
- package/data/methods-index.json +3127 -0
- package/data/samples-index.json +163 -0
- package/data/static-utils-index.json +229 -0
- package/dist/build-index.js +95 -0
- package/dist/build-methods-index.js +14 -0
- package/dist/build-samples-index.js +46 -0
- package/dist/build-static-utils-index.js +12 -0
- package/dist/enrich-api-index.js +50 -0
- package/dist/index.js +226 -0
- package/dist/lib/apiIndex.js +40 -0
- package/dist/lib/docPageParser.js +101 -0
- package/dist/lib/methodsIndex.js +32 -0
- package/dist/lib/samplesIndex.js +52 -0
- package/dist/lib/staticUtilsIndex.js +29 -0
- package/package.json +46 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as fs from "node:fs";
|
|
2
|
+
import * as path from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
5
|
+
const indexPath = path.resolve(__dirname, "../../data/static-utils-index.json");
|
|
6
|
+
let entries = [];
|
|
7
|
+
try {
|
|
8
|
+
entries = JSON.parse(fs.readFileSync(indexPath, "utf-8"));
|
|
9
|
+
}
|
|
10
|
+
catch (err) {
|
|
11
|
+
console.error(`Failed to load static utils index at ${indexPath}. Run "npm run build:static-utils-index" first.`, err);
|
|
12
|
+
}
|
|
13
|
+
export function searchStaticUtils(query, limit = 15) {
|
|
14
|
+
const q = query.toLowerCase();
|
|
15
|
+
const results = entries.filter((e) => e.name.toLowerCase().includes(q) || e.description.toLowerCase().includes(q));
|
|
16
|
+
results.sort((a, b) => {
|
|
17
|
+
const aExact = a.name.toLowerCase() === q ? 0 : 1;
|
|
18
|
+
const bExact = b.name.toLowerCase() === q ? 0 : 1;
|
|
19
|
+
return aExact - bExact;
|
|
20
|
+
});
|
|
21
|
+
return results.slice(0, limit);
|
|
22
|
+
}
|
|
23
|
+
export function getStaticUtil(name) {
|
|
24
|
+
const lower = name.toLowerCase();
|
|
25
|
+
return entries.find((e) => e.name.toLowerCase() === lower);
|
|
26
|
+
}
|
|
27
|
+
export function listStaticUtils() {
|
|
28
|
+
return entries;
|
|
29
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "auigrid-mcp-server",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "MCP server exposing AUIGrid API reference (props, columns, renderers, events) and samples for AI coding assistants",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"auigrid-mcp-server": "dist/index.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist",
|
|
12
|
+
"data"
|
|
13
|
+
],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "tsc -p tsconfig.json && node dist/build-index.js && node dist/enrich-api-index.js && node dist/build-samples-index.js && node dist/build-methods-index.js && node dist/build-static-utils-index.js",
|
|
16
|
+
"build:index": "node dist/build-index.js && node dist/enrich-api-index.js",
|
|
17
|
+
"build:samples-index": "node dist/build-samples-index.js",
|
|
18
|
+
"build:methods-index": "node dist/build-methods-index.js",
|
|
19
|
+
"build:static-utils-index": "node dist/build-static-utils-index.js",
|
|
20
|
+
"start": "node dist/index.js",
|
|
21
|
+
"dev": "tsc -p tsconfig.json --watch",
|
|
22
|
+
"prepublishOnly": "npm run build"
|
|
23
|
+
},
|
|
24
|
+
"keywords": [
|
|
25
|
+
"mcp",
|
|
26
|
+
"model-context-protocol",
|
|
27
|
+
"auigrid",
|
|
28
|
+
"aui-grid",
|
|
29
|
+
"claude",
|
|
30
|
+
"ai-tooling"
|
|
31
|
+
],
|
|
32
|
+
"license": "MIT",
|
|
33
|
+
"engines": {
|
|
34
|
+
"node": ">=18"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@modelcontextprotocol/sdk": "^1.17.0",
|
|
38
|
+
"zod": "^3.24.2"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@types/node": "^22.13.0",
|
|
42
|
+
"cheerio": "^1.2.0",
|
|
43
|
+
"ts-morph": "^28.0.0",
|
|
44
|
+
"typescript": "^5.7.3"
|
|
45
|
+
}
|
|
46
|
+
}
|