Skip to content

MCP automation

The Ghost Bakery MCP server lets an AI assistant inspect reference data, validate and preview GBDDL, infer a recipe from a sample, request an exact cost, create a job and follow its result. It is a thin client of the HTTP API, so validation, pricing and limits are the same as in Chef. Consult the recipe language, output formats and credit model for the supported syntax and behavior.

API key

Every connection authenticates with an API key. Create one in Chef under Account → API keys (the link signs you in and opens that page; new here? sign up first) and give it only the scopes the assistant needs:

  • recipes:read and recipes:write for saved recipes.
  • catalog:read for catalog listing and exports.
  • generate for paid outputs, and jobs:read to follow them.

A key can also carry a credit cap. The API enforces scopes and caps on every call; a missing scope comes back as an error that names it. Keep keys out of recipes and conversations.

Hosted endpoint

The quickest setup needs no install. Point a client that supports Streamable HTTP at:

text
https://mcp.ghostbakery.com/mcp

and send the key on every request as Authorization: Bearer <your-api-key>. The endpoint is stateless and keeps no key of its own.

Claude Code:

sh
claude mcp add --transport http ghostbakery https://mcp.ghostbakery.com/mcp \
  --header "Authorization: Bearer <your-api-key>"

Cursor (~/.cursor/mcp.json):

json
{
  "mcpServers": {
    "ghostbakery": {
      "url": "https://mcp.ghostbakery.com/mcp",
      "headers": { "Authorization": "Bearer <your-api-key>" }
    }
  }
}

VS Code (.vscode/mcp.json):

json
{
  "servers": {
    "ghostbakery": {
      "type": "http",
      "url": "https://mcp.ghostbakery.com/mcp",
      "headers": { "Authorization": "Bearer <your-api-key>" }
    }
  }
}

Web connectors in claude.ai and ChatGPT require OAuth sign-in, which the server does not offer; use a desktop or IDE client instead.

Local binary

The ghostbakery-mcp executable runs the same server on your machine over stdio. Download it for your platform from the GitHub releases, or run the ghcr.io/miguelpragier/ghostbakery-mcp image. ghostbakery-mcp -version prints the installed version.

The client launches the executable with GHOSTBAKERY_API_KEY set. GHOSTBAKERY_API_URL optionally overrides the default API URL. Claude Desktop (claude_desktop_config.json):

json
{
  "mcpServers": {
    "ghostbakery": {
      "command": "/path/to/ghostbakery-mcp",
      "env": { "GHOSTBAKERY_API_KEY": "<your-api-key>" }
    }
  }
}

To host your own HTTP endpoint, start it with -http 127.0.0.1:8080; the MCP path is /mcp, and each request supplies its own key in the Authorization bearer header, as with the hosted endpoint.

Available tools

  • Reference/catalog discovery: ghostbakery_get_reference (section=limits returns the effective limits), ghostbakery_list_catalog.
  • Authoring: ghostbakery_validate_recipe, ghostbakery_preview_recipe, ghostbakery_infer_recipe. When the shared preview queue is busy, these wait up to a minute and then return an id; read it later with ghostbakery_get_preview or ghostbakery_get_inference.
  • Saved recipes: ghostbakery_list_recipes, ghostbakery_get_recipe, ghostbakery_save_recipe, ghostbakery_delete_recipe.
  • Paid outputs: ghostbakery_generate, ghostbakery_create_pdf, ghostbakery_export_catalog.
  • Results: ghostbakery_get_job, ghostbakery_list_jobs. A job with status held stopped because of us and keeps its credits and inputs: ghostbakery_retry_job runs it again free, ghostbakery_cancel_job refunds it under the credit refund rules.
  • Purchases: ghostbakery_buy_credits.

Recipe tools default to GBDDL text and accept canonical JSON with input_format=json. ghostbakery_infer_recipe reads a JSON sample by default, or a CSV/TSV file with input_format set to csv or tsv; see Import a sample. Inference uses column names and value shapes, and never copies sample values into the recipe. The local MCP server cuts the sample to its first 20 rows and canonicalizes the values on your machine before sending; the remote server receives what the caller sends, and the API cuts it to the same limit and deletes it after inference. Use the local server for sensitive samples, or canonicalize them yourself and send only a few rows; see Private samples.

Resources

The server also exposes read-only resources an assistant can load before writing a recipe:

  • ghostbakery://reference: every field type with a one-line summary, and how to look one up in full.
  • ghostbakery://examples/<name>: complete example recipes (people-csv, orders-json, access-log-jsonl, related-values, unique-codes).

Generation requires an explicit max_cost based on the validation quote. Asking for the same recipe again is safe: while one of your jobs with the same recipe, uploads and output is queued, running or still stored, the tool returns it with reused true and charges nothing; its text says "Existing result, not regenerated, no charge". Set regenerate only when you want new data; it charges again and keeps the earlier result until it expires. Once the earlier result is no longer stored, the same recipe runs and charges again (outcome recharged). ghostbakery_export_catalog follows the same rule for catalog extracts, with regenerate for new rows. ghostbakery_list_jobs lists earlier jobs with their expiry and whether they can still be downloaded. Poll jobs to completion and retrieve the result link.

Buying credits

The ghostbakery_buy_credits tool lists the credit packs when called without a pack, and returns a checkout link when called with a pack name and quantity. The assistant cannot pay: it gives you the link, you pay in the browser, and the credits arrive once the payment is confirmed. Creating the link charges nothing and needs no particular key scope.

Assistants without MCP

Any assistant can still learn GBDDL from the documentation: give it llms-full.txt, the complete docs as one plain-text file, and paste the recipe it writes into Chef.