npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@hydrogen-forge/mcp-hydrogen

v0.1.0

Published

Hydrogen scaffolding MCP server for Claude Code - component generation, route scaffolding, project analysis

Downloads

61

Readme

@hydrogen-forge/mcp-hydrogen

Hydrogen scaffolding MCP server for Claude Code. Generate components, routes, and analyze project structure.

Features

  • scaffoldComponent - Generate React/Hydrogen components with TypeScript types
  • scaffoldRoute - Generate React Router routes with loaders, actions, and GraphQL
  • analyzeProject - Analyze Hydrogen project structure and get recommendations

Installation

npm install @hydrogen-forge/mcp-hydrogen

Claude Code Configuration

Add to your Claude Code MCP settings (claude_desktop_config.json):

{
  "mcpServers": {
    "hydrogen": {
      "command": "npx",
      "args": ["@hydrogen-forge/mcp-hydrogen"]
    }
  }
}

Or if installed globally:

{
  "mcpServers": {
    "hydrogen": {
      "command": "mcp-hydrogen"
    }
  }
}

Tools

scaffoldComponent

Generate a new Hydrogen/React component with TypeScript types.

Parameters:

| Parameter | Type | Required | Default | Description | | ---------- | ------- | -------- | ---------------- | ---------------------------- | | name | string | Yes | - | Component name in PascalCase | | type | string | No | "basic" | Component type template | | props | array | No | [] | Custom props to add | | outputDir | string | No | "app/components" | Output directory | | withStyles | boolean | No | true | Include Tailwind CSS classes | | withTests | boolean | No | false | Generate test file |

Component Types:

  • basic - Simple functional component
  • product - Product card with image, price, link
  • collection - Collection card with overlay
  • cart - Cart line item with quantity controls
  • form - Form component with submission handling
  • layout - Layout wrapper with header/footer slots

Example:

{
  "name": "ProductCard",
  "type": "product",
  "props": [{ "name": "showVendor", "type": "boolean", "required": false }],
  "withStyles": true
}

scaffoldRoute

Generate a new React Router route with loader, action, and meta functions.

Parameters:

| Parameter | Type | Required | Default | Description | | ----------- | ------- | -------- | ------------ | ------------------------------------- | | name | string | Yes | - | Route name (e.g., "products.$handle") | | type | string | No | "page" | Route type template | | withLoader | boolean | No | true | Include loader function | | withAction | boolean | No | false | Include action function | | withMeta | boolean | No | true | Include meta function | | withGraphQL | boolean | No | false | Include GraphQL query template | | outputDir | string | No | "app/routes" | Output directory |

Route Types:

  • page - Standard page with loader/action/meta
  • resource - API-like route (no UI)
  • collection - Collection page with pagination
  • product - Product detail page with variants
  • account - Authenticated account page
  • api - API endpoint with method handling

Route Name Convention:

| Pattern | URL Path | Description | | -------------------- | ------------------- | ---------------- | | _index | / | Index route | | products.$handle | /products/:handle | Dynamic segment | | collections._index | /collections | Collection index | | api.webhook | /api/webhook | API endpoint | | [robots.txt] | /robots.txt | Escaped route |

Example:

{
  "name": "products.$handle",
  "type": "product",
  "withLoader": true,
  "withGraphQL": true
}

analyzeProject

Analyze a Hydrogen project structure and provide insights.

Parameters:

| Parameter | Type | Required | Default | Description | | ----------------- | ------- | -------- | ------- | ----------------------------- | | projectPath | string | No | "." | Path to project | | includeRoutes | boolean | No | true | Analyze routes | | includeComponents | boolean | No | true | Analyze components | | includeStyles | boolean | No | true | Analyze style configuration | | includeConfig | boolean | No | true | Analyze project configuration |

Returns:

{
  "projectPath": "/path/to/project",
  "isHydrogenProject": true,
  "hydrogenVersion": "^2024.10.0",
  "reactRouterVersion": "^7.0.0",
  "routes": [
    {
      "file": "products.$handle.tsx",
      "path": "/products/:handle",
      "hasLoader": true,
      "hasAction": false,
      "hasMeta": true,
      "hasGraphQL": true
    }
  ],
  "components": [
    {
      "file": "ProductCard.tsx",
      "name": "ProductCard",
      "hasProps": true,
      "propsInterface": "ProductCardProps",
      "imports": ["react-router", "@shopify/hydrogen"]
    }
  ],
  "styles": {
    "hasTailwind": true,
    "tailwindConfig": "tailwind.config.ts",
    "customClasses": ["bg-primary-*", "bg-secondary-*"]
  },
  "config": {
    "typescript": true,
    "eslint": true,
    "prettier": true,
    "packageManager": "pnpm"
  },
  "recommendations": ["Consider adding route: cart for a complete storefront"]
}

Usage Examples

Create a Product Card Component

Use the scaffoldComponent tool to create a ProductCard component with product type

Create a Collection Route

Use the scaffoldRoute tool to create a collections.$handle route with collection type and GraphQL

Analyze Current Project

Use the analyzeProject tool to analyze the current Hydrogen project

Generated Code Patterns

Components

All generated components follow these patterns:

  • TypeScript interfaces for props
  • Tailwind CSS utility classes
  • Shopify Hydrogen imports (Image, Money, etc.)
  • React Router Link for navigation

Routes

All generated routes follow these patterns:

  • Route types from ./+types/{routename}
  • loader function for data fetching
  • action function for form handling
  • meta function for SEO
  • GraphQL queries with #graphql tag

Development

# Install dependencies
npm install

# Build
npm run build

# Watch mode
npm run dev

# Type check
npm run typecheck

License

MIT