Astryx Documentation MCP Server
Astryx Documentation MCP Server & AI Agent Skill
Полнофункциональный сервер Model Context Protocol (MCP) и навык AI-агента для Meta Astryx Design System. Этот проект индексирует собранную документацию, спецификации компонентов, руководства по StyleX и справочники CLI, предоставляя структурированные инструменты и рекомендации по промптам для AI-ассистентов и агентов разработки (Claude Desktop, Cursor, Project IDX, Gemini CLI, Antigravity, Windsurf).
🚀 Возможности и инструменты MCP
MCP-сервер предоставляет четыре инструмента через stdio:
search_astryx_docsОписание: Полнотекстовый поиск и поиск по ключевым словам по всей документации Astryx, руководствам и API компонентов.
Параметры:
query: string(например,'Button','defineTheme','StyleX','asChild').
get_astryx_componentОписание: Получение руководств по применению, работа с интерфейсами пропсов, данными импортов и примерами кода для конкретного компонента.
Параметры:
componentName: string(например,'Button','AppShell','Table','Avatar','Dialog','Input').
get_theme_guideОписание: Получение информации о шести встроенных темах (Neutral, Butter, Stone, Gothic, Y2K, Matcha), дизайн-токенах CSS-переменных и пользовательских определениях тем с помощью
defineTheme.Параметры:
themeName?: string(например,'butter','neutral','defineTheme').
get_cli_commandsОписание: Документация для
@astryxdesign/cliи команд (init,doctor,template,manifest,theme build,swizzle).Параметры:
command?: string(например,'init','doctor','template','manifest','theme build','swizzle').
Related MCP server: WordPress Design System MCP Server
🤖 Astryx Agent Skill (astryx-skill)
Находится в astryx-skill/SKILL.md и предоставляет эталонные паттерны и правила кодирования:
Подпутевые импорты:
import { Button } from '@astryxdesign/core/Button';Каскадные слои: Предписывает
@import '@astryxdesign/core/astryx.css';внутри@layer astryx-base.Переопределение стиле́й через StyleX: Используйте StyleX через проп
xstyleвместо произвольных инлайн-стилей.Провайдер темы: Стандартизированная структура приложения
<Theme mode="system" theme={neutralTheme}>.
🌐 Интерактивный вводный веб-сайт
В index.html включён интерактивный презентационный сайт, предлагающий пользователю:
Живой обзор тем: Проверьте 6 тем дизайна Astryx (Neutral, Butter, Stone, Gothic, Y2K, Matcha).
Площадка компонентов: Интерактивное управление пропами с генерацией TSX-кода в реальном времени.
Симулятор stdio для MCP-сервера: Интерактивный тестовый запуск инструментов поиска.
Матрица публикации в один клик: Простая настройка для GitHub Pages, Vercel, Netlify и Cloudflare Pages.
🛠️ Начало работы
Необходимые условия
Node.js >= 18.0.0
npm / pnpm / yarn
Установка
git clone https://github.com/georgemathunjaga/astryx-mcp-and-skill.git
cd astryx-mcp-and-skill
npm installСборка и запуск
# Build TypeScript and bundle crawl data to dist/
npm run build
# Start the MCP server using node (stdio)
npm start
# Run in development mode with live TypeScript compilation
npm run dev
# Run automated integration tests
npm test🔌 Подключение к AI-IDE и клиентам
1. Claude Desktop
Добавьте следующее содержимое в claude_desktop_config.json:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"astryx-docs": {
"command": "node",
"args": ["E:/workspace/public-repos/astryx-mcp/dist/index.js"]
}
}
}2. Google Project IDX / Gemini CLI / Cursor
Добавьте в .cursor/mcp.json вашего проекта или в mcp.json:
{
"mcpServers": {
"astryx-docs": {
"command": "node",
"args": ["E:/workspace/public-repos/astryx-mcp/dist/index.js"]
}
}
}📂 Структура проекта
astryx-mcp/
├── astryx-skill/ # Astryx Agent Skill instructions
│ ├── SKILL.md
│ └── astryx-skill.md
├── index.html # Interactive Intro Website
├── styles.css # Master CSS Design System
├── app.js # Interactive Website Logic & MCP Simulator
├── dist/ # Compiled JavaScript output & assets
│ ├── index.js
│ └── data/
│ └── astryx_crawl.json
├── src/
│ ├── data/
│ │ └── astryx_crawl.json # Crawled Astryx documentation dataset
│ └── index.ts # MCP Server definition and tool handlers
├── test/
│ └── mcp-test.js # MCP Stdio verification suite
├── package.json
├── tsconfig.json
└── README.md📄 Лицензия
MIT
Available Tools
4 toolsget_astryx_componentB
Retrieve usage, props, imports, and code specifications for a specific Astryx component.
| Name | Required | Description | Default |
|---|---|---|---|
| componentName | Yes | The name of the component (e.g., 'Button', 'AppShell', 'Table', 'Avatar', 'Dialog', 'Input') |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden. The description says it retrieves usage, props, imports, and code specs, disclosing the kind of data returned. However, it doesn't mention any side effects, permission requirements, or edge cases (e.g., what happens if component doesn't exist). For a read operation this is acceptable but not comprehensive.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, concise, lists key deliverables (usage, props, imports, code specs). It is front-loaded with the action. No waste, though a bit terse.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple read tool with one parameter and a clear description, it is mostly complete. The description doesn't mention what exact code specifications look like or error handling, but given the simplicity and no output schema, it's adequate. Slight gaps: how detailed the retrieval is, whether it returns snippets or full source.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% for the single parameter componentName, including an example list. The description adds nothing beyond the schema but doesn't need to, given the coverage. The baseline of 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves usage, props, imports, and code specifications for a specific Astryx component. It names the resource (Astryx component) and the verb (retrieve). It distinguishes from siblings that handle docs search, theme guides, and CLI commands, but does not explicitly name any sibling.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage: when you need details about a specific component. It does not explicitly state when not to use it versus siblings. For example, it doesn't say 'use search_astryx_docs for broader searches.' The purpose is clear but exclusions are not named.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_cli_commandsB
Get documentation for the @astryxdesign/cli tool and CLI commands (init, doctor, template, manifest, theme build, swizzle).
| Name | Required | Description | Default |
|---|---|---|---|
| command | No | Specific CLI command (e.g., 'init', 'doctor', 'template', 'manifest', 'theme build', 'swizzle') |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must convey behavior, but it doesn't disclose any side effects, performance implications, or output format. As a read operation it likely has no side effects, but nothing explicitly states that.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence, front-loaded with the core purpose. The command list adds necessary specificity without waste. Slight redundancy with the parameter description, but overall efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple read-only documentation retrieval with one optional parameter and no output schema, the description is mostly sufficient, but it lacks explicit behavior details and sibling differentiation. An agent knows what to call but not exactly what to expect in return.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, and the description adds context by enumerating valid command values (init, doctor, etc.). This goes beyond the schema's example, giving agents a clearer sense of acceptable inputs.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves documentation for a specific CLI tool and lists the exact commands covered. This helps an agent understand the resource and scope, though it doesn't explicitly differentiate from siblings like search_astryx_docs.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is given on when to use this tool versus searching general docs or other resources. The description implies usage for CLI documentation but doesn't state exclusions or alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_theme_guideA
Get details on Astryx themes (Neutral, Butter, Stone, Gothic, Y2K, Matcha) or custom defineTheme CSS custom property syntax.
| Name | Required | Description | Default |
|---|---|---|---|
| themeName | No | Optional specific theme name (e.g., 'butter', 'neutral', 'defineTheme', 'gothic', 'matcha', 'y2k') |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the behavioral disclosure burden. 'Get details' clearly signals a read-only operation, and the scope of the output is defined by the listed themes and defineTheme syntax. It does not describe behavior when themeName is omitted, but this is a minor gap for a getter with one optional parameter.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, front-loaded sentence with no wasted words. It immediately states the purpose, lists the relevant theme names, and includes the defineTheme alternative without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with one optional parameter and no output schema, the description covers the core purpose and parameter values well. The only notable omission is what happens when themeName is absent, but the schema already marks it optional, and the overall context is sufficient for a simple retrieval tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, setting a baseline of 3. The description goes slightly beyond the schema by clarifying that the listed values are theme names and that defineTheme refers to CSS custom property syntax, which adds useful semantic context for selecting a value.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb ('Get details'), a specific resource ('Astryx themes'), and enumerates the exact theme names plus the custom defineTheme syntax. This makes the tool's purpose unambiguous and clearly distinct from siblings that handle components or CLI commands.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use the tool: when you need Astryx theme details or defineTheme syntax. However, it provides no explicit guidance on alternatives, such as search_astryx_docs, or exclusions that would help an agent choose between siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_astryx_docsB
Search across Meta Astryx design system documentation, guides, components, and API references.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search keyword or phrase (e.g., 'Button', 'defineTheme', 'StyleX', 'CLI', 'asChild') |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so the description carries the full burden. It only states that the tool searches across docs; it doesn't say whether results are snippets, ranked lists, or full documents, nor what happens with no matches or ambiguous queries.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
One short sentence, no filler, no repetition of the schema. It is easy to parse and front-loaded with the core purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a one-parameter search tool the description is minimally adequate, but it lacks output/result details and sibling-routing guidance, and there is no output schema or annotations to fill those gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema already documents the query parameter at 100% coverage with concrete examples. The description adds no further parameter semantics beyond the tool's broad scope, so baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States the verb 'search' and the resource 'Meta Astryx design system documentation, guides, components, and API references.' It is clearly a search operation, but it doesn't explicitly distinguish itself from the sibling get_ tools beyond implying breadth.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool instead of get_astryx_component, get_theme_guide, or get_cli_commands. The description implies a broad fallback, but an agent isn't told whether to prefer a targeted getter when the target is known.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
v1.0.0- First observed
get_astryx_component - First observed
get_cli_commands - First observed
get_theme_guide - First observed
search_astryx_docs
TDQS
Scored across 4 tools
Each tool targets a distinct area of the documentation: broad search, component details, theme syntax, and CLI commands. There is no meaningful overlap between the four tools.
Tool names follow a clear verb-first pattern, using `search_` for the lookup tool and `get_` for the three resource-specific tools. Minor inconsistency comes from only some tools including the 'astryx' prefix, but the structure is still predictable.
Four tools is a well-scoped set for a documentation MCP server, covering search plus the three primary documented areas: components, themes, and CLI. Each tool serves a distinct purpose without unnecessary redundancy.
The tool surface covers the main ways someone would interact with Astryx documentation: searching, component reference, theme customization, and CLI usage. A potential gap is the absence of a direct `get_guide` tool for retrieving a full guide article, but the search tool mitigates that.
Maintenance
Related MCP Connectors
The documentation, as a tool your agent can call: 950+ AI-dev guides. Search + fetch tools.
Access and maintain design system docs, tokens, components, skills, and contexts across any project.
Versioned documentation registry and semantic search for AI tools and coding assistants.
Tailor Platform for AI assistants: search, list and read the platform documentation.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI models to interact with Astro projects by providing runtime information, documentation search, route listing, and integration details.61MIT
- AlicenseNot gradedqualityDmaintenanceProvides AI agents with component documentation, usage examples, and design tokens from the WordPress Design System, enabling them to follow the latest design system guidance for creating user interfaces.267 npmGPL 2.0
- AlicenseNot gradedqualityBmaintenanceProvides a real API for coding agents to look up design system components, props, and tokens, preventing guessed answers.9MIT
- FlicenseNot gradedqualityBmaintenanceEnables intent-based semantic search over external design system documentation, allowing MCP-compatible AI assistants to retrieve relevant design tokens, component architectures, and code patterns via a single tool.-