opentakeoff-mcp 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/README.md +135 -0
- package/dist/server-core.js +1217 -0
- package/dist/server.js +24 -0
- package/package.json +53 -0
package/dist/server.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// stdout is the MCP wire. pdf.js prints its module-scope "legacy build" warning
|
|
3
|
+
// via console.log, and in the bundled dist the external pdfjs-dist import hoists
|
|
4
|
+
// ABOVE any inlined hush code — so the redirect must live in a separate entry
|
|
5
|
+
// module that defers the server (and its hoisted externals) behind a dynamic
|
|
6
|
+
// import. Same belt as src/hush.ts, one module earlier.
|
|
7
|
+
console.log = console.error.bind(console);
|
|
8
|
+
|
|
9
|
+
// pdf.js 4.x needs Promise.withResolvers (Node 22+); polyfill here so the
|
|
10
|
+
// engines floor stays Node 20 — must exist before pdfjs-dist evaluates.
|
|
11
|
+
if (typeof Promise.withResolvers !== "function") {
|
|
12
|
+
Promise.withResolvers = function withResolvers() {
|
|
13
|
+
let resolve, reject;
|
|
14
|
+
const promise = new Promise((res, rej) => { resolve = res; reject = rej; });
|
|
15
|
+
return { promise, resolve, reject };
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// server-core keeps upstream's run-only-as-entry guard (import.meta.url vs
|
|
20
|
+
// argv[1]); satisfy it so the guard sees the core as the entry.
|
|
21
|
+
import { fileURLToPath } from "node:url";
|
|
22
|
+
process.argv[1] = fileURLToPath(new URL("./server-core.js", import.meta.url));
|
|
23
|
+
|
|
24
|
+
await import("./server-core.js");
|
package/package.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "opentakeoff-mcp",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "OpenTakeoff MCP server \u2014 drive the takeoff engine from your MCP client over stdio.",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=20"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"dev": "node --import tsx server.ts",
|
|
12
|
+
"start": "node dist/server.js",
|
|
13
|
+
"build": "esbuild server.ts --bundle --platform=node --format=esm --packages=external --outfile=dist/server-core.js && cp bin.js dist/server.js && chmod +x dist/server.js",
|
|
14
|
+
"prepublishOnly": "npm run typecheck && npm test && npm run build",
|
|
15
|
+
"typecheck": "tsc --noEmit",
|
|
16
|
+
"test": "node --import tsx --test test/*.test.ts"
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@modelcontextprotocol/sdk": "^1.12.0",
|
|
20
|
+
"pdfjs-dist": "^4.10.38",
|
|
21
|
+
"zod": "^3.24.1"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@types/node": "^22.19.21",
|
|
25
|
+
"typescript": "^5.7.2",
|
|
26
|
+
"tsx": "^4.19.2",
|
|
27
|
+
"esbuild": "^0.24.2"
|
|
28
|
+
},
|
|
29
|
+
"bin": {
|
|
30
|
+
"opentakeoff-mcp": "dist/server.js"
|
|
31
|
+
},
|
|
32
|
+
"main": "dist/server.js",
|
|
33
|
+
"files": [
|
|
34
|
+
"dist",
|
|
35
|
+
"README.md"
|
|
36
|
+
],
|
|
37
|
+
"repository": {
|
|
38
|
+
"type": "git",
|
|
39
|
+
"url": "git+https://github.com/Kentucky-ai/opentakeoff.git",
|
|
40
|
+
"directory": "mcp"
|
|
41
|
+
},
|
|
42
|
+
"homepage": "https://github.com/Kentucky-ai/opentakeoff/tree/main/mcp",
|
|
43
|
+
"keywords": [
|
|
44
|
+
"mcp",
|
|
45
|
+
"model-context-protocol",
|
|
46
|
+
"takeoff",
|
|
47
|
+
"construction",
|
|
48
|
+
"estimating",
|
|
49
|
+
"pdf",
|
|
50
|
+
"quantity-takeoff",
|
|
51
|
+
"flooring"
|
|
52
|
+
]
|
|
53
|
+
}
|