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

@sobagu/mcp

v0.1.2

Published

Sobagu CSS MCP server: lets AI coding assistants look up Sobagu props and tokens, make themes and check Sobagu code

Readme

@sobagu/mcp

An MCP (Model Context Protocol) server that helps AI coding assistants write correct Sobagu code. It reads everything from @sobagu/core, so its answers always match the version you have installed.

Tools

| Tool | Input | What it returns | |---|---|---| | list_props | filter? (text in a prop name or CSS property) | Style props with their CSS properties, tokens and what a number means | | get_tokens | kind? (colors, space, sizes, radii, fontSizes, shadows, breakpoints…) | Design tokens, name → CSS value | | list_conditions | | Conditions (hover, md, dark, groupHover, cqMd…) and the selector or at-rule each produces | | list_shortcuts | | Boolean shortcuts (card, center, row…) and what they expand to | | explain | style (a style object, or JSON text) | The class names, the exact CSS generated, and any problems | | check | source (JSX / TSX / Vue / HTML) | Unknown props, tokens and colours, with line numbers and "did you mean" suggestions | | create_theme | brand (hex or hue), accent?, name? | createTheme() output: palette, generated CSS, WCAG contrast numbers and warnings, and the code that applies it | | check_contrast | fg, bg, use? (text, large-text, ui) | WCAG contrast ratio with AA / AAA results; semantic colours are checked in light and dark mode | | migrate_classes | classes, element? | Utility classes → Sobagu props, a <Box> tag and a css() call, using the same rules as sobagu migrate | | search_ui | Search the Sobagu UI catalogue: components, charts, blocks, patterns and templates, with Free/Pro tier, page link and import line | | get_ui_item | One item by id: free items come with props and example code (free blocks: the full source); Pro items return the page link only |

check scans <Box>, <Stack>, <Grid> and <Text> attributes (JSX and Vue, including :bound values and kebab-case), css({...}) calls, sb="…" / data-sb="…" attributes and v-sb="{…}". It is a fast heuristic scan, not a full parser: values built at runtime (variables, function calls) are skipped, but string literals inside an expression (bg={on ? 'primary' : 'muted'}) are checked.

Setup

The server talks over stdio. The command is npx -y @sobagu/mcp.

From the command line

claude mcp add sobagu -- npx -y @sobagu/mcp

Add --scope project to share it with your team through .mcp.json.

Project config file, one editor

.cursor/mcp.json in your project (or ~/.cursor/mcp.json for every project):

{
  "mcpServers": {
    "sobagu": { "command": "npx", "args": ["-y", "@sobagu/mcp"] }
  }
}

Project config file, another editor

.vscode/mcp.json in your project:

{
  "servers": {
    "sobagu": { "type": "stdio", "command": "npx", "args": ["-y", "@sobagu/mcp"] }
  }
}

Other clients

Any MCP client that can start a stdio server works: run npx -y @sobagu/mcp (or sobagu-mcp when the package is installed).

Your own tokens

If your project adds tokens with extendTokens(), put the same object in a sobagu.tokens.json file in the project root, so check and explain know names like bg="brand.500" or p="huge" instead of reporting them:

{ "palette": { "brand": "#7c3aed" }, "semantic": { "highlight": ["amber.200", "amber.800"] }, "space": { "huge": "200px" } }

Another file name: set SOBAGU_TOKENS (a path, relative to the project). An assistant can also pass the object as the tokens argument of check and explain.

Components, blocks, patterns and templates

search_ui and get_ui_item read the catalogue published with the Sobagu UI site (https://sobagucss.com/ui/mcp/). To use another copy, such as a local build, set SOBAGU_UI_URL to its URL or to a folder that holds mcp/index.json. Pro items are listed with their page link; their code is only for Sobagu Pro licence holders.

Docs

Sobagu is in 0.x: the tools and their output can still change between minor versions.

Working on this package

From the root of the Sobagu repository:

npm run build -w @sobagu/mcp                                   # → packages/mcp/dist/server.js
node packages/mcp/scripts/smoke.mjs node packages/mcp/dist/server.js   # initialize + tools/list + two calls
npx tsx packages/mcp/src/server.ts                             # run from source without building
npx vitest run packages/mcp                                    # unit tests for src/tools.ts

The tool logic lives in src/tools.ts as plain functions; src/server.ts only wires them to MCP, and src/tool-names.ts lists the tools for scripts such as the llms.txt generator. The build bundles @sobagu/core, sobagu, the class converter of @sobagu/cli into dist/server.js, so the answers match the packages of the same release.

Licence

MIT © 2026 Sobagu contributors