@sub-design/mcp
v0.1.1
Published
A local MCP server for `@sub-design/ui` and `@sub-design/tokens` — four tools, no hosting, no auth. Answers come from whatever version of those packages is actually installed in the project the server is invoked from, not a snapshot bundled into this pack
Readme
@sub-design/mcp
A local MCP server for @sub-design/ui and @sub-design/tokens — four
tools, no hosting, no auth. Answers come from whatever version of those
packages is actually installed in the project the server is invoked from,
not a snapshot bundled into this package.
Why local, not hosted
The obvious alternative — one hosted server answering for "the current
version" — has no good answer to "current according to which consumer."
NOKL and Enterprise pin @sub-design/ui independently and are rarely on
the same version at the same time; a hosted snapshot would be right for one
and stale for the other, silently. Reading from node_modules at the
caller's cwd sidesteps the question rather than solving it: there is no
shared "current," so nothing tries to be one.
Installing
Add to a project's MCP client config (e.g. .mcp.json):
{
"mcpServers": {
"sub-design": {
"command": "npx",
"args": ["-y", "@sub-design/mcp"]
}
}
}Requires @sub-design/ui and/or @sub-design/tokens to be installed in
the project the client runs from — the server reads their metadata.json /
dtcg/*.json via normal Node module resolution starting at process.cwd().
Tools
list_components— every component's name, source file, and variant prop names. Cheap; call this before searching or fetching one.get_component(name)— full detail for one component: props, variants' actual options, the tokens its family depends on, sibling parts (e.g.CardHeader/CardContentforCard), and the promotion rationale.search_components(query)— find components by name, variant value, token, or rationale text.search_tokens(query)— find design tokens by name or description in the DTCG export. Values shown for theme-layer tokens are GoodSync light specifically; check the actual theme file for anything brand-sensitive.
What this deliberately doesn't do
No component-usage validation, no code generation, no Figma sync. Those are real capabilities other design-system MCP servers have, and real future work here too — this is the lookup layer they'd be built on, not a replacement for building them.
