@stnd/mcp
Circle 2 — Application Superpower (Official Extension) · Stable · First-Party
Role: Model Context Protocol server (local stdio & remote
https://stnd.build/api/mcp) exposing tokens, laws, andstnd_lint_markup.When to use: Connect Claude Code, Cursor, Zed, or Antigravity to verify the 8 Laws and audit HTML/Astro markup automatically. Full guide at MCP Specification.
Quick Start (TL;DR)
// mcp.json
{
"mcpServers": {
"standard": { "url": "https://stnd.build/api/mcp" }
}
}
The Standard Framework MCP Server (Model Context Protocol). It guides humans and AI coding agents by exposing the core laws, unified hooks specifications, CSS design tokens, HTML utility classes, and real-time architectural compliance auditors.
Features
- Resources (
stnd://...):stnd://framework/laws— The 8 non-negotiable laws and conventions of the Utopie ecosystem.stnd://framework/hooks— Unified Hooks system reference (runHook,runPipeline, UI slots<Hook />, Action extensions, and theserver: truerule).stnd://framework/tokens— Live extract of all official CSS variables and OKLCH color roles from@stnd/styles.stnd://framework/utilities— Standard HTML utility classes (Swiss grid1-12, hybrid spacing scale, typographic steps, borders, elevation) and semantic component vocabulary (button,article.card,.btn-group,.badge,.tag).stnd://crafts/all— The Three Crafts overview (Writer, Builder, Craftsman) with mental models and constraints.stnd://crafts/writer— Master Blueprint for Writers (Markdown conventions, frontmatter lifecycle, digital garden).stnd://crafts/builder— Master Blueprint for Builders (vertical slices, Cloudflare edge, 8 laws).stnd://crafts/craftsman— Master Blueprint for Craftsmen (OKLCH tokens, 1rlh harmonics, live Workshop]).stnd://cookbook/all— The progressive cookbook recipes (0 to 7) with scaffolding commands and topologies.
- Tools:
stnd_get_craft_guide— Retrieve the architectural blueprint, rules, and commands for a craft persona (writer,builder,craftsman).stnd_get_cookbook_recipe— Look up progressive cookbook recipes (patterns,landing,blog,add-anything,garden,intention,photo).stnd_get_utilities— Search HTML utilities and semantic component patterns with markup examples.stnd_get_tokens— Search design tokens by category (color,token,typography,grid) or keyword.stnd_get_hooks_info— Retrieve signatures and rules for logic hooks, pipelines, and action extensions.stnd_audit_app— Run a complete architectural audit of an application (e.g.apps/stnd.gd).stnd_audit_module— Audit an individual vertical slice inmodules/*.stnd_lint_markup— Validate HTML, Astro, or Svelte snippets for forbidden button classes, literal colors, and token smells.
Running the Server
1. Remote Endpoint (Zero Local Setup)
The Standard MCP Server is deployed live on edge Cloudflare Workers via stnd.build:
- Endpoint URL:
https://stnd.build/api/mcp - Supported Transports: SSE (
text/event-streamvia GET) & JSON-RPC 2.0 (via POST) with full CORS headers.
Remote Configuration for Cursor / Claude Desktop / Antigravity
{
"mcpServers": {
"stnd-remote": {
"url": "https://stnd.build/api/mcp"
}
}
}
2. Local StdIO Server (Offline / CI)
Via CLI
pnpm --filter @stnd/mcp start
# or directly:
node packages/mcp/bin/stnd-mcp.js
In Zed (~/.config/zed/settings.json)
{
"context_servers": {
"stnd": {
"command": "node",
"args": ["/Users/francisfontaine/Documents/GitHub/utopie/packages/mcp/bin/stnd-mcp.js"]
}
}
}
In Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"stnd": {
"command": "node",
"args": ["/Users/francisfontaine/Documents/GitHub/utopie/packages/mcp/bin/stnd-mcp.js"]
}
}
}
Architecture Audit Rules
The auditor enforces the invariants defined in the root README:
- Law #1: No backward compatibility shims.
- Law #3:
.astrofiles hold no business logic (queries and mutations belong in domain models or actions). - Law #4: Vertical slices & one-way dependency flow (feature modules must never import from sibling feature modules).
- Law #5: Minimal
src/(feature logic belongs inmodules/). - Component Vocabulary: Zero-class
buttonis the primary action (no.primary),.secondaryrenamed to.accent,article.cardwith header/body/footer structure. - Styling Rules: Zero literal hex/rgb colors, no fallback smell on framework tokens (
var(--x, fallback)).