自社デザインシステムMCPの構築
const server = new McpServer({ name: "ubie-ui-mcp" });
server.tool("get_components", "Get components for ubie-ui", async () => {
const componentContents =
globSync(`${ubieUiDir}/src/components/**/*.tsx`)
.filter((path) => !path.includes("stories"))
.map((path) => {
const content = readFileSync(path, "utf-8");
return { type: "text", text: content };
});
return { content: componentContents };
});