MCP Hub
Back to servers

@sarveshsea/memoire

Validation Failed

AI-Native Design Intelligence Engine — Figma + Research + Spec-Driven Code Generation

npm266/wk
Stars
1
Updated
Apr 8, 2026
Validated
May 6, 2026

Validation Error:

Process exited with code 1. stderr: npm warn deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. npm warn deprecated lodash.isequal@4.5.0: This package is deprecated. Use require('node:util').isDeepStrictEqual instead. npm warn deprecated glob@7.2.3: Old versions of g

Quick Install

npx -y @sarveshsea/memoire

Memoire

Memoire

Design intelligence engine for Figma.
Pull your design system. Generate production code. Sync changes bidirectionally.
Works as a CLI, MCP server for Claude Code / Cursor, or fully autonomous agent.

npm version weekly downloads CI License 698 tests passing 20 MCP tools

memoire.cv  ·  MCP Setup  ·  Quick Start  ·  Changelog

Memoire demo: spec a component, generate code, configure MCP


What it does

Connect to Figma. Memoire handles the rest:

  1. Pulls design tokens, components, and styles via WebSocket bridge
  2. Creates structured JSON specs (every component described before code)
  3. Generates React + TypeScript + Tailwind code using shadcn/ui
  4. Syncs changes bidirectionally between Figma and code
  5. Previews everything on a local dashboard

All components follow Atomic Design -- atoms, molecules, organisms, templates, pages.


Install

npm install -g @sarveshsea/memoire

Requires Node.js 20+. Figma Desktop needed only for the real-time WebSocket bridge — REST mode works without it.

Works with

ToolHow
Claude CodeMCP server — 20 tools available in every session
CursorMCP server — drop config into .cursor/mcp.json
WindsurfMCP server — add to MCP settings
StandaloneCLI — full pipeline without any AI tool

Quick start

New user? One command sets everything up:

memi setup             # token → file → plugin → bridge → MCP config → test pull

Or step by step:

memi init              # scaffold workspace
memi connect           # start Figma bridge
memi pull              # extract design system (auto-falls back to REST)
memi generate          # produce React code
memi preview           # open preview dashboard

Or do it all at once:

memi go                # connect + pull + spec + generate + preview

Uninstall

memi uninstall                          # remove ~/.memoire and .memoire/
npm uninstall -g @sarveshsea/memoire    # remove the package

Your specs, generated code, and .env files are never touched.


Commands

Core workflow

CommandWhat it does
memi setupFull onboarding: token → file → plugin → bridge → MCP config → test pull
memi initInitialize workspace with starter specs
memi connectStart Figma bridge, report plugin health
memi connect --backgroundStart bridge as a background daemon
memi pullExtract tokens, components, styles from Figma (auto-falls back to REST)
memi pull --restPull via REST API — no plugin or Figma Desktop required
memi spec <type> <name>Create a component, page, or dataviz spec
memi generate [name]Generate shadcn/ui code from specs
memi generate --previewShow generated code without writing files
memi previewStart localhost preview gallery
memi goFull pipeline in one command
memi exportExport generated code into your project
memi tokensExport design tokens as CSS / Tailwind / JSON
memi validateValidate specs against schemas and cross-references

Sync and daemon

CommandWhat it does
memi syncFull sync: Figma + specs + code
memi sync --liveWatch for changes and sync continuously
memi sync --conflictsShow and resolve pending sync conflicts
memi watch --codeWatch specs + generated/ for changes
memi daemon startStart daemon with reactive pipeline
memi daemon statusShow daemon status with startup phase timings

Agents and orchestration

CommandWhat it does
memi compose "<intent>"Agent orchestrator: classify, plan, execute
memi agent spawn <role>Spawn a persistent agent worker
memi agent listList registered agents
memi agent statusAgent registry + task queue status

Research

CommandWhat it does
memi research from-file <path>Process Excel/CSV into research
memi research from-stickiesConvert FigJam stickies to insights
memi research synthesizeSynthesize themes and personas
memi research reportGenerate markdown research report

Diagnostics

CommandWhat it does
memi statusProject status overview
memi doctorHealth check: project, plugin, bridge, workspace
memi dashboardLaunch monitoring dashboard
memi design-doc <url>Extract design system from any URL → DESIGN.md
memi uninstallRemove all Memoire artifacts

All commands support --json for structured output.


MCP Server

Memoire exposes 20 tools and 3 resources over stdio. Any MCP-compatible AI tool can use it as a design layer.

Claude Code — add to .mcp.json:

{
  "mcpServers": {
    "memoire": {
      "command": "memi",
      "args": ["mcp", "start"]
    }
  }
}

Cursor — add to .cursor/mcp.json (same format).

Or generate and install the config automatically:

memi mcp config --install              # writes to .mcp.json in project root
memi mcp config --install --global     # writes to ~/.claude/settings.json
memi mcp config --target cursor --install   # writes to .cursor/mcp.json

20 tools

ToolWhat it does
pull_design_systemPull tokens, components, styles from Figma
get_specs / get_specList or read specs
create_specCreate a spec from JSON
generate_codeGenerate code from a spec
get_tokens / update_tokenRead or update design tokens
sync_design_tokensMap Figma tokens to Tailwind config
capture_screenshotScreenshot a Figma node
get_selectionGet current Figma selection
get_page_treeGet Figma page structure
composeRun agent orchestrator with natural language
run_auditDesign system audit
get_researchGet research store
figma_executeExecute Plugin API code in Figma
analyze_designAI vision analysis of Figma screenshots
measure_textServer-side text measurement
get_ai_usageSession token usage and cost
check_bridge_healthBridge latency diagnostics
design_docExtract design system from any URL → DESIGN.md

3 resources

ResourceWhat it provides
memoire://design-systemCurrent design system
memoire://specs/{name}Individual spec
memoire://projectProject context

Multi-agent orchestration

Multiple Claude instances can operate as persistent agents, each owning a role:

# Terminal 1
memi agent spawn token-engineer

# Terminal 2
memi agent spawn design-auditor

# Terminal 3
memi agent status

Roles: token-engineer, component-architect, layout-designer, dataviz-specialist, code-generator, accessibility-checker, design-auditor, research-analyst, general

The orchestrator checks for external agents first, falls back to internal execution. Tasks persist across daemon restarts.

Batch orchestration

memi compose "create a button, card, and input component"

The orchestrator classifies the intent, builds a plan of sub-tasks with dependencies, and executes them with shared context.


Figma plugin

The Figma plugin auto-discovers Memoire on ports 9223-9232.

Setup

  1. Open Figma Desktop
  2. Plugins > Development > Import plugin from manifest
  3. Select ~/.memoire/plugin/manifest.json

If Figma says the main file must not be a symlink, remove the old import and re-import from the copied path.

Operator Console

The Widget V2 plugin is an operator console with three panels:

  • Jobs -- sync, inspect, capture, and healer work as tracked job state
  • Selection -- live node IDs, layout facts, styles, variants, quick actions
  • System -- bridge status, ports, latency, buffered change-stream state
memi connect --json    # plugin install health
memi doctor --json     # bundle health + bridge state

Spec-first workflow

Every component starts as a JSON spec before code is generated:

{
  "name": "MetricCard",
  "type": "component",
  "level": "molecule",
  "purpose": "Display a KPI with trend indicator",
  "shadcnBase": ["Card", "Badge"],
  "props": {
    "title": "string",
    "value": "string",
    "trend": "string?"
  },
  "variants": ["default", "compact"],
  "accessibility": {
    "role": "article",
    "ariaLabel": "Metric display card"
  }
}

Specs are validated with Zod schemas. Run memi validate to check all specs against the schema and cross-reference rules.


Architecture

src/
  engine/     Core orchestrator, registry, sync, pipeline, text measurer
  figma/      WebSocket bridge (ports 9223-9232), canvas healer
  agents/     Intent classifier, plan builder, sub-agents, task queue
  mcp/        MCP server (20 tools, 3 resources, stdio transport)
  codegen/    shadcn/ui mapper, dataviz, pages, prototype exporter
  research/   Research engine (Excel, stickies, transcripts, web)
  specs/      Spec types, Zod schemas, 62-component catalog
  ai/         Anthropic SDK, token tracking, cost estimation
  preview/    Preview gallery, API server, dashboard
  notes/      Downloadable skill packs (loader, resolver, installer)
  commands/   20 CLI commands (Commander.js)
  plugin/     Figma plugin source (Widget V2)

Notes (skill packs)

Notes extend what Memoire can do. Install from local paths or GitHub:

memi notes install github:user/repo
memi notes list
memi notes info <name>
memi notes remove <name>

Built-in categories: craft, research, connect, generate.


Stack

  • TypeScript strict, ESM modules
  • shadcn/ui + Tailwind for all generated code
  • Zod for schema validation
  • Commander.js for CLI
  • WebSocket for Figma bridge
  • Pino for structured logging
  • Vitest for testing (698 tests)

License

MIT

Reviews

No reviews yet

Sign in to write a review