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

stitch-mcp-server

v1.0.7

Published

Enterprise-ready MCP Server for Google Stitch SDK - AI-powered UI generation for Claude, Cursor, Cline, and VS Code. Generate beautiful web interfaces from text prompts using Model Context Protocol.

Readme

Stitch MCP Server

npm version npm downloads License: MIT Node.js Version CI

Enterprise-ready Model Context Protocol (MCP) server for Google Stitch SDK — Generate beautiful web UIs from text prompts using AI.

The Stitch MCP Server bridges your AI coding assistant (Claude, Cursor, Cline, Copilot, etc.) with Google's Stitch UI Generation API. Design, generate, and scaffold production-ready HTML components directly into your workspace using natural language.


Features

| Feature | Description | |---------|-------------| | AI UI Generation | Generate complete HTML screens from text descriptions | | Edit and Iterate | Modify existing screens with natural language prompts | | Design Variants | Generate multiple design variations to explore options | | Auto-Scaffold | Save generated UI directly to your project files | | Multi-Client Support | Works with Claude Desktop, Cursor, Cline (VS Code), and any MCP client | | One-Click Setup | Interactive installer configures everything automatically |


Quick Start

Prerequisites

  • Node.js 18.0.0 or higher
  • Stitch API KeyGet one here (sign in with Google)

Installation (30 seconds)

Run the interactive setup wizard:

npx stitch-mcp-server setup

This will:

  1. Ask which AI tools you want to configure (Claude, Cursor, Cline)
  2. Prompt for your Stitch API key
  3. Automatically update your MCP configuration files
  4. Done - restart your AI tool and start generating UIs

Manual Configuration

If you prefer manual setup, add this to your MCP config file:

{
  "mcpServers": {
    "stitch": {
      "command": "npx",
      "args": ["-y", "stitch-mcp-server@latest"],
      "env": {
        "STITCH_API_KEY": "your-api-key-here"
      }
    }
  }
}
{
  "mcpServers": {
    "stitch": {
      "command": "npx",
      "args": ["-y", "stitch-mcp-server@latest"],
      "env": {
        "STITCH_API_KEY": "your-api-key-here"
      }
    }
  }
}
{
  "mcpServers": {
    "stitch": {
      "command": "npx",
      "args": ["-y", "stitch-mcp-server@latest"],
      "env": {
        "STITCH_API_KEY": "your-api-key-here"
      }
    }
  }
}

Available Tools

Core Tools

| Tool | Description | Example Prompt | |------|-------------|----------------| | create_project | Create a new Stitch project | "Create a project called 'My App'" | | list_projects | List all your projects | "Show my Stitch projects" | | generate_screen | Generate a UI from description | "Create a login page with email and password" | | edit_screen | Modify an existing screen | "Make the background dark and add a sidebar" | | generate_variants | Create design alternatives | "Show me 3 different color schemes" |

Advanced Tools

| Tool | Description | Use Case | |------|-------------|----------| | get_screen_code | Fetch HTML source code | Get the raw HTML for a generated screen | | get_screen_image | Get screenshot URL | Preview the generated design | | generate_and_fetch_code | Generate + fetch in one call | Streamlined workflow for quick prototyping | | scaffold_project_files | Save HTML to local files | Export directly to src/components/ |

Resources

  • stitch://projects — List all projects as context
  • stitch://projects/{id}/screens — List screens in a project

Prompts

  • create_web_app — Guided workflow to build a complete web app from idea to scaffolded files

Usage Examples

Generate a Landing Page

Create a modern landing page for a SaaS product with:
- Hero section with headline and CTA button
- Features grid with 3 columns
- Testimonials carousel
- Footer with links

Create a Dashboard

Generate an admin dashboard with:
- Sidebar navigation
- Stats cards at the top
- Data table with pagination
- Dark mode theme

Edit an Existing Design

Take the login screen and:
- Add social login buttons (Google, GitHub)
- Make it mobile responsive
- Add a "Remember me" checkbox

Local Development

# Clone the repo
git clone https://github.com/0x-Professor/Stitch-mcp-server.git
cd Stitch-mcp-server

# Install dependencies
npm install

# Build
npm run build

# Run locally
STITCH_API_KEY=your-key npm start

Running Tests

STITCH_API_KEY=your-key npm test

Tech Stack


Security

This server implements several security measures:

  • Path Traversal Protection — Prevents writing files outside your workspace
  • Input Validation — All inputs validated with Zod schemas
  • Secure Config Storage — API keys stored with restricted file permissions (0600)
  • HTTP Response Validation — Proper error handling for all network requests

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

MIT - 0x-Professor


Links