npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@smile-design/mcp-server

v0.1.0

Published

MCP Server for smile-design — exposes design tokens, aesthetic checks, DOM inspector, preview lifecycle, and screenshot tools to Claude Code so any IDE / CLI agent supporting Model Context Protocol can drive smile-design's design intelligence.

Readme

@smile-design/mcp-server

Model Context Protocol server that exposes smile-design's design intelligence — design-system presets, Tailwind v4 token round-trip, aesthetic checks, DOM Inspector, preview lifecycle, and headless screenshots — as MCP tools and resources for Claude Code and any other MCP-aware agent.

This is the developer track entry point for smile-design: install it once, register it as an MCP server in your existing Claude Code workflow, and ask the agent "switch this project to the corporate design system" or "tighten contrast on the hero section" — the agent will reach for smile_apply_design_system / smile_aesthetic_checks / smile_replace_properties and edit your codebase in place. No Web UI required.

Install

pnpm add -D @smile-design/mcp-server
# or run on demand without installing:
npx @smile-design/mcp-server

Register with Claude Code

Add an entry to mcpServers in either ~/.claude.json (user scope, available everywhere) or <your-project>/.claude/settings.json (project scope, checked into git):

{
  "mcpServers": {
    "smile-design": {
      "command": "npx",
      "args": ["-y", "@smile-design/mcp-server"],
      "env": {
        "SMILE_PROJECT_DIR": "/absolute/path/to/your/project",
      },
    },
  },
}

Restart Claude Code. The 13 smile_* tools and 3 smile-design://... resources should now appear in /mcp listing.

A guided npx smile-mcp install / uninstall CLI is planned for the next release and will write this configuration interactively (smile-design Sprint 4.1 task T-4.1.6).

Tools

The server registers 13 tools. All tool names are prefixed smile_ so they never collide with other MCP servers in the same Claude Code session.

| Tool | Purpose | | --------------------------- | ----------------------------------------------------------------------------------- | | smile_start_preview | Spawn a Vite dev-server in the user's project, return live URL | | smile_stop_preview | Stop the managed preview process | | smile_screenshot | Capture a base64 PNG of the running preview via headless Chromium | | smile_read_design_tokens | Parse globals.css @theme block and return current DesignTokenSet | | smile_apply_design_system | Switch the project to a built-in preset (corporate / default-minimalist) | | smile_compile_design_md | Compile DESIGN.md AST to Tailwind v4 @theme token map | | smile_aesthetic_checks | Run static + dynamic aesthetic checks (contrast / typography / spacing / alignment) | | smile_get_guidelines | Return the active aesthetic guide as Markdown for agent prompt injection | | smile_inspect_element | Toggle the DOM Inspector overlay inside the preview iframe | | smile_get_element_context | Resolve a clicked DOM node back to its source location and JSX context | | smile_search_properties | AST-search JSX prop values across .tsx / .jsx files | | smile_replace_properties | AST-rewrite JSX prop values with byte-accurate source-map preservation | | smile_refine_element | Apply a focused style/refactor to a single inspected element |

Resources

Read-only resources the agent can ReadResource before deciding which tool to call:

| URI | MIME | Returns | | ------------------------------- | ------------------ | --------------------------------------------------------------------------------------- | | smile-design://guide/active | text/markdown | Currently active aesthetic guide (the same prompt fragment injected into PromptBuilder) | | smile-design://tokens/current | application/json | Parsed globals.css @theme tokens grouped by colors / typography / spacing | | smile-design://preview/state | application/json | Current preview status (status / projectDir / url / template / recentErrors) |

Resources are fail-open: if the project has no DESIGN.md or the preview is not running, the resource returns an error payload rather than throwing — the agent can still reason about the situation.

Project resolution

Every tool that touches the user's filesystem resolves the target directory in this order:

  1. The SMILE_PROJECT_DIR env var (set in your mcpServers entry — recommended)
  2. The MCP request's optional projectDir argument
  3. Fall back to an explicit error so the agent never silently edits the wrong project

This mirrors memory/conventions/mcp-project-dir-resolution.md from the smile-design monorepo.

Requirements

  • Node.js ≥ 22 (LTS)
  • A user project that runs on Vite (the preview manager spawns npx vite in SMILE_PROJECT_DIR). Next.js / Vue / Nuxt support arrives in Phase 5.
  • For aesthetic-check sampling and screenshots: a Chromium download via npx playwright install chromium
  • Claude Code 2.x or any MCP-aware agent that understands stdio transport

Related packages

License

MIT