Skip to main content
Glama
Astryx Documentation MCP Server

Astryx Documentation MCP Server

Astryx Documentation MCP Server & AI Agent Skill

A comprehensive Model Context Protocol (MCP) server and AI Agent Skill for the Meta Astryx Design System. This project indexes scraped documentation, component specifications, StyleX guides, and CLI references, exposing structured tools and prompt guidelines for AI assistants and coding agents (Claude Desktop, Cursor, Project IDX, Gemini CLI, Antigravity, Windsurf).


πŸš€ Features & MCP Tools

The MCP server exposes four tools over stdio:

  1. search_astryx_docs

    • Description: Full-text and keyword search across all Astryx documentation, guides, and component APIs.

    • Parameters: query: string (e.g., 'Button', 'defineTheme', 'StyleX', 'asChild').

  2. get_astryx_component

    • Description: Retrieve usage guidelines, prop interfaces, imports, and code examples for a specific component.

    • Parameters: componentName: string (e.g., 'Button', 'AppShell', 'Table', 'Avatar', 'Dialog', 'Input').

  3. get_theme_guide

    • Description: Retrieve information on the 6 built-in themes (Neutral, Butter, Stone, Gothic, Y2K, Matcha), CSS variable design tokens, and custom theme definitions with defineTheme.

    • Parameters: themeName?: string (e.g., 'butter', 'neutral', 'defineTheme').

  4. get_cli_commands

    • Description: Documentation for @astryxdesign/cli and commands (init, doctor, template, manifest, theme build, swizzle).

    • Parameters: command?: string (e.g., 'init', 'doctor', 'template', 'manifest', 'theme build', 'swizzle').


Related MCP server: WordPress Design System MCP Server

πŸ€– Astryx Agent Skill (astryx-skill)

Located in astryx-skill/SKILL.md, this skill provides authoritative coding patterns and rules:

  • Subpath Imports: import { Button } from '@astryxdesign/core/Button';

  • Cascade Layers: Enforces @import '@astryxdesign/core/astryx.css'; under @layer astryx-base.

  • StyleX Overrides: Uses StyleX via xstyle prop instead of arbitrary inline styles.

  • Theme Provider: Standardized <Theme mode="system" theme={neutralTheme}> application structure.


🌐 Interactive Intro Website

An interactive presentation website is included in index.html, featuring:

  • Live Theme Explorer: Test the 6 Astryx design themes (Neutral, Butter, Stone, Gothic, Y2K, Matcha).

  • Component Playground: Interactive prop controls with real-time TSX code generation.

  • MCP Server Stdio Simulator: Interactive search tool test runner.

  • One-Click Publishing Matrix: Simple setup for GitHub Pages, Vercel, Netlify, and Cloudflare Pages.


πŸ› οΈ Getting Started

Prerequisites

  • Node.js >= 18.0.0

  • npm / pnpm / yarn

Installation

git clone https://github.com/georgemathunjaga/astryx-mcp-and-skill.git
cd astryx-mcp-and-skill
npm install

Build & Run

# 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

πŸ”Œ Connecting to AI IDEs & Clients

1. Claude Desktop

Add the following to your claude_desktop_config.json:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows: %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

Add to your project's .cursor/mcp.json or mcp.json:

{
  "mcpServers": {
    "astryx-docs": {
      "command": "node",
      "args": ["E:/workspace/public-repos/astryx-mcp/dist/index.js"]
    }
  }
}

πŸ“‚ Project Structure

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

πŸ“„ License

MIT

Available Tools

4 tools
get_astryx_componentB

Retrieve usage, props, imports, and code specifications for a specific Astryx component.

Inputs: componentName (required).

get_cli_commandsB

Get documentation for the @astryxdesign/cli tool and CLI commands (init, doctor, template, manifest, theme build, swizzle).

Inputs: command.

get_theme_guideA

Get details on Astryx themes (Neutral, Butter, Stone, Gothic, Y2K, Matcha) or custom defineTheme CSS custom property syntax.

Inputs: themeName.

search_astryx_docsB

Search across Meta Astryx design system documentation, guides, components, and API references.

Inputs: query (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 4 tools

    Disambiguation5/5

    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.

    Naming Consistency4/5

    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.

    Tool Count5/5

    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.

    Completeness4/5

    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.

    Related MCP Connectors

    Related MCP Servers