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

@cookwith/recipe-mcp

v1.0.4

Published

MCP server for AI-powered recipe generation and transformation

Downloads

61

Readme

Recipe MCP Server

An MCP (Model Context Protocol) server that provides AI-powered recipe generation and transformation tools. Generate personalized recipes based on dietary preferences, transform existing recipes to meet nutritional goals, and more.

Features

  • 🍳 Generate Recipes - Create custom recipes from natural language descriptions
  • 🔄 Transform Recipes - Modify existing recipes (make vegan, adjust calories, etc.)
  • 🥗 Dietary Support - Handle allergies, restrictions, and food preferences
  • 📊 Nutrition Goals - Target specific calorie and protein requirements
  • 🆓 Open Access - No API key required (rate limited)

Installation

For Claude Desktop

  1. Install the MCP server:
npm install -g @cookwith/recipe-mcp
  1. Add to your Claude Desktop configuration:
    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "recipe-mcp": {
      "command": "npx",
      "args": ["@cookwith/recipe-mcp"],
      "env": {
        "COOKWITH_API_URL": "https://cookwith.co"
      }
    }
  }
}
  1. Restart Claude Desktop

For Development

# Clone the repository
git clone https://github.com/cookwith/recipe-mcp.git
cd recipe-mcp

# Install dependencies
npm install

# Run in development mode
npm run dev

Usage Examples

Generate a Recipe

// In Claude Desktop, you can say:
"Generate a healthy Mediterranean pasta dish with lots of vegetables"

// The tool will be called with:
{
  "prompt": "A healthy Mediterranean pasta dish with lots of vegetables",
  "dietaryRestrictions": ["vegetarian"],
  "calories": "450",
  "servings": 4
}

Transform a Recipe

// After generating or providing a recipe:
"Make this recipe vegan and reduce the calories by 200"

// The tool will be called with:
{
  "recipe": { /* existing recipe object */ },
  "instructions": "Make this vegan and reduce calories by 200",
  "calories": "350"
}

Tools

generate_recipe

Generate a new recipe based on natural language instructions.

Parameters:

  • prompt (string, required) - Natural language description
  • dietaryRestrictions (string[], optional) - e.g., ["vegetarian", "gluten-free"]
  • allergies (string[], optional) - Ingredients to avoid
  • dislikes (string[], optional) - Foods to exclude
  • calories (string, optional) - Target calories per serving
  • protein (string, optional) - Target protein in grams
  • servings (number, optional) - Number of servings (1-20, default: 4)

transform_recipe

Transform an existing recipe based on instructions.

Parameters:

  • recipe (object, required) - The recipe to transform
  • instructions (string, required) - How to modify the recipe
  • calories (string, optional) - New target calories
  • protein (string, optional) - New target protein
  • servings (number, optional) - New number of servings

Rate Limits

The public API has the following rate limits:

  • Anonymous Access: 20 requests per hour per IP address
  • No authentication required
  • Retry-After header provided when limit exceeded

Recipe Object Format

interface Recipe {
  title: string;
  description: string;
  ingredients: string[];      // e.g., ["2 cups flour", "1 tsp salt"]
  instructions: string[];      // Step-by-step instructions
  servings: number;
  prepTime?: number;          // Minutes
  cookTime?: number;          // Minutes
  totalTime?: number;         // Minutes
  cuisine?: string;           // e.g., "Italian", "Mexican"
  course?: string;            // e.g., "main", "dessert"
  difficulty?: string;        // e.g., "easy", "medium", "hard"
  calories?: number;          // Per serving
  protein?: number;           // Grams per serving
  carbs?: number;            // Grams per serving
  fat?: number;              // Grams per serving
  fiber?: number;            // Grams per serving
  sugar?: number;            // Grams per serving
  sodium?: number;           // Milligrams per serving
}

Configuration

Environment Variables

  • COOKWITH_API_URL - API endpoint (default: https://cookwith.co)

Custom API Endpoint

For development or self-hosted instances:

export COOKWITH_API_URL=http://localhost:3000
npx @cookwith/recipe-mcp

Examples

Basic Recipe Generation

// Request
{
  "prompt": "Quick and easy chicken stir-fry"
}

// Response
{
  "title": "Quick Chicken Stir-Fry",
  "description": "A delicious and speedy chicken stir-fry...",
  "ingredients": [
    "2 chicken breasts, sliced",
    "2 cups mixed vegetables",
    "3 tbsp soy sauce",
    // ...
  ],
  "instructions": [
    "Heat oil in a large wok or skillet",
    "Add chicken and cook until golden",
    // ...
  ],
  "servings": 4,
  "prepTime": 10,
  "cookTime": 15,
  "calories": 320,
  "protein": 28
}

Recipe Transformation

// Request
{
  "recipe": {
    "title": "Classic Beef Lasagna",
    "ingredients": ["1 lb ground beef", "ricotta cheese", ...],
    // ... full recipe
  },
  "instructions": "Make this vegetarian and lower in calories"
}

// Response
{
  "title": "Vegetarian Light Lasagna",
  "description": "A healthier vegetarian version...",
  "ingredients": [
    "2 cups chopped mushrooms",
    "1 cup low-fat ricotta",
    // ... transformed ingredients
  ],
  // ... rest of transformed recipe
}

Troubleshooting

Rate Limit Errors

If you receive a 429 error, you've exceeded the rate limit. Wait for the time specified in the retryAfter field before making another request.

Connection Issues

Ensure your internet connection is stable and the API endpoint is accessible.

Invalid Parameters

Check that your parameters match the expected format and constraints (e.g., servings between 1-20).

Contributing

Contributions are welcome! Please see our Contributing Guide for details.

License

MIT License - see LICENSE file for details.

Support

Powered By