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:
search_astryx_docsDescription: Full-text and keyword search across all Astryx documentation, guides, and component APIs.
Parameters:
query: string(e.g.,'Button','defineTheme','StyleX','asChild').
get_astryx_componentDescription: Retrieve usage guidelines, prop interfaces, imports, and code examples for a specific component.
Parameters:
componentName: string(e.g.,'Button','AppShell','Table','Avatar','Dialog','Input').
get_theme_guideDescription: 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').
get_cli_commandsDescription: Documentation for
@astryxdesign/cliand commands (init,doctor,template,manifest,theme build,swizzle).Parameters:
command?: string(e.g.,'init','doctor','template','manifest','theme build','swizzle').
š¤ 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
xstyleprop 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 installBuild & 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.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
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