pigment-mcp 0.2.0 → 0.3.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 +7 -1
- package/cli.js +13 -6
- package/package.json +7 -2
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 mirunamu00
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
<a href="https://pigmentui.com"><img src="https://pigmentui.com/opengraph-image" alt="Pigment — give your agent a palette, not a prompt." width="100%" /></a>
|
|
2
|
+
|
|
1
3
|
# pigment-mcp
|
|
2
4
|
|
|
3
5
|
MCP server for [Pigment](https://pigmentui.com) design systems. Your coding agent (Claude Code, Codex,
|
|
@@ -31,7 +33,7 @@ Prefer nothing to install? The same server runs remotely: `claude mcp add --tran
|
|
|
31
33
|
|
|
32
34
|
Start a new session and just ask:
|
|
33
35
|
|
|
34
|
-
> Apply the Pigment design system margin-notes
|
|
36
|
+
> Apply the Pigment design system margin-notes to this project.
|
|
35
37
|
|
|
36
38
|
Or run the `apply` prompt (Claude Code: `/mcp__pigment__apply`), which adds the working agreement: audit first,
|
|
37
39
|
propose a plan, restyle one sample screen, then report build and visual checks.
|
|
@@ -48,3 +50,7 @@ propose a plan, restyle one sample screen, then report build and visual checks.
|
|
|
48
50
|
| `get_references` | Screenshots of four reference apps restyled with the system |
|
|
49
51
|
|
|
50
52
|
Requires Node 22+.
|
|
53
|
+
|
|
54
|
+
## License
|
|
55
|
+
|
|
56
|
+
[MIT](https://github.com/mirunamu00/pigment/blob/main/LICENSE) © 2026 [mirunamu00](https://github.com/mirunamu00) · [Source](https://github.com/mirunamu00/pigment) · [pigmentui.com](https://pigmentui.com)
|
package/cli.js
CHANGED
|
@@ -34866,7 +34866,7 @@ var init_package = __esm({
|
|
|
34866
34866
|
"package.json"() {
|
|
34867
34867
|
package_default = {
|
|
34868
34868
|
name: "@pigment/mcp",
|
|
34869
|
-
version: "0.
|
|
34869
|
+
version: "0.3.0",
|
|
34870
34870
|
private: true,
|
|
34871
34871
|
type: "module",
|
|
34872
34872
|
description: "MCP server for Pigment design systems: tokens, rules, component specs and installation guides for your coding agent.",
|
|
@@ -34922,13 +34922,14 @@ function specForMcp(systemId, pinned) {
|
|
|
34922
34922
|
].join("\n");
|
|
34923
34923
|
const body = start < 0 ? md : md.slice(0, start) + chapter + (end < 0 ? "" : md.slice(end));
|
|
34924
34924
|
return [
|
|
34925
|
-
`> Delivered over MCP as ${systemId}@${pinned}.
|
|
34925
|
+
`> Delivered over MCP as ${systemId}@${pinned}. Record exactly \`${systemId}@${pinned}\` in design-system/VERSION and pass version "${pinned}" in every later call.`,
|
|
34926
|
+
"> Where this document says tokens.css or tokens.json, call get_tokens and copy the file verbatim.",
|
|
34926
34927
|
"",
|
|
34927
34928
|
body
|
|
34928
34929
|
].join("\n");
|
|
34929
34930
|
}
|
|
34930
34931
|
function createServer() {
|
|
34931
|
-
const server = new McpServer({ name: "pigment", title: "Pigment design systems", version: SERVER_VERSION });
|
|
34932
|
+
const server = new McpServer({ name: "pigment", title: "Pigment design systems", version: SERVER_VERSION }, { instructions: INSTRUCTIONS });
|
|
34932
34933
|
server.registerTool(
|
|
34933
34934
|
"list_design_systems",
|
|
34934
34935
|
{
|
|
@@ -34949,7 +34950,7 @@ function createServer() {
|
|
|
34949
34950
|
"get_design_system",
|
|
34950
34951
|
{
|
|
34951
34952
|
title: "Get design system",
|
|
34952
|
-
description: "The full specification of one
|
|
34953
|
+
description: "The full specification of one version (the latest unless the project pins one): character, the defining rules, color, type, spacing and motion rules, semantic and primitive token tables, setup and verification. Read it before changing any UI.",
|
|
34953
34954
|
inputSchema: external_exports.object({ id, version: version2 }),
|
|
34954
34955
|
annotations: { readOnlyHint: true }
|
|
34955
34956
|
},
|
|
@@ -35035,7 +35036,7 @@ function createServer() {
|
|
|
35035
35036
|
);
|
|
35036
35037
|
return server;
|
|
35037
35038
|
}
|
|
35038
|
-
var SERVER_VERSION, id, version2, mode;
|
|
35039
|
+
var SERVER_VERSION, id, version2, INSTRUCTIONS, mode;
|
|
35039
35040
|
var init_server = __esm({
|
|
35040
35041
|
"src/server.ts"() {
|
|
35041
35042
|
"use strict";
|
|
@@ -35046,7 +35047,13 @@ var init_server = __esm({
|
|
|
35046
35047
|
init_package();
|
|
35047
35048
|
SERVER_VERSION = package_default.version;
|
|
35048
35049
|
id = external_exports.string().describe('Design system id, e.g. "margin-notes" (see list_design_systems)');
|
|
35049
|
-
version2 = external_exports.string().describe('
|
|
35050
|
+
version2 = external_exports.string().default("latest").describe('Leave out (or "latest") when adding a system to a project. If the project has design-system/VERSION (e.g. margin-notes@1.0.0), pass that exact version.');
|
|
35051
|
+
INSTRUCTIONS = [
|
|
35052
|
+
"Pigment serves versioned design systems. Published versions never change.",
|
|
35053
|
+
"Before UI work, check the project for design-system/VERSION. If it exists, use exactly that id and version in every call.",
|
|
35054
|
+
"If it does not, the user is adding a system: omit the version (latest), then record the exact id@version that get_design_system reports in design-system/VERSION.",
|
|
35055
|
+
"Only change the recorded version when the user asks to upgrade."
|
|
35056
|
+
].join("\n");
|
|
35050
35057
|
mode = external_exports.enum(["new", "existing", "ongoing"]);
|
|
35051
35058
|
}
|
|
35052
35059
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pigment-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "MCP server for Pigment design systems: tokens, rules, component specs and installation guides for your coding agent.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
"cli.js",
|
|
11
11
|
"content",
|
|
12
|
-
"README.md"
|
|
12
|
+
"README.md",
|
|
13
|
+
"LICENSE"
|
|
13
14
|
],
|
|
14
15
|
"engines": {
|
|
15
16
|
"node": ">=22"
|
|
@@ -21,6 +22,10 @@
|
|
|
21
22
|
"design-tokens",
|
|
22
23
|
"ai-agent"
|
|
23
24
|
],
|
|
25
|
+
"license": "MIT",
|
|
26
|
+
"author": "mirunamu00 (https://github.com/mirunamu00)",
|
|
27
|
+
"homepage": "https://pigmentui.com",
|
|
28
|
+
"bugs": "https://github.com/mirunamu00/pigment/issues",
|
|
24
29
|
"repository": {
|
|
25
30
|
"type": "git",
|
|
26
31
|
"url": "git+https://github.com/mirunamu00/pigment.git",
|