@basiiik/mcp

中文文档
0.8.0发布于 2026/10/28MITTypeScriptES Module近 30 天下载 2189

MCP server that gives AI agents the Basiiik design system: tokens, component specs, usage rules, icons and a token linter.

原始使用文档
文档目录4 节
  1. Tools
  2. Pro Agent Pack
  3. Extend it
  4. Connect it

@basiiik/mcp

An MCP server that gives AI agents the Basiiik design system: what components exist, when to use them, their exact React props, and the tokens.

It is read-only, runs locally over stdio, and needs no network or API key. All data ships in data/bundle.json, generated from components/specs and tokens/.

Tools

ToolUse it to
get_design_system_guideLoad the rules for generating UI (components first, tokens only, a11y, theming).
list_componentsList all 88 components, filtered by category or status.
search_componentsFind a component from a need ("show progress", "confirm delete").
get_componentFull spec: when to use / not, React props and allowed values, a11y, Figma variants, tokens.
get_component_snippetImport + JSX. Props are validated against the real API, so bad values return an error listing what is allowed.
search_icons / get_iconFind an icon from a need ("delete", "go back") and get its SVG, React usage and when to use it. Appears when the bundle includes icons.
list_tokens / get_tokenLook up CSS variables with Light and Dark values.

The lookup tools (get_component, get_component_snippet, get_icon, get_token) take one identifier. Agents often guess its name, so slug, name and id work as aliases, and a missing identifier returns a message saying what to pass and which search tool to call.

Resources: basiiik://guide, basiiik://components/{slug}.

Pro Agent Pack

The token linter (lint_source) and guided workflows (build-ui, review-ui, migrate-to-tokens) are in the commercial @basiiik/mcp-pro, which includes everything in this server. It is available to licensed customers.

Extend it

createServer(bundle, extensions) takes functions that register extra tools, resources or prompts:

import { createServer, loadBundle, json, readOnly, type ServerExtension } from '@basiiik/mcp';

const internalRules: ServerExtension = ({ server }) => {
  server.registerTool('our_rules', { description: 'Our team conventions', annotations: readOnly }, () => json({ rules: ['...'] }));
};
const server = createServer(loadBundle(), [internalRules]);

Connect it

Claude Code:

claude mcp add basiiik -- npx -y @basiiik/mcp

Any MCP client (Cursor, Claude Desktop, ...):

{ "mcpServers": { "basiiik": { "command": "npx", "args": ["-y", "@basiiik/mcp"] } } }

Set BASIIIK_BUNDLE=/path/to/bundle.json to serve a customised bundle, for example one built from your own tokens.

Licence: MIT.

版本与发布记录

@basiiik/mcp 共发布 13 个版本,首次发布于 2026/10/17;过去 12 个月发布了 13 个版本。

版本发布日期距今
0.8.0latest2026/10/2811 天前
0.7.02026/10/2712 天前
0.6.02026/10/2613 天前
0.5.02026/10/2513 天前
0.4.02026/10/2514 天前
0.3.02026/10/2217 天前

关于 @basiiik/mcp 的常见问题

@basiiik/mcp 是什么?

MCP server that gives AI agents the Basiiik design system: tokens, component specs, usage rules, icons and a token linter.

如何安装 @basiiik/mcp?

在项目目录运行 npm install @basiiik/mcp,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 basiiik-mcp,可以用 npx basiiik-mcp 直接运行。

@basiiik/mcp 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@basiiik/mcp 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@basiiik/mcp 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@basiiik/mcp 可以商用吗?

@basiiik/mcp 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@basiiik/mcp 的下载量有多少?

根据 npm 官方下载统计,@basiiik/mcp 在 2026/10/08 – 2026/11/06 这 30 天内被下载 2,189 次,日均约 73 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@basiiik/mcp 还在维护吗?

最新版本 0.8.0 发布于 2026/10/28(11 天前);至今共发布 13 个版本,其中过去 12 个月发布了 13 个;首次发布于 2026/10/17。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。