@adobe/spectrum-design-data-mcp 1.1.3 → 1.1.4
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/CHANGELOG.md +12 -0
- package/README.md +3 -3
- package/package.json +2 -2
- package/src/index.js +20 -2
- package/src/tools/schemas.js +0 -4
- package/src/tools/tokens.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# [**@adobe/spectrum-design-data-mcp**](https://github.com/adobe/spectrum-design-data-mcp)
|
|
2
2
|
|
|
3
|
+
## 1.1.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#751](https://github.com/adobe/spectrum-design-data/pull/751) [`42e6257`](https://github.com/adobe/spectrum-design-data/commit/42e62574ef03bc8f9a66ebde48e8e60625e7bd7c) Thanks [@GarthDB](https://github.com/GarthDB)! - Fix MCP spec compliance for strict clients like Kiro and Claude
|
|
8
|
+
- Remove invalid `required: true` from individual property definitions
|
|
9
|
+
in tool `inputSchema` objects (JSON Schema requires `required` as a
|
|
10
|
+
string array on the parent object, not a boolean on properties)
|
|
11
|
+
- Upgrade `@modelcontextprotocol/sdk` from `^0.5.0` to `^1.27.1`
|
|
12
|
+
- Return tool execution errors as results with `isError: true` instead of throwing (per MCP spec)
|
|
13
|
+
- Read server version dynamically from `package.json` instead of hardcoding
|
|
14
|
+
|
|
3
15
|
## 1.1.3
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -32,7 +32,7 @@ Or clone and run locally:
|
|
|
32
32
|
|
|
33
33
|
```bash
|
|
34
34
|
git clone https://github.com/adobe/spectrum-design-data.git
|
|
35
|
-
cd spectrum-
|
|
35
|
+
cd spectrum-design-data/tools/spectrum-design-data-mcp
|
|
36
36
|
pnpm install
|
|
37
37
|
```
|
|
38
38
|
|
|
@@ -105,7 +105,7 @@ Add to your MCP configuration (e.g., `.cursor/mcp.json` for Cursor IDE):
|
|
|
105
105
|
"spectrum-design-data": {
|
|
106
106
|
"command": "node",
|
|
107
107
|
"args": [
|
|
108
|
-
"./path/to/spectrum-
|
|
108
|
+
"./path/to/spectrum-design-data/tools/spectrum-design-data-mcp/src/index.js"
|
|
109
109
|
]
|
|
110
110
|
}
|
|
111
111
|
}
|
|
@@ -234,7 +234,7 @@ npm audit
|
|
|
234
234
|
|
|
235
235
|
```bash
|
|
236
236
|
git clone https://github.com/adobe/spectrum-design-data.git
|
|
237
|
-
cd spectrum-
|
|
237
|
+
cd spectrum-design-data
|
|
238
238
|
pnpm install
|
|
239
239
|
cd tools/spectrum-design-data-mcp
|
|
240
240
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/spectrum-design-data-mcp",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"description": "Model Context Protocol server for Spectrum design data including tokens, schemas, and component anatomy",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mcp",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"provenance": true
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@modelcontextprotocol/sdk": "^
|
|
49
|
+
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
50
50
|
"commander": "^13.1.0",
|
|
51
51
|
"@adobe/spectrum-tokens": "14.2.3",
|
|
52
52
|
"@adobe/spectrum-component-api-schemas": "6.0.0"
|
package/src/index.js
CHANGED
|
@@ -10,6 +10,10 @@ OF ANY KIND, either express or implied. See the License for the specific languag
|
|
|
10
10
|
governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
+
import { readFileSync } from "node:fs";
|
|
14
|
+
import { dirname, join } from "node:path";
|
|
15
|
+
import { fileURLToPath } from "node:url";
|
|
16
|
+
|
|
13
17
|
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
14
18
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
15
19
|
import {
|
|
@@ -20,6 +24,11 @@ import {
|
|
|
20
24
|
import { createTokenTools } from "./tools/tokens.js";
|
|
21
25
|
import { createSchemaTools } from "./tools/schemas.js";
|
|
22
26
|
|
|
27
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
28
|
+
const packageJson = JSON.parse(
|
|
29
|
+
readFileSync(join(__dirname, "../package.json"), "utf8"),
|
|
30
|
+
);
|
|
31
|
+
|
|
23
32
|
/**
|
|
24
33
|
* Create and configure the Spectrum Design Data MCP server
|
|
25
34
|
* @returns {Server} Configured MCP server instance
|
|
@@ -28,7 +37,7 @@ export function createMCPServer() {
|
|
|
28
37
|
const server = new Server(
|
|
29
38
|
{
|
|
30
39
|
name: "spectrum-design-data",
|
|
31
|
-
version:
|
|
40
|
+
version: packageJson.version,
|
|
32
41
|
},
|
|
33
42
|
{
|
|
34
43
|
capabilities: {
|
|
@@ -71,7 +80,16 @@ export function createMCPServer() {
|
|
|
71
80
|
],
|
|
72
81
|
};
|
|
73
82
|
} catch (error) {
|
|
74
|
-
|
|
83
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
84
|
+
return {
|
|
85
|
+
content: [
|
|
86
|
+
{
|
|
87
|
+
type: "text",
|
|
88
|
+
text: `Tool execution failed: ${message}`,
|
|
89
|
+
},
|
|
90
|
+
],
|
|
91
|
+
isError: true,
|
|
92
|
+
};
|
|
75
93
|
}
|
|
76
94
|
});
|
|
77
95
|
|
package/src/tools/schemas.js
CHANGED
|
@@ -27,7 +27,6 @@ export function createSchemaTools() {
|
|
|
27
27
|
component: {
|
|
28
28
|
type: "string",
|
|
29
29
|
description: "Component name",
|
|
30
|
-
required: true,
|
|
31
30
|
},
|
|
32
31
|
},
|
|
33
32
|
required: ["component"],
|
|
@@ -89,12 +88,10 @@ export function createSchemaTools() {
|
|
|
89
88
|
component: {
|
|
90
89
|
type: "string",
|
|
91
90
|
description: "Component name",
|
|
92
|
-
required: true,
|
|
93
91
|
},
|
|
94
92
|
props: {
|
|
95
93
|
type: "object",
|
|
96
94
|
description: "Props to validate",
|
|
97
|
-
required: true,
|
|
98
95
|
},
|
|
99
96
|
},
|
|
100
97
|
required: ["component", "props"],
|
|
@@ -132,7 +129,6 @@ export function createSchemaTools() {
|
|
|
132
129
|
feature: {
|
|
133
130
|
type: "string",
|
|
134
131
|
description: "Property name substring",
|
|
135
|
-
required: true,
|
|
136
132
|
},
|
|
137
133
|
},
|
|
138
134
|
required: ["feature"],
|