1. Conduid
  2. AI
  3. Refract
MCP server · AI

Refract

One YAML spec → typed Python SDK, CLI, MCP server & tests — generated code byte-identical to hand-written ✨

59Fair

Scored 20 hours ago · breakdown

About Refract

Refract is an MCP server published by theme-registry in the AI category: one YAML spec → typed Python SDK, CLI, MCP server & tests — generated code byte-identical to hand-written ✨. Conduid read 11 tools from its source: checkContrast, diffTheme, findToken, getClass, listRecipes, listTokens and 5 more. It is published to npm as @theme-registry/refract-mcp and starts with npx.

Conduid has no tagged release on record for it. Its topics include cli, code-generation, codegen, fastmcp, openapi and pydantic.

Install

Claude Code
claude mcp add refract -- npx -y @theme-registry/refract-mcp
npx
npx -y @theme-registry/refract-mcp
From source
git clone https://github.com/theme-registry/refract

Tools (11)

checkContrastWCAG-2 contrast audit of the loaded theme's colour pairings (+ advisory APCA). Optional minWcag pass bar (AA|AAA|AA-large).
diffThemeDiff a candidate raw theme against the loaded one — which tokens moved, which classes changed, which contrast pairings crossed a threshold, and whether every target still builds. Plan-then-apply: see the blast radius before you write.
findTokenList token paths that start with a prefix (discover names).
getClassGet the real class + composed class-list for a recipe (from the project's class-emitting adapter, e.g. CSS — carries its configured prefix).
listRecipesList every recipe as { subsystem, group, variant }.
listTokensList every token path in the loaded theme.
reloadReload the project's theme config from disk.
renderRecipeThe exact CSS one recipe emits (base + its state/breakpoint rules), from the project's class-emitting adapter.
resolveTokenResolve a token path (e.g. colors.brand.dark) to its value + its emitted CSS variable name (varName), unit, and derivedFrom (what it derives from) in the loaded theme.
searchTokensFind token paths matching a query on the path OR the resolved value (fuzzy, case-insensitive).
validateThemeValidate a candidate raw theme (or the loaded theme) against every configured target adapter — returns ALL problems per target at once.

Security checks

From the theme-registry/refract monorepo, not this package alone.

6 checks have not been run yet.

Questions

About Refract

How do I install Refract?

In Claude Code, run claude mcp add refract -- npx -y @theme-registry/refract-mcp. Other MCP clients take the command after "--" in their server configuration.

Is Refract safe to use with an AI agent?

Its trust score is 59 out of 100 (fair). Conduid hasn't run static security checks on this repository yet, so review the source yourself before granting it credentials. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Refract still maintained?

Yes — the last commit in the theme-registry/refract monorepo was 2 days ago. The theme-registry/refract monorepo has 0 stars and 0 forks.

What tools does Refract provide?

Conduid read 11 tools from the source: checkContrast, diffTheme, findToken, getClass, listRecipes, listTokens, reload, renderRecipe and 3 more.