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

@hua-labs/dot-mcp

v0.2.0

Published

MCP server for the dot style engine

Readme

@hua-labs/dot-mcp

MCP (Model Context Protocol) server for the dot style engine — enables AI assistants to resolve, explain, complete, validate, and produce canonical Flutter recipe wire data from dot utility strings.

npm version npm downloads license TypeScript

Features

  • dot_resolve — convert utility strings to style objects (web CSSProperties, RN StyleSheet, Flutter recipe)
  • dot_explain — resolve + capability report (dropped/approximated properties per target)
  • dot_flutter_wire — produce the canonical versioned Flutter recipe wire bytes owned by @hua-labs/dot/flutter
  • dot_complete — autocomplete suggestions with category labels (prefix + substring matching)
  • dot_complete authority — package-local bounded completion catalog, not the resolver or token SSOT
  • dot_capabilities — query the package-owned AX capability catalog without resolving styles
  • dot_validate — check utility strings for unrecognized tokens
  • Cross-platform support — web, native (React Native), and flutter targets
  • MCP error boundary — SDK or schema validation can fail before a registered handler; handler error text is not universal

Installation

pnpm add @hua-labs/dot-mcp

Quick Start

# Install and run as MCP server
npm install -g @hua-labs/dot-mcp
dot-mcp

# Or use with npx
npx @hua-labs/dot-mcp

# Claude Desktop config (~/.claude/claude_desktop_config.json):
{
  "mcpServers": {
    "dot": {
      "command": "npx",
      "args": ["@hua-labs/dot-mcp"]
    }
  }
}

API

| Export | Type | Description | |--------|------|-------------| | dot_resolve | function | Resolve a dot utility string into a platform-specific style object. Params: input, target, dark, and breakpoint. | | dot_explain | function | Resolve + return capability report showing dropped/approximated properties for the target platform. | | dot_flutter_wire | function | Produce the canonical Flutter recipe wire string. Params: input, dark?, breakpoint?. Flutter is fixed; target selectors and other unknown members are rejected. | | dot_complete | function | Get autocomplete suggestions for a partial token. Params: partial (string), limit? (number, default 20). | | dot_capabilities | function | Query the package-owned dot AX capability catalog. Params: target?, category?, level?, family?, limit?, includeProperties?, includeExamples?, includeComposition?. | | dot_validate | function | Validate a utility string — returns { valid, errors[], resolved_count }. |

Detailed Guide

Detailed Guide — Tool contracts, Flutter wire delegation, completion boundaries, and MCP error handling.

The Detailed Guide is included in the package tarball.

Package Surface

@hua-labs/dot-mcp is installed and executed as a CLI/MCP server package. Its public package surface is the dot-mcp binary, which exposes MCP tools over stdio. The package does not publish a stable JavaScript import API or TypeScript type surface; tool contracts are documented as MCP runtime capabilities.

Tool Authority Boundaries

dot_flutter_wire imports createFlutterRecipeWire and serializeFlutterRecipeWire from @hua-labs/dot/flutter; the Dot Flutter entry owns the executable recipe schema and canonical bytes.

dot_complete reads a package-local bounded completion catalog. That catalog supports MCP suggestions only and is not the resolver or token SSOT.

SDK or schema validation can fail before a registered handler runs. Those failures use the MCP SDK's protocol envelope. Handler-owned failures use the bounded text/error shapes implemented by the individual tool; neither boundary is a universal response-wrapper or Error: prefix guarantee.

Tool Examples

dot_resolve:

{ "input": "p-4 flex items-center bg-blue-500", "target": "web" }
→ { "padding": "16px", "display": "flex", "alignItems": "center", "backgroundColor": "#3b82f6" }

dot_explain (native target):

{ "input": "p-4 blur-md grid", "target": "native" }
→ { "styles": {...}, "report": { "_dropped": ["filter", "gridTemplateColumns"], "_capabilities": {...} } }

dot_flutter_wire:

{ "input": "p-4 cursor-pointer", "dark": false, "breakpoint": "md" }
→ "<canonical @hua-labs/dot/flutter recipe wire JSON>"

The exact wire schema, version, recipe, and metadata fields are owned by the exported createFlutterRecipeWire and serializeFlutterRecipeWire helpers from @hua-labs/dot/flutter. This MCP tool returns those exact serialized bytes; it does not implement or prove a Dart runtime, Flutter widget, renderer, or device-parity path.

The input object is strict. target and every other unknown member fail MCP input validation instead of being stripped or ignored.

dot_validate:

{ "input": "p-4 bg-bogus flex" }
→ { "valid": false, "errors": ["bg-bogus"], "resolved_count": 2 }

dot_capabilities:

{ "family": "ring", "includeComposition": true }
→ { "sourceExport": "getDotAxCatalog", "entries": [{ "id": "ring", "composition": { "kind": "finalized-style", ... } }] }

Related Packages

License

MIT — HUA Labs