A Model Context Protocol (MCP) server for the AxionJS component library, providing AI assistants and developer tools with a unified API to discover, install, and generate code using AxionJS components, themes, and utilities.
- 🔍 Component Discovery: Search and browse available components across all registry types
- 📦 Dependency Resolution: Automatically resolve component dependencies
- 🛠️ Code Generation: Generate customized component code
- 📄 Page Templates: Create complete pages using multiple components
- 🎨 Theme Management: Apply and customize themes
- 📊 Metadata Access: Get detailed component information
- 🔄 Unified Registry: Single endpoint for all component types (ui, theme, hook, block, dynamic-component, lib, component, page, file, actions, api, auth_comp, email, middleware, schemas)
- 🎯 Type Safety: Full TypeScript support with proper type definitions
Install via npm and configure in your MCP client:
npm install -g axionsjs-mcp-serverThen add to your MCP configuration:
{
"mcpServers": {
"axionsjs-mcp-server": {
"command": "npx",
"args": ["-y", "axionsjs-mcp-server@latest"]
}
}
}- Clone this repository
- Install dependencies:
npm install
- Build the MCP server:
npm run build:mcp
- Start the MCP server:
npm run start:mcp
get_component_list- List all available componentsget_component_metadata- Get detailed component informationsearch_components- Search components by name/descriptioninstall_components- Generate installation commandsget_items— List all registry items (including themes, blocks, etc.)
generate_component_code- Generate customized component codecreate_page_with_components- Generate complete pagesresolve_dependencies- Resolve component dependency trees
init_axions_project- Initialize new projectsget_styles- List available style variantsapply_theme- Generate theme configurationsget_themes- List all available themesget_theme_details- Get detailed information about a specific theme
The MCP server connects to your AxionJS registry. Set the registry URL via environment variable:
AXIONJS_REGISTRY_URL=https://www.axionjs.com/Default: http://localhost:3000
Add to your claude_desktop_config.json:
{
"mcpServers": {
"axionsjs-mcp-server": {
"command": "npx",
"args": ["-y", "axionsjs-mcp-server@latest"],
"env": {
"AXIONJS_REGISTRY_URL": "https://www.axionjs.com/"
}
}
}
}Some Node.js tools, libraries, rely on APPDATA for storing or reading config/cache.
On Windows, APPDATA is usually set by the OS, but in some CI/CD, Docker, or cross-platform environments, it may be missing or need to be set explicitly.
if you happen to face issue relevant to APPDATA variable not found, add the following environment variable to your configuration
Example (in Claude Desktop or MCP config):
{
"mcpServers": {
"axionsjs-mcp-server": {
"command": "npx",
"args": ["-y", "axionsjs-mcp-server@latest"],
"env": {
"AXIONJS_REGISTRY_URL": "https://www.axionjs.com/",
"APPDATA": "C:\\Users\\YourUser\\AppData\\Roaming"
}
}
}
}Open Command Prompt and run:
echo %APPDATA%This will print the path you can use in your configuration file using the format used in above example.
For other MCP-compatible clients, use:
npx axionsjs-mcp-server@latest- Clone this repository
- Install dependencies:
npm install - Build the server:
npm run build:mcp - Start your local registry on port 3000
- Run the MCP server:
npm run start:mcp
# Build and test locally
npm run build:mcp
node dist/mcp/server.js
# Test as installed package
npm pack
npm install -g axionsjs-mcp-2.1.1.tgz
axionsjs-mcpThe server expects your AxionJS registry to provide:
/registry.json- Main component index/r/styles/[style]/[component].json- Individual components/r/styles/index.json- Available styles/r/themes/index.json- Available themes
- Fork the repository
- Create a feature branch
- Make your changes
- Build and test:
npm run build:mcp - Submit a pull request