@fragments-sdk/mcp 0.10.1 → 1.0.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 CHANGED
@@ -2,113 +2,63 @@
2
2
 
3
3
  > **Source-available.** This package is distributed publicly on npm under FSL-1.1-MIT; source stays private. Contribute by filing an issue at https://github.com/fragments-sdk/fragments/issues.
4
4
 
5
- Standalone MCP server for Fragments. It helps AI coding assistants validate generated UI against your design system: check candidate specs, repair safe governance failures, suggest design tokens before hardcoded CSS is written, and triage real Fragments Cloud findings.
5
+ Hosted MCP toolkit for Fragments Cloud. The package name stays
6
+ `@fragments-sdk/mcp`, but the local stdio server has been removed. Fragments MCP
7
+ now runs at:
6
8
 
7
- The public MCP surface is intentionally small: `govern`, `validate_and_fix`, `tokens.suggest`, `findings_list`, `findings_summary`, `findings_for_file`, and `swap_to_canonical`.
8
-
9
- ## Setup
10
-
11
- The recommended setup writes both MCP config and IDE rules that teach agents the validator loop:
12
-
13
- ```bash
14
- npx @fragments-sdk/mcp@latest init
9
+ ```text
10
+ https://app.usefragments.com/api/mcp
15
11
  ```
16
12
 
17
- You can also add a **project-level** MCP config to your workspace root manually. This ensures the server runs from your project directory and auto-discovers `fragments.json` via `node_modules`.
18
-
19
- ### Cursor
20
-
21
- Create `.cursor/mcp.json` in your project root:
13
+ Interactive clients authenticate through MCP OAuth discovery:
22
14
 
23
- ```json
24
- {
25
- "mcpServers": {
26
- "fragments": {
27
- "command": "npx",
28
- "args": ["-y", "@fragments-sdk/mcp"]
29
- }
30
- }
31
- }
15
+ ```text
16
+ /.well-known/oauth-protected-resource/api/mcp
17
+ /.well-known/oauth-authorization-server
18
+ /api/oauth/register
19
+ /api/oauth/authorize
20
+ /api/oauth/token
32
21
  ```
33
22
 
34
- ### VS Code
35
-
36
- Create `.vscode/mcp.json` in your project root:
23
+ Headless CI clients can still authenticate with:
37
24
 
38
- ```json
39
- {
40
- "servers": {
41
- "fragments": {
42
- "type": "stdio",
43
- "command": "npx",
44
- "args": ["-y", "@fragments-sdk/mcp"]
45
- }
46
- }
47
- }
25
+ ```text
26
+ Authorization: Bearer <FRAGMENTS_API_KEY>
48
27
  ```
49
28
 
50
- ### Claude Code
51
-
52
- ```bash
53
- claude mcp add fragments -- npx -y @fragments-sdk/mcp
54
- ```
29
+ The npm package contains the protocol dispatcher, primitive tool registry, test
30
+ fixtures, and a small `fragments-mcp` binary that prints the hosted setup
31
+ instructions.
55
32
 
56
- ### Windsurf
33
+ ## MCP Config
57
34
 
58
- Create `.windsurf/mcp.json` in your project root:
35
+ Use this shape for clients that support remote HTTP MCP servers:
59
36
 
60
37
  ```json
61
38
  {
62
39
  "mcpServers": {
63
40
  "fragments": {
64
- "command": "npx",
65
- "args": ["-y", "@fragments-sdk/mcp"]
41
+ "type": "http",
42
+ "url": "https://app.usefragments.com/api/mcp",
43
+ "headers": {
44
+ "Authorization": "Bearer ${FRAGMENTS_API_KEY}"
45
+ }
66
46
  }
67
47
  }
68
48
  }
69
49
  ```
70
50
 
71
- ### How discovery works
72
-
73
- The server auto-discovers `fragments.json` through two layers:
74
-
75
- 1. **MCP roots** — In IDEs that support the MCP `roots/list` capability (VS Code, Claude Code), the server automatically detects your workspace root. This means global MCP configs just work.
76
- 2. **cwd fallback** — For IDEs that don't yet support `roots/list` (Cursor), the server uses `process.cwd()`. Project-level configs ensure cwd = your workspace root.
77
-
78
- Once the project root is known, the server walks up from it, scans `package.json` dependencies for packages with a `"fragments"` field, and resolves through `node_modules` (supporting pnpm, Yarn, and npm).
79
-
80
- ## Validator Loop
81
-
82
- Ask your AI assistant to follow this loop whenever it generates or edits JSX, class names, style props, or CSS:
83
-
84
- 1. Draft the UI spec or code change.
85
- 2. Call `govern({ spec })`.
86
- 3. If the result asks for revision, call `validate_and_fix({ spec, applyFixes: true })`.
87
- 4. Apply deterministic repairs and run `govern` again.
88
- 5. Before writing hardcoded CSS values, call `tokens.suggest({ property, value })` and use the returned `cssValue` when present.
89
-
90
51
  ## Tools
91
52
 
92
- | Tool | Description |
93
- |------|-------------|
94
- | `govern` | Validate an AI-generated UI spec and return violations/fix guidance |
95
- | `validate_and_fix` | Deterministically repair safe governance failures and return a fixed spec |
96
- | `tokens.suggest` | Suggest the right design token for a CSS property and optional raw value |
97
- | `findings_list` | List Cloud governance findings for agent planning |
98
- | `findings_summary` | Summarize Cloud findings by severity, category, rule, and file |
99
- | `findings_for_file` | Retrieve open Cloud findings for the file an agent is editing |
100
- | `swap_to_canonical` | Suggest swaps from raw HTML (`<button>`, `<input>`, `<dialog>`, …) to the project's canonical components when a mapping is at confidence `auto` or `overridden` |
101
-
102
- ## How Token Suggestions Work
53
+ | Tool | Purpose |
54
+ | ------------------------------- | -------------------------------------------------------------------- |
55
+ | `design_system/list_primitives` | List reviewed Cloud primitives with source file paths |
56
+ | `design_system/conform` | Return deterministic design-system rewrites for a code snippet |
57
+ | `design_system/prove_compliant` | Run a validate/fix/revalidate proof loop, with MCP Sampling fallback |
103
58
 
104
- Validator tools run locally against your `fragments.json` or against a Cloud catalog when configured. Token suggestions use property-family-aware matching so color properties receive color tokens, spacing properties receive spacing tokens, and unsupported properties return an honest `noSuggestion` result.
105
-
106
- ## Options
107
-
108
- ```
109
- -p, --project-root <path> Project root (default: cwd)
110
- --cloud-api-key <key> Cloud API key for org-scoped catalog and findings
111
- --generate-rules Generate IDE rules files and exit
112
- ```
59
+ `design_system/list_primitives` intentionally takes no arguments. Fragments
60
+ Cloud owns primitive selection; MCP serves the curated result. `conform` and
61
+ `prove_compliant` operate on supplied code only and do not write to the caller's
62
+ filesystem or repository.
113
63
 
114
64
  <img referrerpolicy="no-referrer-when-downgrade" src="https://static.scarf.sh/a.png?x-pxid=a02beb71-df11-498d-8e1f-39de2e64ce5b" />
package/dist/bin.d.ts ADDED
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node
package/dist/bin.js CHANGED
@@ -1,161 +1,15 @@
1
1
  #!/usr/bin/env node
2
- import {
3
- loadConfigFile,
4
- resolveDataAdapter,
5
- resolveSearchApiKey,
6
- startMcpServer
7
- } from "./chunk-KGFM5SCE.js";
8
- import "./chunk-7D4SUZUM.js";
9
2
 
10
3
  // src/bin.ts
11
- var args = process.argv.slice(2);
12
- if (args[0] === "init") {
13
- const { runInit } = await import("./init.js");
14
- const initArgs = args.slice(1);
15
- let projectRoot2 = process.cwd();
16
- let clients;
17
- for (let i = 0; i < initArgs.length; i++) {
18
- const arg = initArgs[i];
19
- if (arg === "--project-root" || arg === "-p") {
20
- projectRoot2 = initArgs[++i] ?? projectRoot2;
21
- } else if (arg === "--client" || arg === "-c") {
22
- clients = (initArgs[++i] ?? "").split(",").map((s) => s.trim());
23
- } else if (arg === "--help" || arg === "-h") {
24
- console.log(`
25
- Usage: fragments-mcp init [options]
4
+ var endpoint = process.env.FRAGMENTS_MCP_URL ?? "https://app.usefragments.com/api/mcp";
5
+ console.log(`@fragments-sdk/mcp no longer starts a local stdio server.
26
6
 
27
- Write MCP server config for your AI editor(s).
28
- Auto-detects Claude Code, Cursor, VS Code, and Windsurf.
7
+ Fragments MCP is now a hosted streamable HTTP connector.
29
8
 
30
- Options:
31
- -p, --project-root <path> Project root directory (default: cwd)
32
- -c, --client <list> Comma-separated clients: claude,cursor,vscode,windsurf
33
- (default: auto-detect)
34
- -h, --help Show this help message
9
+ Use this endpoint in MCP clients that support remote servers:
10
+ ${endpoint}
35
11
 
36
- Examples:
37
- npx @fragments-sdk/mcp init
38
- npx @fragments-sdk/mcp init --client cursor,claude
12
+ For CI and headless contexts, authenticate HTTP requests with:
13
+ Authorization: Bearer <FRAGMENTS_API_KEY>
39
14
  `);
40
- process.exit(0);
41
- }
42
- }
43
- runInit({ projectRoot: projectRoot2, clients });
44
- process.exit(0);
45
- }
46
- var projectRoot = process.cwd();
47
- var cloudApiKey;
48
- var source = "auto";
49
- var generateRules = false;
50
- var rulesFormats;
51
- var force = false;
52
- for (let i = 0; i < args.length; i++) {
53
- const arg = args[i];
54
- if (arg === "--project-root" || arg === "-p") {
55
- projectRoot = args[++i] ?? projectRoot;
56
- } else if (arg === "--cloud-api-key") {
57
- cloudApiKey = args[++i];
58
- } else if (arg === "--source") {
59
- const next = args[++i];
60
- if (next === "auto" || next === "fragments-json" || next === "cloud" || next === "bundle" || next === "extract") {
61
- source = next;
62
- } else {
63
- console.error(
64
- `Invalid source: "${next}". Valid values: auto, fragments-json, cloud, bundle, extract`
65
- );
66
- process.exit(1);
67
- }
68
- } else if (arg === "--generate-rules") {
69
- generateRules = true;
70
- } else if (arg === "--formats") {
71
- rulesFormats = args[++i];
72
- } else if (arg === "--force") {
73
- force = true;
74
- } else if (arg === "--help" || arg === "-h") {
75
- console.log(`
76
- Usage: fragments-mcp [command] [options]
77
-
78
- Standalone MCP server for design system intelligence.
79
- Provides UI validation, deterministic repair, token suggestions, and Cloud findings.
80
-
81
- Commands:
82
- init Write MCP config for your AI editor(s)
83
-
84
- Options:
85
- -p, --project-root <path> Project root directory (default: cwd)
86
- --cloud-api-key <key> Cloud API key for org-scoped catalog access
87
- --source <mode> Source override: auto, fragments-json, cloud, bundle, extract
88
- --generate-rules Generate IDE rules files and exit
89
- --formats <list> Comma-separated formats: cursor,claude,copilot (default: all)
90
- --force Overwrite existing rules files
91
- -h, --help Show this help message
92
-
93
- Quick start:
94
- npx @fragments-sdk/mcp init
95
- `);
96
- process.exit(0);
97
- }
98
- }
99
- var fileConfig = loadConfigFile(projectRoot) ?? void 0;
100
- var serverConfig = {
101
- projectRoot,
102
- searchApiKey: resolveSearchApiKey({ projectRoot }, fileConfig),
103
- cloudApiKey,
104
- source,
105
- fileConfig
106
- };
107
- var { adapter, mode } = resolveDataAdapter(serverConfig, fileConfig);
108
- if (mode === "extract") {
109
- console.error(
110
- "[fragments-mcp] No fragments.json found \u2014 auto-extracting from source."
111
- );
112
- }
113
- if (generateRules) {
114
- (async () => {
115
- const { generateRulesFiles } = await import("./rules-JUZ3RABB.js");
116
- const defaultFormats = ["cursor", "claude", "copilot"];
117
- const formats = rulesFormats ? rulesFormats.split(",").map((f) => f.trim()) : defaultFormats;
118
- const validFormats = /* @__PURE__ */ new Set(["cursor", "claude", "copilot"]);
119
- for (const fmt of formats) {
120
- if (!validFormats.has(fmt)) {
121
- console.error(`Invalid format: "${fmt}". Valid formats: cursor, claude, copilot`);
122
- process.exit(1);
123
- }
124
- }
125
- const data = await adapter.load(projectRoot);
126
- const { BRAND } = await import("@fragments-sdk/core");
127
- const brandName = fileConfig?.brand?.name ?? BRAND.name;
128
- const files = generateRulesFiles({
129
- data,
130
- brandName,
131
- outputDir: projectRoot,
132
- formats,
133
- force
134
- });
135
- if (files.length === 0) {
136
- console.log("No rules files generated.");
137
- } else {
138
- console.log(`Generated ${files.length} rules file(s):`);
139
- for (const file of files) {
140
- console.log(` ${file}`);
141
- }
142
- }
143
- process.exit(0);
144
- })().catch((error) => {
145
- console.error("Failed to generate rules:", error instanceof Error ? error.message : error);
146
- process.exit(1);
147
- });
148
- } else {
149
- startMcpServer({
150
- projectRoot,
151
- searchApiKey: resolveSearchApiKey({ projectRoot }, fileConfig),
152
- cloudApiKey,
153
- source,
154
- fileConfig,
155
- adapter
156
- }).catch((error) => {
157
- console.error("Failed to start MCP server:", error);
158
- process.exit(1);
159
- });
160
- }
161
15
  //# sourceMappingURL=bin.js.map
package/dist/bin.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/bin.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { startMcpServer } from './server.js';\nimport { loadConfigFile } from './config.js';\nimport { resolveDataAdapter, resolveSearchApiKey } from './source-selection.js';\n\n// Parse command line arguments\nconst args = process.argv.slice(2);\n\n// ---------------------------------------------------------------------------\n// Subcommand: init\n// ---------------------------------------------------------------------------\nif (args[0] === 'init') {\n const { runInit } = await import('./init.js');\n const initArgs = args.slice(1);\n\n let projectRoot = process.cwd();\n let clients: string[] | undefined;\n\n for (let i = 0; i < initArgs.length; i++) {\n const arg = initArgs[i];\n if (arg === '--project-root' || arg === '-p') {\n projectRoot = initArgs[++i] ?? projectRoot;\n } else if (arg === '--client' || arg === '-c') {\n clients = (initArgs[++i] ?? '').split(',').map((s) => s.trim());\n } else if (arg === '--help' || arg === '-h') {\n console.log(`\nUsage: fragments-mcp init [options]\n\nWrite MCP server config for your AI editor(s).\nAuto-detects Claude Code, Cursor, VS Code, and Windsurf.\n\nOptions:\n -p, --project-root <path> Project root directory (default: cwd)\n -c, --client <list> Comma-separated clients: claude,cursor,vscode,windsurf\n (default: auto-detect)\n -h, --help Show this help message\n\nExamples:\n npx @fragments-sdk/mcp init\n npx @fragments-sdk/mcp init --client cursor,claude\n`);\n process.exit(0);\n }\n }\n\n runInit({ projectRoot, clients: clients as import('./init.js').Client[] });\n process.exit(0);\n}\n\n// ---------------------------------------------------------------------------\n// Main: MCP server mode\n// ---------------------------------------------------------------------------\nlet projectRoot = process.cwd();\nlet cloudApiKey: string | undefined;\nlet source: 'auto' | 'fragments-json' | 'cloud' | 'bundle' | 'extract' =\n 'auto';\nlet generateRules = false;\nlet rulesFormats: string | undefined;\nlet force = false;\n\nfor (let i = 0; i < args.length; i++) {\n const arg = args[i];\n\n if (arg === '--project-root' || arg === '-p') {\n projectRoot = args[++i] ?? projectRoot;\n } else if (arg === '--cloud-api-key') {\n cloudApiKey = args[++i];\n } else if (arg === '--source') {\n const next = args[++i];\n if (\n next === 'auto' ||\n next === 'fragments-json' ||\n next === 'cloud' ||\n next === 'bundle' ||\n next === 'extract'\n ) {\n source = next;\n } else {\n console.error(\n `Invalid source: \"${next}\". Valid values: auto, fragments-json, cloud, bundle, extract`,\n );\n process.exit(1);\n }\n } else if (arg === '--generate-rules') {\n generateRules = true;\n } else if (arg === '--formats') {\n rulesFormats = args[++i];\n } else if (arg === '--force') {\n force = true;\n } else if (arg === '--help' || arg === '-h') {\n console.log(`\nUsage: fragments-mcp [command] [options]\n\nStandalone MCP server for design system intelligence.\nProvides UI validation, deterministic repair, token suggestions, and Cloud findings.\n\nCommands:\n init Write MCP config for your AI editor(s)\n\nOptions:\n -p, --project-root <path> Project root directory (default: cwd)\n --cloud-api-key <key> Cloud API key for org-scoped catalog access\n --source <mode> Source override: auto, fragments-json, cloud, bundle, extract\n --generate-rules Generate IDE rules files and exit\n --formats <list> Comma-separated formats: cursor,claude,copilot (default: all)\n --force Overwrite existing rules files\n -h, --help Show this help message\n\nQuick start:\n npx @fragments-sdk/mcp init\n`);\n process.exit(0);\n }\n}\n\nconst fileConfig = loadConfigFile(projectRoot) ?? undefined;\nconst serverConfig = {\n projectRoot,\n searchApiKey: resolveSearchApiKey({ projectRoot }, fileConfig),\n cloudApiKey,\n source,\n fileConfig,\n};\nconst { adapter, mode } = resolveDataAdapter(serverConfig, fileConfig);\n\nif (mode === 'extract') {\n console.error(\n '[fragments-mcp] No fragments.json found — auto-extracting from source.',\n );\n}\n\n// --generate-rules: generate IDE rules and exit\nif (generateRules) {\n (async () => {\n const { generateRulesFiles } = await import('./rules.js');\n type RulesFormat = 'cursor' | 'claude' | 'copilot';\n\n const defaultFormats: RulesFormat[] = ['cursor', 'claude', 'copilot'];\n const formats: RulesFormat[] = rulesFormats\n ? (rulesFormats.split(',').map(f => f.trim()) as RulesFormat[])\n : defaultFormats;\n\n // Validate formats\n const validFormats = new Set(['cursor', 'claude', 'copilot']);\n for (const fmt of formats) {\n if (!validFormats.has(fmt)) {\n console.error(`Invalid format: \"${fmt}\". Valid formats: cursor, claude, copilot`);\n process.exit(1);\n }\n }\n\n // Load data using the same adapter\n const data = await adapter.load(projectRoot);\n\n // Resolve brand name from config\n const { BRAND } = await import('@fragments-sdk/core');\n const brandName = fileConfig?.brand?.name ?? BRAND.name;\n\n // Generate rules\n const files = generateRulesFiles({\n data,\n brandName,\n outputDir: projectRoot,\n formats,\n force,\n });\n\n if (files.length === 0) {\n console.log('No rules files generated.');\n } else {\n console.log(`Generated ${files.length} rules file(s):`);\n for (const file of files) {\n console.log(` ${file}`);\n }\n }\n\n process.exit(0);\n })().catch((error) => {\n console.error('Failed to generate rules:', error instanceof Error ? error.message : error);\n process.exit(1);\n });\n} else {\n // Default: start MCP server\n startMcpServer({\n projectRoot,\n searchApiKey: resolveSearchApiKey({ projectRoot }, fileConfig),\n cloudApiKey,\n source,\n fileConfig,\n adapter,\n }).catch((error) => {\n console.error('Failed to start MCP server:', error);\n process.exit(1);\n });\n}\n"],"mappings":";;;;;;;;;;AAMA,IAAM,OAAO,QAAQ,KAAK,MAAM,CAAC;AAKjC,IAAI,KAAK,CAAC,MAAM,QAAQ;AACtB,QAAM,EAAE,QAAQ,IAAI,MAAM,OAAO,WAAW;AAC5C,QAAM,WAAW,KAAK,MAAM,CAAC;AAE7B,MAAIA,eAAc,QAAQ,IAAI;AAC9B,MAAI;AAEJ,WAAS,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK;AACxC,UAAM,MAAM,SAAS,CAAC;AACtB,QAAI,QAAQ,oBAAoB,QAAQ,MAAM;AAC5C,MAAAA,eAAc,SAAS,EAAE,CAAC,KAAKA;AAAA,IACjC,WAAW,QAAQ,cAAc,QAAQ,MAAM;AAC7C,iBAAW,SAAS,EAAE,CAAC,KAAK,IAAI,MAAM,GAAG,EAAE,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC;AAAA,IAChE,WAAW,QAAQ,YAAY,QAAQ,MAAM;AAC3C,cAAQ,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAejB;AACK,cAAQ,KAAK,CAAC;AAAA,IAChB;AAAA,EACF;AAEA,UAAQ,EAAE,aAAAA,cAAa,QAAiD,CAAC;AACzE,UAAQ,KAAK,CAAC;AAChB;AAKA,IAAI,cAAc,QAAQ,IAAI;AAC9B,IAAI;AACJ,IAAI,SACF;AACF,IAAI,gBAAgB;AACpB,IAAI;AACJ,IAAI,QAAQ;AAEZ,SAAS,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;AACpC,QAAM,MAAM,KAAK,CAAC;AAElB,M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GMENTS_MCP_URL ?? \"https://app.usefragments.com/api/mcp\";\n\nconsole.log(`@fragments-sdk/mcp no longer starts a local stdio server.\n\nFragments MCP is now a hosted streamable HTTP connector.\n\nUse this endpoint in MCP clients that support remote servers:\n ${endpoint}\n\nFor CI and headless contexts, authenticate HTTP requests with:\n Authorization: Bearer <FRAGMENTS_API_KEY>\n`);\n"],"mappings":";;;AAEA,IAAM,WAAW,QAAQ,IAAI,qBAAqB;AAElD,QAAQ,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA,IAKR,QAAQ;AAAA;AAAA;AAAA;AAAA,CAIX;","names":[]}