> ## Documentation Index
> Fetch the complete documentation index at: https://docs.craveup.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Use the CraveUp MCP Server

> Connect AI agents to CraveUp tools for storefront setup, menu import, readiness checks, and go-live onboarding.

<Warning>
  The CraveUp MCP server is an agent-facing developer tool. It can create or update restaurant setup data when authenticated, so connect it only in workspaces where the agent is allowed to make those changes.
</Warning>

CraveUp provides a Model Context Protocol server through the `@craveup/mcp` package. It lets AI agents use Crave-specific tools instead of guessing API shapes from memory.

Use it when you want an agent to:

* inspect or import menus
* connect a storefront project to a Crave location
* check storefront readiness before launch
* configure location ordering settings
* work through go-live onboarding steps
* fetch Crave implementation guidance while building a storefront

## Setup

The MCP server runs over stdio. Use the public npm package for normal usage outside this monorepo, or point your client at the local repo build when testing unreleased tools.

### Cursor

Add this to your Cursor MCP configuration:

```json theme={null}
{
  "mcpServers": {
    "craveup": {
      "command": "npx",
      "args": ["-y", "@craveup/mcp"],
      "env": {
        "CRAVEUP_API_KEY": "crv_test_...",
        "CRAVEUP_LOCATION_ID": "loc_...",
        "CRAVEUP_BASE_URL": "https://api.craveup.com"
      }
    }
  }
}
```

Restart Cursor or reload the window after changing the MCP configuration.

<Note>
  Inside `craveup-turborepo`, pnpm workspace resolution can shadow the published package. If you are working in this repo, use the local repo build configuration below.
</Note>

### Codex

Add the server from the terminal:

```bash theme={null}
codex mcp add craveup \
  --env CRAVEUP_API_KEY=crv_test_... \
  --env CRAVEUP_LOCATION_ID=loc_... \
  --env CRAVEUP_BASE_URL=https://api.craveup.com \
  -- npx -y @craveup/mcp
```

If your Codex configuration uses TOML, add:

```toml theme={null}
[mcp_servers.craveup]
command = "npx"
args = ["-y", "@craveup/mcp"]

[mcp_servers.craveup.env]
CRAVEUP_API_KEY = "crv_test_..."
CRAVEUP_LOCATION_ID = "loc_..."
CRAVEUP_BASE_URL = "https://api.craveup.com"
```

### Claude Desktop

Add this to `~/Library/Application Support/Claude/claude_desktop_config.json`:

```json theme={null}
{
  "mcpServers": {
    "craveup": {
      "command": "npx",
      "args": ["-y", "@craveup/mcp"],
      "env": {
        "CRAVEUP_API_KEY": "crv_test_...",
        "CRAVEUP_LOCATION_ID": "loc_...",
        "CRAVEUP_BASE_URL": "https://api.craveup.com"
      }
    }
  }
}
```

Restart Claude Desktop after saving the file.

### Local repo build

Use this when you are working inside `craveup-turborepo` and need the newest MCP tools from source:

```bash theme={null}
pnpm --filter @craveup/mcp build
```

Then configure your MCP client to run the built CLI:

```json theme={null}
{
  "mcpServers": {
    "craveup": {
      "command": "node",
      "args": ["/absolute/path/to/craveup-turborepo/packages/mcp/dist/cli.js"],
      "env": {
        "CRAVEUP_API_KEY": "crv_test_...",
        "CRAVEUP_LOCATION_ID": "loc_...",
        "CRAVEUP_BASE_URL": "https://api.craveup.com"
      }
    }
  }
}
```

## Authentication

The MCP server supports two authentication modes.

| Mode                      | Use it for                                                                              | Required setup                                           |
| ------------------------- | --------------------------------------------------------------------------------------- | -------------------------------------------------------- |
| **Crave API key**         | Menu import, menu reads, product edits, and storefront readiness checks                 | Set `CRAVEUP_API_KEY`, and usually `CRAVEUP_LOCATION_ID` |
| **CraveUp login session** | Organization setup, project wiring, go-live onboarding, and dashboard-backed operations | Run `craveup login`, or set `CRAVEUP_ACCESS_TOKEN`       |

To create an API key, open Business Manager and go to [Dashboard > Developers > API Development > Step 1 - API Keys](/guides/generate-api-key). API keys are tied to an organization and may be restricted to specific locations; each MCP call still needs a target `locationId`.

<Note>
  Do not put production API keys in shared prompt text, screenshots, recordings, or public repository files. Pass credentials through the MCP client environment instead.
</Note>

## Available tools

Exact tool availability depends on the installed package version.

The current public npm package exposes these tool groups:

| Tool group              | Examples                                                                                                                                 | Purpose                                                                    |
| ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
| **Onboarding**          | `get_onboarding_flow`, `whoami`, `create_organization`, `connect_project`                                                                | Move a restaurant project from first setup to a connected Crave storefront |
| **Menu and storefront** | `import_menu`, `list_menus`, `get_product`, `update_product`, `set_product_availability`, `delete_product`, `check_storefront_readiness` | Import, inspect, edit, and verify storefront data                          |
| **Location settings**   | `get_location_settings`, `update_store_hours`, `set_takeout_enabled`, `open_location_for_orders`                                         | Fix ordering gates such as closed-store or unavailable pickup states       |
| **Go-live**             | `get_onboarding_status`, `set_location_address`, `set_fulfillment_methods`, `list_subscription_plans`, `start_subscription_checkout`     | Work through readiness and launch tasks                                    |
| **Guidance**            | `get_integration_guide`                                                                                                                  | Ask for Crave-specific implementation guidance while coding                |

The latest repo source may include additional tools before they are published to npm, such as `create_location`, `delete_location`, `list_locations`, `get_location_orders`, `list_customers`, `set_menu_active`, and `seed_sandbox_analytics`. Use the local repo build if you need those tools before the next package release.

## Example prompts

Once connected, ask your agent for Crave-specific work:

```text theme={null}
Use the CraveUp MCP server to inspect my current location, list active menus, and tell me whether this storefront can accept orders.
```

```text theme={null}
Use the CraveUp MCP server and the Crave docs to build a Next.js menu page with category tabs, cart state, checkout, and Stripe payment intent creation.
```

```text theme={null}
Import this menu into Crave. Preserve categories, products, prices, modifier groups, availability, and image URLs. After import, verify the active menu with list_menus.
```

## Faster setup with a prebuilt prompt

Use the prebuilt prompt when you want an AI agent to start with Crave Cloud, Crave.js, Storefront API, and MCP context already loaded.

<CardGroup cols={2}>
  <Card title="Use the storefront prompt" icon="message-square-code" href="/guides/ai/build-storefront-prompt">
    Copy a ready-to-use agent prompt for building a Crave-powered storefront.
  </Card>

  <Card title="Get an API key" icon="key-round" href="/guides/generate-api-key">
    Create the key and location ID your MCP server or storefront needs.
  </Card>
</CardGroup>

## Troubleshooting

| Problem                                     | Fix                                                                                 |
| ------------------------------------------- | ----------------------------------------------------------------------------------- |
| The agent cannot see CraveUp tools          | Restart the MCP client after changing configuration. In Cursor, reload the window.  |
| `No Crave session` appears                  | Run `craveup login`, or set `CRAVEUP_ACCESS_TOKEN` in the MCP server environment.   |
| Storefront tools fail with an auth error    | Set `CRAVEUP_API_KEY` and confirm the key is allowed to access the target location. |
| Menu tools use the wrong location           | Set `CRAVEUP_LOCATION_ID`, or pass `locationId` explicitly in the tool call.        |
| New tools do not appear after a repo update | Rebuild `@craveup/mcp`, then restart the MCP client.                                |
