Replay Recipes
← Back to API Docs
MCP Server

MCP Integration

Connect any AI assistant to Replay Recipes. Ask for a recipe and it gets parsed, saved, and ready to cook in the app — no copy-pasting.

How It Works

1

AI generates recipe

You ask: "Give me a recipe for pad thai"

2

MCP imports it

The import_recipe tool parses the text and saves it to Replay Recipes

3

Open in app

Click the link to cook step-by-step with timers and scaling

Hosted MCP Server

We host an MCP server you can connect to directly — no code, no install, no API key required.

Server URL

https://www.replayrecipes.com/api/mcp

Streamable HTTP transport · Stateless · One tool: import_recipe

Claude Desktop

Add to your claude_desktop_config.json:

claude_desktop_config.json
{
  "mcpServers": {
    "replay-recipes": {
      "type": "url",
      "url": "https://www.replayrecipes.com/api/mcp"
    }
  }
}

Claude Code

claude mcp add replay-recipes https://www.replayrecipes.com/api/mcp

Cursor / Other MCP Clients

Add a remote MCP server with the URL above. Most clients support Streamable HTTP transport — just paste the URL.

Try it

Once connected, ask your AI assistant:

“Give me a recipe for chicken tikka masala and import it into Replay Recipes.”

“Create a 30-minute weeknight pasta recipe and save it to Replay.”

Build Your Own

Want more control? Build a local MCP server that wraps our Import API. This lets you add custom logic, use your own API key for higher rate limits, or integrate with other tools.

index.ts
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { z } from "zod";

const server = new McpServer({
  name: "replay-recipes",
  version: "1.0.0",
});

const API_URL = "https://www.replayrecipes.com/api/import";
const API_KEY = process.env.REPLAY_RECIPES_API_KEY; // optional

server.tool(
  "import_recipe",
  "Import a recipe into Replay Recipes. Returns a deep link URL.",
  {
    recipe_text: z
      .string()
      .min(50)
      .describe("Full recipe text with title, ingredients, and instructions"),
  },
  async ({ recipe_text }) => {
    const headers: Record<string, string> = {
      "Content-Type": "text/plain",
      "X-Source": "mcp-server",
    };
    if (API_KEY) headers["X-API-Key"] = API_KEY;

    const response = await fetch(API_URL, {
      method: "POST",
      headers,
      body: recipe_text,
    });
    const data = await response.json();

    if (!data.success) {
      return {
        content: [{ type: "text", text: `Error: ${data.error}` }],
        isError: true,
      };
    }

    return {
      content: [
        {
          type: "text",
          text: `Recipe "${data.recipe.title}" imported!\n\nOpen: ${data.url}`,
        },
      ],
    };
  }
);

const transport = new StdioServerTransport();
await server.connect(transport);

Setup

mkdir replay-recipes-mcp && cd replay-recipes-mcp
npm init -y
npm install @modelcontextprotocol/sdk zod

Claude Desktop config

{
  "mcpServers": {
    "replay-recipes": {
      "command": "npx",
      "args": ["tsx", "/path/to/replay-recipes-mcp/index.ts"],
      "env": {
        "REPLAY_RECIPES_API_KEY": "rr_your_key_here"
      }
    }
  }
}

Tool Reference

import_recipe

Parses plain text into a structured recipe with ingredients nested in steps, timers, dietary tags, and scaling. Saves to Replay Recipes and returns a deep link.

Parameters

NameTypeDescription
recipe_textstringFull recipe text (min 50 chars). Include title, ingredients, and instructions.

Returns

Recipe title, servings, prep/cook time, dietary tags, and a deep link URL that opens the recipe in the Replay Recipes app.