@volue/wave-mcp 0.1.0-next.0 → 0.1.0-next.2
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 +10 -4
- package/dist/{index-DaBLCsNz.js → index-Dax7yaAA.js} +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +28 -1
- package/dist/{server-B9GajLY8.js → server-Q7TF5taU.js} +1 -1
- package/dist/transports/http.js +4 -3
- package/dist/transports/stdio.js +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
### VS Code
|
|
19
19
|
|
|
20
|
-
[](https://insiders.vscode.dev/redirect/mcp/install?name=Wave%20Design%20System&config=%7B%22type%22%3A%22stdio%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40volue%2Fwave-mcp%40latest%22%5D%7D)
|
|
21
21
|
|
|
22
22
|
Use the button above or manually add to your `.vscode/mcp.json`:
|
|
23
23
|
|
|
@@ -27,7 +27,7 @@ Use the button above or manually add to your `.vscode/mcp.json`:
|
|
|
27
27
|
"Wave Design System": {
|
|
28
28
|
"type": "stdio",
|
|
29
29
|
"command": "npx",
|
|
30
|
-
"args": ["@volue/wave-mcp@latest"]
|
|
30
|
+
"args": ["-y", "@volue/wave-mcp@latest"]
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
"inputs": []
|
|
@@ -81,7 +81,13 @@ npx @volue/wave-mcp@latest
|
|
|
81
81
|
For server deployments or custom integrations:
|
|
82
82
|
|
|
83
83
|
```bash
|
|
84
|
-
npx @volue/wave-mcp@latest
|
|
84
|
+
npx @volue/wave-mcp@latest http
|
|
85
85
|
```
|
|
86
86
|
|
|
87
|
-
The HTTP server runs on port 3000 by default and exposes the MCP endpoint at `/mcp`.
|
|
87
|
+
The HTTP server runs on port `3000` by default and exposes the MCP endpoint at `/mcp`.
|
|
88
|
+
|
|
89
|
+
You can customize the port using environment variable:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
PORT=8080 npx @volue/wave-mcp@latest http
|
|
93
|
+
```
|
|
@@ -229,7 +229,7 @@ const getColorUsageTool = {
|
|
|
229
229
|
content: [
|
|
230
230
|
{
|
|
231
231
|
type: "text",
|
|
232
|
-
text: JSON.stringify(colorTokensData
|
|
232
|
+
text: JSON.stringify(colorTokensData)
|
|
233
233
|
},
|
|
234
234
|
{
|
|
235
235
|
type: "text",
|
|
@@ -238,7 +238,7 @@ const getColorUsageTool = {
|
|
|
238
238
|
${markdown}
|
|
239
239
|
|
|
240
240
|
---
|
|
241
|
-
Source:
|
|
241
|
+
Source: ${createUrl("tokens/colors")}`
|
|
242
242
|
}
|
|
243
243
|
]
|
|
244
244
|
};
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,3 +1,30 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
import { pathToFileURL } from 'node:url';
|
|
3
|
+
export { s as server } from './server-Q7TF5taU.js';
|
|
3
4
|
import '@modelcontextprotocol/sdk/server/mcp.js';
|
|
5
|
+
|
|
6
|
+
if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) {
|
|
7
|
+
const args = process.argv.slice(2);
|
|
8
|
+
const transport = args[0] || "stdio";
|
|
9
|
+
async function run() {
|
|
10
|
+
try {
|
|
11
|
+
switch (transport) {
|
|
12
|
+
case "stdio":
|
|
13
|
+
await import('./transports/stdio.js');
|
|
14
|
+
break;
|
|
15
|
+
case "http":
|
|
16
|
+
process.argv.push("--auto-run");
|
|
17
|
+
await import('./transports/http.js');
|
|
18
|
+
break;
|
|
19
|
+
default:
|
|
20
|
+
console.error(`Unknown transport: ${transport}`);
|
|
21
|
+
console.error("Available transports: stdio, http");
|
|
22
|
+
process.exit(1);
|
|
23
|
+
}
|
|
24
|
+
} catch (error) {
|
|
25
|
+
console.error("Error running transport:", error);
|
|
26
|
+
process.exit(1);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
run();
|
|
30
|
+
}
|
package/dist/transports/http.js
CHANGED
|
@@ -4,8 +4,9 @@ import { isInitializeRequest } from '@modelcontextprotocol/sdk/types.js';
|
|
|
4
4
|
import cors from 'cors';
|
|
5
5
|
import express from 'express';
|
|
6
6
|
import { randomUUID } from 'node:crypto';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { pathToFileURL } from 'node:url';
|
|
8
|
+
import { s as server, p as packageJson } from '../server-Q7TF5taU.js';
|
|
9
|
+
import { i as initializeTools } from '../index-Dax7yaAA.js';
|
|
9
10
|
import '@modelcontextprotocol/sdk/server/mcp.js';
|
|
10
11
|
import 'node:module';
|
|
11
12
|
import 'remark-parse';
|
|
@@ -81,7 +82,7 @@ app.get("/health", (_req, res) => {
|
|
|
81
82
|
const host = process.env.HOST ?? "localhost";
|
|
82
83
|
const port = process.env.PORT ? Number(process.env.PORT) : 3e3;
|
|
83
84
|
let runningServer = null;
|
|
84
|
-
if (import.meta.url ===
|
|
85
|
+
if (process.argv.includes("--auto-run") || process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) {
|
|
85
86
|
runningServer = app.listen(port, host, (error) => {
|
|
86
87
|
if (error) {
|
|
87
88
|
console.error("\u274C Failed to start server:", error);
|
package/dist/transports/stdio.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
3
|
-
import { s as server } from '../server-
|
|
4
|
-
import { i as initializeTools } from '../index-
|
|
3
|
+
import { s as server } from '../server-Q7TF5taU.js';
|
|
4
|
+
import { i as initializeTools } from '../index-Dax7yaAA.js';
|
|
5
5
|
import '@modelcontextprotocol/sdk/server/mcp.js';
|
|
6
6
|
import 'node:module';
|
|
7
7
|
import 'remark-parse';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volue/wave-mcp",
|
|
3
|
-
"version": "0.1.0-next.
|
|
3
|
+
"version": "0.1.0-next.2",
|
|
4
4
|
"description": "An MCP server that connects AI tools to the Wave Design System",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"repository": {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"directory": "mcp"
|
|
10
10
|
},
|
|
11
11
|
"type": "module",
|
|
12
|
-
"bin": "./dist/
|
|
12
|
+
"bin": "./dist/index.js",
|
|
13
13
|
"publishConfig": {
|
|
14
14
|
"access": "public"
|
|
15
15
|
},
|