@efolusi/meridian-mcp 0.1.4 → 0.1.5

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/package.json +2 -2
  3. package/server.mjs +12 -2
package/README.md CHANGED
@@ -60,4 +60,4 @@ MERIDIAN_SOURCE=.. node server.mjs # read the local registry
60
60
  node smoke.mjs # quick end-to-end check of every tool
61
61
  ```
62
62
 
63
- MIT licensed.
63
+ Apache-2.0 licensed.
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@efolusi/meridian-mcp",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "MCP server exposing the Meridian design system registry (components, source, types, usage guides, tokens) to AI coding agents.",
5
- "license": "MIT",
5
+ "license": "Apache-2.0",
6
6
  "homepage": "https://meridian.efolusi.com",
7
7
  "repository": {
8
8
  "type": "git",
package/server.mjs CHANGED
@@ -80,8 +80,18 @@ server.registerTool(
80
80
  return { content: [{ type: 'text', text: `No component named "${name}". Call list_components to see valid names.` }], isError: true };
81
81
  }
82
82
  const dep = (c.registryDependencies || []).length ? `\nMeridian dependencies (copy these too if vendoring): ${c.registryDependencies.join(', ')}` : '';
83
+ // `target` is where the file goes in a project; `path` is only where the
84
+ // registry keeps it (the inline Icon lives in registry/icons/ but is copied
85
+ // to components/icons/). A generated data file such as the 48 kB glyph map
86
+ // would only flood the agent's context, so it is named, not printed.
83
87
  const files = (c.files || [])
84
- .map((f) => `\n\n### ${f.path} (${f.type})\n\`\`\`\n${f.content}\n\`\`\``)
88
+ .map((f) => {
89
+ const where = f.target || f.path;
90
+ const body = /^\/\/ Generated by /.test(f.content || '')
91
+ ? `(generated data file, ${Math.round((f.content || '').length / 1024)} kB, not shown: copy it with \`npx @efolusi/meridian-cli add ${c.name}\` or from ${SOURCE}/site/registry/${c.name}.json)`
92
+ : `\`\`\`\n${f.content}\n\`\`\``;
93
+ return `\n\n### ${where} (${f.type})\n${body}`;
94
+ })
85
95
  .join('');
86
96
  return { content: [{ type: 'text', text: `# ${c.title || c.name}\n${c.description || ''}${dep}${files}` }] };
87
97
  }
@@ -108,7 +118,7 @@ server.registerTool(
108
118
  'get_tokens',
109
119
  {
110
120
  title: 'Get Meridian design tokens',
111
- description: 'The design tokens (colors, typography, spacing, effects) as DTCG JSON. Each $value is the light theme at default density; a token that changes elsewhere also carries $extensions["com.efolusi.meridian"].modes with its dark, compact and coarse (touch pointer) values. References between tokens are DTCG aliases, {group.leaf}: the CSS custom property is --group-leaf (e.g. {surface.page} is --surface-page). In generated CSS use the custom property so the theme, density and pointer modes all apply; never hardcode hex.',
121
+ description: 'The design tokens (colors, typography, spacing, effects) as DTCG JSON. Each $value is the light theme at default density; a token that changes elsewhere also carries $extensions["com.efolusi.meridian"].modes with its dark, compact, coarse (touch pointer), increased and increased-dark (prefers-contrast: more) values. References between tokens are DTCG aliases, {group.leaf}: the CSS custom property is --group-leaf (e.g. {surface.page} is --surface-page). In generated CSS use the custom property so the theme, density and pointer modes all apply; never hardcode hex.',
112
122
  inputSchema: { group: z.string().optional().describe('Optional top-level group, e.g. "brand", "surface", "text", "space", "radius", "font". An unknown group returns the list of groups.') },
113
123
  },
114
124
  async ({ group }) => {