Skip to content

MCP setup

The Shavin MCP server gives your AI agent 32 tools for looking up, planning, checking and building Shavin UI. It runs locally through npx; no account or API key is needed.

Claude Code

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

Or commit a .mcp.json in your project root so the whole team gets it. npx @shavin/cli init writes this file for you.

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

Cursor

Add the same block to .cursor/mcp.json. init writes this file too.

VS Code

VS Code uses a servers key in .vscode/mcp.json. init writes this file for you:

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

Check it works

Ask your agent to run inspect_environment. It reports a setup score and what is missing: the package, Tailwind wiring, ThemeProvider, SHAVIN.md, AGENTS.md and the skills.

The tools

GroupWhat forTools
PlanTurn a brief into a section-by-section page plan, and check the page against itplan_pagecheck_page
Look upReal props, tokens, blocks and project settings instead of guessesget_project_contextget_componentsget_tokensget_block_templateget_studio_schemaget_guidelinesget_setup_instructions
SkillsLoad the playbook for the task at handlist_skillsget_skillget_skill_modelist_commandsinstall_skills
Check and fixValidate snippets and files, fix what can be fixed, score the setupvalidate_codeaudit_sourceautofix_codeinspect_environmentshavin_steersynthesize_layout
Live pageRead problems from the page running in your browserget_live_audittrigger_live_rescanwait_for_live_clean
StudioBuild on a Shavin Studio canvas while you watchconnect_studiocompose_to_canvasinject_blocksget_studio_stateset_studio_themeclear_studio_canvasdisconnect_studio

How agents combine them is in Working with AI.

Live audit

The live tools read from a small local server, the bridge, that receives audit results from the Shavin inspector in your browser. init wires it to start with your dev server. To wire it by hand:

// next.config.mjs
import { withShavinBridge } from "@shavin/mcp/next";
export default withShavinBridge({ /* your Next config */ });

// vite.config.ts
import { shavinBridge } from "@shavin/mcp/vite";
export default defineConfig({ plugins: [shavinBridge()] });

The bridge listens on port 7036. The Next.js and Vite wrappers only start it in development, and SHAVIN_BRIDGE=0 turns them off. You can also run npx @shavin/cli bridge in a separate terminal; add --port to use another port.

Configure Theme
Theme
Brand Color
Custom
Gray Family
Appearance
Radius
Scaling
Panel Style
Heading Font
Body Font