@atomixstudio/mcp 1.0.20 → 1.0.21
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/dist/index.js +12 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1810,8 +1810,8 @@ function hasValidAuthConfig() {
|
|
|
1810
1810
|
}
|
|
1811
1811
|
var AUTH_REQUIRED_MESSAGE = "Atomix MCP requires authentication. Add both --ds-id and --atomix-token to your MCP config (Settings \u2192 MCP), then restart Cursor. Get your token from Atomix Studio: Export modal or Settings \u2192 Regenerate Atomix access token.";
|
|
1812
1812
|
var lastChangeSummary = null;
|
|
1813
|
-
var
|
|
1814
|
-
|
|
1813
|
+
var FIGMA_SYNC_TOOL_NAME = "syncToFigma";
|
|
1814
|
+
var FIGMA_DESIGN_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
1815
1815
|
"getFigmaVariablesAndStyles",
|
|
1816
1816
|
"createDesignPlaceholder",
|
|
1817
1817
|
"resolveFigmaIdsForTokens",
|
|
@@ -1824,6 +1824,7 @@ var FIGMA_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
|
1824
1824
|
"getDesignScreenshot",
|
|
1825
1825
|
"finalizeDesignFrame"
|
|
1826
1826
|
]);
|
|
1827
|
+
var FIGMA_TOOL_NAMES = /* @__PURE__ */ new Set([FIGMA_SYNC_TOOL_NAME, ...FIGMA_DESIGN_TOOL_NAMES]);
|
|
1827
1828
|
var lastSyncAffectedTokens = null;
|
|
1828
1829
|
function getLastChangeSummary() {
|
|
1829
1830
|
return lastChangeSummary;
|
|
@@ -1860,7 +1861,7 @@ var TOKEN_CATEGORIES = ["colors", "typography", "spacing", "sizing", "shadows",
|
|
|
1860
1861
|
var server = new Server(
|
|
1861
1862
|
{
|
|
1862
1863
|
name: "atomix-mcp-user",
|
|
1863
|
-
version: "1.0.
|
|
1864
|
+
version: "1.0.21"
|
|
1864
1865
|
},
|
|
1865
1866
|
{
|
|
1866
1867
|
capabilities: {
|
|
@@ -1883,7 +1884,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
1883
1884
|
console.error("[Atomix MCP] Resolved tier = pro. Figma sync/design tools are available.");
|
|
1884
1885
|
} else if (cachedMcpTier === "free") {
|
|
1885
1886
|
console.error(
|
|
1886
|
-
"[Atomix MCP] Resolved tier = free. Figma
|
|
1887
|
+
"[Atomix MCP] Resolved tier = free. Figma design tools and --design-in-figma are hidden. syncToFigma and /--sync-to-figma are available. Pro design tools appear when the DS owner has Pro and the pro_figma_export flag is enabled."
|
|
1887
1888
|
);
|
|
1888
1889
|
}
|
|
1889
1890
|
} catch (err) {
|
|
@@ -2212,7 +2213,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
2212
2213
|
}
|
|
2213
2214
|
}
|
|
2214
2215
|
];
|
|
2215
|
-
const tools = cachedMcpTier === "pro" ? toolsList : toolsList.filter((t) => !
|
|
2216
|
+
const tools = cachedMcpTier === "pro" ? toolsList : toolsList.filter((t) => !FIGMA_DESIGN_TOOL_NAMES.has(t.name));
|
|
2216
2217
|
return { tools };
|
|
2217
2218
|
});
|
|
2218
2219
|
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
@@ -2229,12 +2230,12 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
2229
2230
|
try {
|
|
2230
2231
|
const shouldForceRefresh = name === "syncAll";
|
|
2231
2232
|
const data = await fetchDesignSystemForMCP(shouldForceRefresh);
|
|
2232
|
-
if (
|
|
2233
|
+
if (FIGMA_DESIGN_TOOL_NAMES.has(name) && cachedMcpTier !== "pro") {
|
|
2233
2234
|
return {
|
|
2234
2235
|
content: [
|
|
2235
2236
|
{
|
|
2236
2237
|
type: "text",
|
|
2237
|
-
text: "This design system does not have Pro Figma access. Figma
|
|
2238
|
+
text: "This design system does not have Pro Figma access. Figma design tools (design-in-Figma, createDesignPlaceholder, resolveFigmaIdsForTokens, etc.) are available when the design system owner has a Pro subscription. Sync to Figma (syncToFigma) is available on all tiers."
|
|
2238
2239
|
}
|
|
2239
2240
|
],
|
|
2240
2241
|
isError: true
|
|
@@ -3495,7 +3496,7 @@ Get your DS ID and token from the Export modal or Settings \u2192 Regenerate Ato
|
|
|
3495
3496
|
}
|
|
3496
3497
|
throw new Error(`Unknown resource: ${uri}`);
|
|
3497
3498
|
});
|
|
3498
|
-
var
|
|
3499
|
+
var FIGMA_DESIGN_PROMPT_NAMES = /* @__PURE__ */ new Set(["--design-in-figma"]);
|
|
3499
3500
|
server.setRequestHandler(ListPromptsRequestSchema, async () => {
|
|
3500
3501
|
if (!hasValidAuthConfig()) {
|
|
3501
3502
|
authFailedNoTools = true;
|
|
@@ -3520,7 +3521,7 @@ server.setRequestHandler(ListPromptsRequestSchema, async () => {
|
|
|
3520
3521
|
{ name: "--sync-to-figma", description: "Push this design system to Figma (variables, color + typography styles). Uses local bridge + plugin; no Figma token." },
|
|
3521
3522
|
{ name: "--design-in-figma", description: "Design UI in Figma: 3 passes (wireframe \u2192 tokens/rules \u2192 audit), getDesignScreenshot after each pass, then finalizeDesignFrame (rename + \u2705, remove placeholder) and summarise." }
|
|
3522
3523
|
];
|
|
3523
|
-
const prompts = cachedMcpTier === "pro" ? allPrompts : allPrompts.filter((p) => !
|
|
3524
|
+
const prompts = cachedMcpTier === "pro" ? allPrompts : allPrompts.filter((p) => !FIGMA_DESIGN_PROMPT_NAMES.has(p.name));
|
|
3524
3525
|
return { prompts };
|
|
3525
3526
|
});
|
|
3526
3527
|
server.setRequestHandler(GetPromptRequestSchema, async (request) => {
|
|
@@ -3622,7 +3623,7 @@ Both are required. Configure the MCP server in your Cursor settings, then restar
|
|
|
3622
3623
|
}
|
|
3623
3624
|
throw error;
|
|
3624
3625
|
}
|
|
3625
|
-
if (
|
|
3626
|
+
if (FIGMA_DESIGN_PROMPT_NAMES.has(name) && cachedMcpTier !== "pro") {
|
|
3626
3627
|
return {
|
|
3627
3628
|
description: "Pro Figma required",
|
|
3628
3629
|
messages: [
|
|
@@ -3630,7 +3631,7 @@ Both are required. Configure the MCP server in your Cursor settings, then restar
|
|
|
3630
3631
|
role: "user",
|
|
3631
3632
|
content: {
|
|
3632
3633
|
type: "text",
|
|
3633
|
-
text: "This design system does not have Pro Figma access.
|
|
3634
|
+
text: "This design system does not have Pro Figma access. The design-in-Figma prompt is available when the design system owner has a Pro subscription. Sync to Figma (/--sync-to-figma) is available on all tiers."
|
|
3634
3635
|
}
|
|
3635
3636
|
}
|
|
3636
3637
|
]
|