slabwise-mcp 0.0.0-stage → 1.0.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 +17 -2
- package/bin/cli.mjs +30 -0
- package/package.json +21 -4
package/README.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
-
#
|
|
1
|
+
# `slabwise-mcp`
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Zero-dependency stdio-to-Streamable-HTTP MCP client bridge for **SlabWise** (`com.slabwise/fabrication-dxf-templates`).
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```json
|
|
8
|
+
{
|
|
9
|
+
"mcpServers": {
|
|
10
|
+
"slabwise": {
|
|
11
|
+
"command": "npx",
|
|
12
|
+
"args": ["-y", "slabwise-mcp"]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Remote endpoint: `https://slabwise.com/api/mcp`
|
package/bin/cli.mjs
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Zero-dependency MCP stdio <-> Streamable HTTP bridge for SlabWise
|
|
3
|
+
// Official MCP Registry ID: com.slabwise/fabrication-dxf-templates
|
|
4
|
+
import readline from 'node:readline';
|
|
5
|
+
|
|
6
|
+
const ENDPOINT = process.env.SLABWISE_MCP_URL || 'https://slabwise.com/api/mcp';
|
|
7
|
+
const AUTH_TOKEN = process.env.SLABWISE_MCP_TOKEN || '';
|
|
8
|
+
|
|
9
|
+
const rl = readline.createInterface({ input: process.stdin, crlfDelay: Infinity });
|
|
10
|
+
rl.on('line', async (line) => {
|
|
11
|
+
const trimmed = line.trim();
|
|
12
|
+
if (!trimmed) return;
|
|
13
|
+
let req;
|
|
14
|
+
try { req = JSON.parse(trimmed); } catch { return; }
|
|
15
|
+
const headers = {
|
|
16
|
+
'Content-Type': 'application/json',
|
|
17
|
+
'Accept': 'application/json, text/event-stream',
|
|
18
|
+
};
|
|
19
|
+
if (AUTH_TOKEN) headers['Authorization'] = `Bearer ${AUTH_TOKEN}`;
|
|
20
|
+
try {
|
|
21
|
+
const res = await fetch(ENDPOINT, { method: 'POST', headers, body: JSON.stringify(req) });
|
|
22
|
+
if (res.status === 202 || res.status === 204) return;
|
|
23
|
+
const text = await res.text();
|
|
24
|
+
if (text.trim()) process.stdout.write(text.trim() + '\n');
|
|
25
|
+
} catch (err) {
|
|
26
|
+
if (req.id !== undefined) {
|
|
27
|
+
process.stdout.write(JSON.stringify({ jsonrpc: '2.0', id: req.id, error: { code: -32000, message: String(err) } }) + '\n');
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "slabwise-mcp",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Zero-dependency stdio-to-Streamable-HTTP MCP proxy CLI for SlabWise (com.slabwise/fabrication-dxf-templates).",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"slabwise-mcp": "./bin/cli.mjs"
|
|
8
|
+
},
|
|
9
|
+
"keywords": [
|
|
10
|
+
"mcp",
|
|
11
|
+
"model-context-protocol",
|
|
12
|
+
"mcp-server",
|
|
13
|
+
"claude",
|
|
14
|
+
"cursor",
|
|
15
|
+
"slabwise"
|
|
16
|
+
],
|
|
17
|
+
"homepage": "https://slabwise.com",
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"engines": {
|
|
20
|
+
"node": ">=18.0.0"
|
|
21
|
+
},
|
|
22
|
+
"mcpName": "com.slabwise/fabrication-dxf-templates"
|
|
23
|
+
}
|