Starwind UI MCP Server
Сервер протокола контекста модели TypeScript для Starwind UI v3 и Starwind Pro. Он предоставляет AI-клиентам актуальные, учитывающие особенности фреймворка рекомендации для проектов на Astro и React.
Быстрый старт
Актуальное руководство по настройке клиента см. в документации Starwind UI MCP.
Codex (~/.codex/config.toml):
[mcp_servers.starwind_ui]
command = "npx"
args = ["-y", "@starwind-ui/mcp"]
enabled = trueClaude Code (.mcp.json) или Cursor (.cursor/mcp.json):
{
"mcpServers": {
"starwind-ui": {
"command": "npx",
"args": ["-y", "@starwind-ui/mcp"]
}
}
}После изменения конфигурации перезапустите клиент или перезагрузите его MCP-серверы.
Related MCP server: shadcn-ui MCP Server
Модель v3
Starwind UI v3 имеет три связанных поверхности. MCP сохраняет их различие:
Поверхность | Что представляет | Поведение MCP |
Styled components | Компоненты пользовательского интерфейса, принадлежащие копии, с реализациями на Astro и/или React | Поиск и установка с помощью |
Primitives | Низкоуровневые адаптеры для Astro и React, поддерживаемые Starwind Runtime, где применимо | Поиск с |
Runtime | Независимые от фреймворка API поведения | Получение с помощью |
Сервер проверяет эти слои на соответствие версионированному ai-manifest.json, кэширует проверенные данные и использует встроенный снимок v3, если сайт недоступен.
Инструменты
Инструмент | Назначение |
| Генерация команд инициализации v3 для существующего проекта на Astro или React. Pro подключается по желанию. |
| Проверка запросов и генерация команд установки или отложенной установки для styled components, primitives или блоков Pro только для Astro. |
| Поиск styled components, primitives и блоков Pro с метаданными фреймворка и фильтрами. |
| Получение точной документации по компонентам, primitives, Runtime, миграции и фреймворку. |
| Проверка проекта и генерация безопасных, ориентированных на интерактивность рекомендаций по миграции с v2 на v3. |
Вызовы инструментов возвращают как читаемый JSON-текст, так и structuredContent MCP.
Требования и поведение
Сгенерированные команды CLI v3 требуют Node.js 22.12.0 или новее.
starwind_initнацелен на существующие проекты Astro 5+ или React 18+ и позволяет CLI автоматически определить фреймворк, если не указанframework.Бесплатные блоки каталога
@starwind-pro/*работают после обычной инициализации. Платные блоки требуют явного разрешения; передавайтеpro: trueтолько при необходимости.Блоки Starwind Pro в настоящее время ориентированы на Astro. Поиск в React их пропускает, а запросы на добавление в React явно их отклоняют.
Миграция по умолчанию интерактивна. Устанавливайте
yes: trueтолько если предполагается поведение с резервным копированием и перезаписью.Контекст менеджера пакетов и проекта определяется локально, когда это возможно, и команды добавления передают разрешенный менеджер пакетов в CLI. Ни один инструмент не выполняет сгенерированную команду.
Обновление с бесплатной версии на Pro
MCP делает Pro доступным для обнаружения без принудительной платной настройки. Результаты поиска содержат ссылки на каталог Pro, бесплатные блоки Pro остаются напрямую устанавливаемыми, а платные результаты включают структурированный путь proUpgrade со ссылками на покупку и установку.
Для существующего проекта на Astro MCP рекомендует:
pnpm dlx starwind@latest setup --yesКоманда настройки автоматически определяет менеджер пакетов проекта, поэтому ей не нужен флаг --package-manager. Она подготавливает реестр Pro и .env.local; замените заполнитель STARWIND_LICENSE_KEY на приобретенный ключ, затем выполните возвращенную deferredCommand. Относитесь к ключу как к конфиденциальным данным: храните .env.local вне системы контроля версий и никогда не раскрывайте ключ в журналах или клиентском коде. Проект, инициализированный с pro: true, получает эквивалентную команду init --pro.
Разработка
pnpm build
pnpm lint
pnpm test:runЗапустите опциональный тест контракта производственного манифеста с помощью:
RUN_LIVE_CONTRACT_TESTS=1 pnpm test:run src/utils/starwind_live_contract.test.tsЛицензия
MIT. См. LICENSE.
Безопасность
Available Tools
5 toolsstarwind_addA
Generates validated Starwind UI v3 install commands for styled components, vendored primitives, or Starwind Pro blocks, with optional Astro or React targeting.
Inputs: components (required), to, cwd, pro, +5 more. Returns: result
starwind_docsB
Fetches current Starwind UI v3 documentation across styled components, primitives, Runtime, migration, and Astro or React framework guides.
Inputs: full, topic, surface. Returns: result
starwind_initA
Generates a Starwind UI v3 initialization command for an existing Astro or React project. The CLI auto-detects the framework unless an override is provided. Paid Pro authorization is opt-in and currently targets Astro.
Inputs: cwd, pro, framework, packageManager. Returns: result
starwind_migrateB
Generates the safe Starwind UI v3 migration command for a legacy Astro project. Interactive migration is the default; non-interactive overwrite behavior must be explicitly requested.
Inputs: cwd, yes, packageManager. Returns: result
starwind_searchC
Searches Starwind UI v3 styled components, Primitive adapters, and Starwind Pro blocks with framework-aware results.
Inputs: cwd, plan, limit, query, +4 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a clear, distinct purpose: initialization, adding components, searching, documentation, and migration. The only minor ambiguity is between starwind_init and starwind_add, as both generate CLI commands. However, starwind_init is specifically for project initialization, while starwind_add handles component and block installation, which is a reasonable distinction.
All tools follow a consistent starwind_ prefix followed by an imperative verb (init, add, search, docs, migrate). This is a clean, predictable pattern. The slight deduction is because the imperative verb is not strictly a verb_noun pattern (e.g., starwind_search instead of starwind_search_components), but this is a minor and common stylistic choice.
With 5 tools, the server is very well-scoped. It covers the core actions a developer would need when using the Starwind UI library within an MCP context: initializing, adding components, searching, and migrating. Each tool clearly earns its place, and the count feels appropriate for the scope of managing and interacting with a UI component library.
The tool set covers the primary development workflow: initializing, adding components, searching, accessing documentation, and managing migrations. This provides a comprehensive foundation. The only arguably missing piece might be a tool for direct configuration management or status checks. However, for an MCP interface, this set is remarkably complete and avoids common gaps in lifecycle management.
Maintenance
Related MCP Connectors
Serves your design system and coding standards to coding agents, so they stop guessing.
React + Tailwind UI components and recipes your AI coding tool can search and install.
React + Tailwind UI components and recipes your AI coding tool can search and install.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA server that helps AI models better understand Vite/Nuxt applications, providing enhanced context awareness for development support.915MIT
- AlicenseAqualityDmaintenanceHelps AI assistants access shadcn/ui component documentation and examples through a TypeScript-based MCP server that provides reference information for component details, usage examples, and search capabilities.4739 npm60MIT
- AlicenseAqualityDmaintenanceProvides reference information for shadcn/ui components through a Model Context Protocol server that helps AI assistants access component documentation and examples.4MIT
- AlicenseAqualityBmaintenanceServer that enables AI assistants to interact with Storybook design systems. Extract component HTML, analyze styles, and help with design system adoption and refactoring.9424 npm73MIT