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

dooi-mcp

v1.0.4

Published

MCP server for safely consuming dooi templates/components

Downloads

116

Readme

dooi-mcp

A Model Context Protocol (MCP) server for safely consuming and installing dooi-ui templates and components. This server enables AI assistants to fetch, install, and customize UI components and templates with intelligent dependency management.

Features

  • 🚀 One-shot workflows - Complete template/component installation with single commands
  • 🔄 Smart dependency resolution - Automatic detection and installation of component dependencies
  • 📦 Batch operations - Install multiple components efficiently
  • ✏️ Text customization - Brand name replacements and text edits with AST awareness
  • 🛡️ Safe installation - Preview mode, conflict resolution, and dry-run support
  • 🎯 Path strategies - Built-in support for Next.js App Router, Vite React, and custom paths

Installation

npm install -g dooi-mcp

Usage with Claude Desktop

Add to your Claude Desktop configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%/Claude/claude_desktop_config.json

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

Restart Claude Desktop to load the MCP server.

Usage with Cursor

To set up the dooi-mcp server in Cursor:

  1. Create or edit mcp.json in one of these locations:

    • Project-level: <project-root>/.cursor/mcp.json
    • Global: ~/.cursor/mcp.json (macOS/Linux) or %USERPROFILE%\.cursor\mcp.json (Windows)
  2. Add the server configuration (recommended - uses npx, no global install needed):

    {
      "mcpServers": {
        "dooi": {
          "command": "npx",
          "args": ["-y", "dooi-mcp@latest"]
        }
      }
    }
  3. Alternative: Global installation:

    npm install -g dooi-mcp

    Then configure:

    {
      "mcpServers": {
        "dooi": {
          "command": "dooi-mcp"
        }
      }
    }
  4. For local development:

    {
      "mcpServers": {
        "dooi": {
          "command": "node",
          "args": ["${workspaceFolder}/dooi-mcp/dist/server.js"]
        }
      }
    }
  5. Restart Cursor to load the MCP server

  6. Verify:

    • The dooi-mcp server should appear in Cursor's MCP servers list
    • 9 tools should be available for use by the AI

For more information, see the official Cursor MCP documentation.

Usage with Other MCP Clients

The server communicates via stdio and follows the MCP protocol specification. Launch with:

npx dooi-mcp

Available Tools

🚀 Recommended Workflows

dooi_workflow_applyTemplate

One-shot template installation workflow - perfect for getting started with complete project templates.

Parameters:

  • id (required): Template ID from dooi-ui
  • destRoot (required): Destination project root directory
  • brand (optional): Brand name for text replacements
  • pathStrategy (optional): 'next-app' | 'vite-react' - Path resolution strategy
  • pathMap (optional): Custom path mapping object
  • editPlan (optional): Text edit plan for customizations
  • autoDeps (optional): Auto-install npm dependencies (default: true)

Example:

{
  "id": "landing-hero-1",
  "destRoot": "/path/to/project",
  "brand": "Acme Inc",
  "pathStrategy": "next-app",
  "autoDeps": true
}

dooi_workflow_applyComponent

Fast component installation workflow - great for individual UI components.

Parameters: Same as dooi_workflow_applyTemplate

Example:

{
  "id": "button-primary",
  "destRoot": "/path/to/project",
  "pathStrategy": "vite-react"
}

🔧 Core Tools

dooi_list

Enumerate all available templates and components from dooi-ui.

Parameters: None

Returns: List of available templates/components with metadata


dooi_fetch

Fetch a template/component into a staging directory for inspection or manual installation.

Parameters:

  • id (required): Template/component ID
  • ref (optional): Git reference/version
  • options (optional): Fetch options (timeout, environment variables)

Returns: Staging directory path and metadata


dooi_resolve_uses

Analyze a staged component to discover additional required dependencies.

Parameters:

  • stageDir (required): Path to staging directory

Returns: Array of additional component IDs needed


dooi_fetchBatch

Fetch multiple components/templates in a single operation.

Parameters:

  • ids (required): Array of component/template IDs

Returns: Array of staging results


dooi_install

Copy files from staging directory to project with conflict resolution.

Parameters:

  • stageDir (required): Path to staging directory
  • destRoot (required): Destination project root
  • pathMap (optional): Path mapping configuration
  • include (optional): File patterns to include
  • exclude (optional): File patterns to exclude
  • mode (optional): 'skip' | 'overwrite' | 'rename' - Conflict resolution
  • dryRun (optional): Preview mode without actual changes

Returns: Installation results with file operations


dooi_textEdit

Perform text replacements while preserving code structure using AST analysis.

Parameters:

  • destRoot (required): Project root directory
  • plan (required): Edit plan object
    • include: File patterns to include
    • exclude: File patterns to exclude
    • replacements: Array of replacement specs
      • find: Exact string to find
      • findRegex: Regex pattern to find
      • replaceWith: Replacement text
    • options:
      • dryRun: Preview mode
      • limitChangedFiles: Maximum files to change
      • previewContextLines: Context lines for preview

Example:

{
  "destRoot": "/path/to/project",
  "plan": {
    "include": ["**/*.tsx", "**/*.ts"],
    "exclude": ["**/node_modules/**"],
    "replacements": [
      {
        "find": "OldBrandName",
        "replaceWith": "NewBrandName"
      }
    ],
    "options": {
      "dryRun": false
    }
  }
}

dooi_installDeps

Install npm packages using the project's package manager.

Parameters:

  • cwd (required): Working directory
  • packages (required): Array of package names
  • pm (optional): 'npm' | 'yarn' | 'pnpm' - Package manager (auto-detected)
  • flags (optional): Additional CLI flags

Example:

{
  "cwd": "/path/to/project",
  "packages": ["react", "react-dom"],
  "pm": "npm"
}

Resources

The server exposes dooi-ui templates and components as MCP resources with URI scheme:

dooi://template/<template-id>
dooi://component/<component-id>

Prompts

Pre-configured prompts for common workflows:

  • install-template: Guided template installation
  • install-component: Guided component installation
  • customize-text: Text customization workflow

Development

Local Development

# Clone repository
git clone <repository-url>
cd dooi-mcp

# Install dependencies
npm install

# Build
npm run build

# Run in development mode
npm run dev

Testing

npm test
npm run test:coverage

Project Structure

dooi-mcp/
├── src/
│   ├── server.ts                 # MCP server entry point
│   ├── adapters/mcp/             # MCP protocol adapters
│   ├── capabilities/             # MCP capabilities
│   │   ├── tools/                # Tool implementations
│   │   ├── resources/            # Resource providers
│   │   └── prompts/              # Prompt templates
│   ├── core/                     # Core business logic
│   │   ├── install.ts            # Installation engine
│   │   ├── workflow.ts           # Workflow orchestration
│   │   ├── errors.ts             # Error handling
│   │   └── logger.ts             # Logging
│   └── edits/                    # Text editing with AST
└── dist/                         # Compiled output

Requirements

  • Node.js >= 18.0.0
  • npm/yarn/pnpm

License

MIT

Author

David Im

Contributing

Contributions welcome! Please read the contributing guidelines before submitting PRs.

Support

For issues and questions: