跳到正文
FunCoding

Starwind UI MCP Server

官方 MCP Registry 已收录

Starwind UI v3 tools for Astro, React, Vue, and Svelte setup, components, docs, and migration.

Star
35
分类
其他
版本
v0.6.0
许可证
MIT
最近提交
2026年11月28日

Starwind UI MCP Server

npm GitHub stars

Official MCP Registry · io.github.starwind-ui/mcp

A TypeScript Model Context Protocol server for Starwind UI v3 and Starwind Pro. It gives AI clients current guidance for Astro, React, Vue, and Svelte projects.

Quick start

For the maintained client setup guide, see the Starwind UI MCP documentation.

Codex (~/.codex/config.toml):

[mcp_servers.starwind_ui]
command = "npx"
args = ["-y", "@starwind-ui/mcp"]
enabled = true

Claude Code (.mcp.json) or Cursor (.cursor/mcp.json):

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

Restart the client or reload its MCP servers after changing the configuration.

v3 model

Starwind UI v3 has three related surfaces. The MCP keeps them distinct:

SurfaceWhat it representsMCP behavior
Styled componentsCopy-owned UI components with Astro, React, Vue, and Svelte implementationsSearch and install with starwind_search and starwind_add
PrimitivesLower-level Astro, React, Vue, and Svelte adapters, backed by Starwind Runtime where applicableSearch with surface: "primitive"; install with the v3 primitives add command
RuntimeFramework-neutral behavior APIsFetch with starwind_docs using the Runtime topic or surface

The server validates these layers against the versioned ai-manifest.json, caches validated data, and falls back to a bundled v3 snapshot if the site is unavailable. Validation drops framework targets that this version does not know, so a newer manifest still works.

Tools

ToolPurpose
starwind_initGenerate v3 initialization commands for an existing Astro, React, Vue, or Svelte project. Pro is opt-in.
starwind_addValidate requests and generate installation or deferred-install commands for styled components, primitives, or Pro blocks.
starwind_searchSearch styled components, primitives, and Pro blocks with framework metadata and filters.
starwind_docsResolve exact component, primitive, Runtime, migration, and framework documentation. With cwd, it also points to the installed package docs page.
starwind_migrateInspect a project and generate safe, interactive-first v2-to-v3 migration guidance.

Tool calls return both readable JSON text and MCP structuredContent.

Requirements and behavior

  • Generated v3 CLI commands require Node.js 22.12.0 or newer.
  • starwind_init targets existing Astro 5+, React 18+, Vue 3.5.21+, or Svelte 5.29+ (below 6) projects. The CLI auto-detects the framework unless you supply framework.
  • The framework input accepts astro, react, vue, or svelte. starwind_search also accepts all.
  • Project context detects Astro (with React, Vue, or Svelte islands), Vite React, Next.js, React Router, TanStack Start, Vite Vue, Nuxt, Quasar, Laravel with Inertia Vue, Vite Svelte, and SvelteKit. It also reads framework and componentDirs from starwind.config.json.
  • When you pass cwd, project context lists the docs that ship in installed @starwind-ui/* packages (1.6.0 and newer) under packageDocs. The lookup finds packages the way Node does, so packages hoisted to a workspace root are found too.
  • With cwd, starwind_docs returns installedDocs, the page that matches the installed version. This works for a Primitive topic, a Runtime topic (init-starwind, raw-html, theme, or a controller), and a styled component that has a Primitive with the same name. If the website is unavailable, the tool returns the installed page.
  • With cwd, styled search results add projectImportPath when the project shows its host or component folder. Examples: ~/components/starwind/button in Nuxt and $lib/starwind/button in SvelteKit 2. publicImportPath keeps the default path.
  • A detected Vue host gets init --framework vue. Only an explicit Vue target reaches the CLI's Vue upgrade offer when the project uses Vue below 3.5.21.
  • Free @starwind-pro/* catalog blocks work after ordinary initialization. Paid blocks require explicit authorization. Pass pro: true only when it is required.
  • Pro search, setup, and installs work in every framework. Starwind Pro blocks are Astro components. For a React, Vue, or Svelte target, results that include Pro guidance or Pro blocks add proFrameworkWarning: use an Astro host for the block, or port the block. starwind_search adds it only when it returns Pro blocks. proUpgrade.newProjectCommand uses the selected or detected framework.
  • Migration is interactive by default. Set yes: true only when backup-and-overwrite behavior is intended.
  • Package-manager and project context are detected locally when possible, and add commands pass the resolved package manager to the CLI. No tool executes the generated command.
  • The packageManager input accepts npm, pnpm, yarn, or bun. Detection checks lockfiles in the CLI order: pnpm-lock.yaml, yarn.lock, bun.lock, bun.lockb, package-lock.json. It walks up from cwd to the nearest folder with a lockfile or a packageManager field, so workspace members use the workspace root lockfile. Bun projects get bunx starwind@latest commands. With cwd, starwind_search commands use the project's runner too.

Upgrading from free to Pro

The MCP keeps Pro discoverable without forcing paid setup. Search results link to the Pro catalog, free Pro blocks remain directly installable, and paid results include a structured proUpgrade path with purchase and installation links.

For an existing project, the MCP recommends:

pnpm dlx starwind@latest setup --yes

The setup command auto-detects the project's package manager, so it does not need a --package-manager flag. It prepares the Pro registry and .env.local; replace the STARWIND_LICENSE_KEY placeholder with the purchased key, then run the returned deferredCommand. Treat the key as sensitive: keep .env.local out of source control and never expose the key in logs or client-side code. A project initialized with pro: true receives the equivalent init --pro command instead.

Development

pnpm build
pnpm lint
pnpm test:run

Run the opt-in production manifest contract test with:

RUN_LIVE_CONTRACT_TESTS=1 pnpm test:run src/utils/starwind_live_contract.test.ts

License

MIT. See LICENSE.

Security

MseeP.ai Security Assessment Badge

同类 MCP Server

官方

Time

Current time lookup and conversion between IANA timezones

MOmodelcontextprotocol/servers92k近 7 天新增 166 个 star

官方

Everything

Reference server that exercises every MCP feature: tools, resources, prompts, sampling and more

MOmodelcontextprotocol/servers92k近 7 天新增 166 个 star

官方

Context7

Up-to-date docs for AI agents

UPupstash/context766k近 7 天新增 288 个 star

Reactive Resume

Free open-source resume builder with remote MCP tools for resumes and job applications.

REreactive-resume/reactive-resume46k近 7 天新增 169 个 star

mcp-server

Puter MCP enables AI tools to interact with Puter: manage files, websites, workers, and more

HEHeyPuter/puter44k近 7 天新增 50 个 star