pigment-mcp 0.2.1 → 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.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/cli.js +13 -6
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -33,7 +33,7 @@ Prefer nothing to install? The same server runs remotely: `claude mcp add --tran
33
33
 
34
34
  Start a new session and just ask:
35
35
 
36
- > Apply the Pigment design system margin-notes@1.0.0 to this project.
36
+ > Apply the Pigment design system margin-notes to this project.
37
37
 
38
38
  Or run the `apply` prompt (Claude Code: `/mcp__pigment__apply`), which adds the working agreement: audit first,
39
39
  propose a plan, restyle one sample screen, then report build and visual checks.
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.2.1",
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}. Where this document says tokens.css or tokens.json, call get_tokens and copy the file verbatim.`,
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 pinned version: 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
+ 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('Exact version such as "1.0.0". Pin the version a project installed; "latest" only when starting fresh.');
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.2.1",
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": {