MCPInstall
Refy logo

Refy

by viniciuscoimbra 13 stars viniciuscoimbra/refy-design

Design system for agents: find components by need, check code against the real API, build themes.

READMEmain

refy

License CI Version Node Last commit Stars

Your design, your way. refy is a React and TypeScript design system for web and mobile, built for AI agents to use well. One theme file changes the whole interface; the components keep their behavior.

English · Português · Español

Quick links

When to use refy

  • You want a product interface with your own identity without forking a design system. A theme is one JSON file: colors, fonts, shape, spacing and motion.
  • An AI agent builds or changes your screens. refy ships a versioned catalog, a CLI and an MCP server, so the agent looks up the right component and checks its own code.
  • You ship on the web and in React Native with the same props and the same theme.
  • Your agent sends A2UI messages and you want them drawn with your design system.

Principles

  • Customization from the start. The look lives in tokens. Changing the theme file changes every component, with no CSS on the side.
  • Low cost of code and build. ESM, tree shaking and CSS per family. A screen with Button and Input does not carry charts.
  • Atomic design. Pages are compositions of atoms, molecules and organisms. New capability goes into a component, not into one product.
  • Agents first. Every family has its API, examples, when to use it and when to use another one, in a form that agents read.

Getting started

PathWhat you get
Install in a React project@refy-design/web with your theme
Start from a template projectA Vite app with a theme already exported
Use it from an agentThe MCP server or the refy-agent CLI
Run the catalog locallyStorybook with every family and the theme editor

Packages

PackageWhat it isVersion
@refy-design/webReact components, themes, agent catalog, CLI and MCP servernpm
@refy-design/mobileReact Native components with the same props and themenpm
@refy-design/a2uirefy as an A2UI 1.0 catalog, for web and React Nativenpm

Install

npm install @refy-design/web

Load the styles once and use the public exports:

import '@refy-design/web/tokens.css';
import '@refy-design/web/fonts.css'; // optional: local fonts shipped by refy
import { Button, Input, ThemeProvider } from '@refy-design/web';
import type { RefyTheme } from '@refy-design/web';
import themeData from './theme.json';

const theme: RefyTheme = themeData;

export function SignUp() {
  return (
    <ThemeProvider theme={theme} mode="system">
      <Input label="Full name" placeholder="Type your name" />
      <Button variant="primary" onClick={() => console.log('Save')}>
        Save
      </Button>
    </ThemeProvider>
  );
}

global.css is an optional reset for new projects and affects the whole app. fonts.css is optional if your product already loads its fonts. Themes and export.

Next.js App Router (Server Components): docs/NEXT_E_REACT_NATIVE.md. React Native: npx expo install @refy-design/mobile react-native-svg, with the same props and the same theme JSON as the web (guide).

A2UI: npm install @refy-design/a2ui draws an agent's A2UI 1.0 messages with refy components and theme, on the web or in React Native (@refy-design/a2ui/native) (guide).

Use with agents

The package ships a versioned catalog of components, APIs, examples and instructions. catalog takes the exact name or the need in English, Portuguese or Spanish:

npm exec --offline -- refy-agent catalog data table
npm exec --offline -- refy-agent component Input
npm exec --offline -- refy-agent check src/Screen.tsx src/screen.css

The same kit runs as an MCP server. In Claude Code:

claude mcp add refy -- npx --no-install refy-mcp

It has 8 tools: refy_search finds the family for a need written in English, Portuguese or Spanish; refy_component reads the API; refy_collections lists the collections; refy_validate checks code against the API and the check rules; refy_theme_generate and refy_theme_validate create and check a theme with AA contrast; refy_theme_extract pulls a theme from a site; refy_compare compares a capture of the original with the refy screen. The remote server (refy.design/mcp) has the first seven, because it does not read files from your machine. Other clients and limits.

What is in the catalog

  • Components: 135 families (35 atoms, 71 molecules and 29 organisms), with usage, API, interactive examples and copyable code. The 570 snippets taken from the sources compile against the public API.
  • Templates (Block in code): full screens for a purpose, with responsive preview. Guide.
  • Charts: a D3 catalog with 24 types, axes, legends, tooltip, zoom, brush and streaming. Contracts.
  • Collections: media, geolocation, conversation, data, collaboration, commerce, finance and content. Collections.

Examples keep login, files and preferences local. Your app connects authentication, persistence, permissions and business rules. Limits of each family are in docs/QUALITY.md.

Run the catalog locally

Node 22.12+ and npm.

git clone https://github.com/viniciuscoimbra/refy-design.git
cd refy-design
npm ci
npm run storybook

Open http://localhost:6006 and go to Playground → Components. Pick Theme and Mode in the toolbar, adjust the theme in Customize theme, and download the JSON in Export.

npm run check            # tokens, contrast, motion, types, build and examples
npm run test:browser     # interaction tests

Roadmap

The project roadmap is in ROADMAP.md.

Contributing

Read CONTRIBUTING.md. Changes follow OpenSpec. The project is run as described in GOVERNANCE.md, with the people in MAINTAINERS.md.

Code of conduct · Security · Support · Releases · Adopters · Privacy · Third-party notices

License

refy is licensed under Apache 2.0, with the NOTICE. Versions up to 1.9.3 were released under MIT. The refy name and logo follow TRADEMARKS.md.

More Design Tool MCP servers

Similar servers from the same category.

🤖 A Model Context Protocol server for generating charts using @antvis.

TextModel+1
SlideSpeak logo

SlideSpeak

slidespeak

Generate presentations using the SlideSpeak API.

APIPresentation+2

Generate images using Amazon Nova Canvas.

text

Bridges to 21st.dev's Magic API for generating UI components from descriptions, fetching existing components for inspiration, and searching for company logos in various formats.

search