Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Record what the build changed against the MCP design
Damian Legawiec965d0623f865
diff --git a/docs/plans/6.0-mcp-server.md b/docs/plans/6.0-mcp-server.mdindex 0fdae70ee3..a085f847bc 100644--- a/docs/plans/6.0-mcp-server.md+++ b/docs/plans/6.0-mcp-server.md@@ -1,6 +1,6 @@# Admin MCP Server-**Status:** In Progress — Migration Path steps 1–5 (core registry, reporting tools, workflow tools and generic record writes, the `spree_mcp` gem, docs) are being built on `feat/spree-mcp-server`+**Status:** In Review — Migration Path steps 1–5 (core registry, reporting tools, workflow tools and generic record writes, the `spree_mcp` gem, docs) built on `feat/spree-mcp-server`, PR spree/spree#14664**Target:** Spree 6.0**Depends on:** `6.0-action-actors.md` (shipped 2026-09-16 — the API key is a valid actor, so a workflow run over MCP records who did it), `5.5-admin-api-cli.md` (shipped — the CLI-first precondition this plan waited on), `5.5-admin-api-key-scopes.md` (shipped — secret keys + scopes are the credential), `6.0-admin-rbac.md` (the permission catalog gates every tool), `6.0-analytics-semantic-layer.md` (the reporting registry feeds the reporting tools), `6.0-service-workflows.md` (writes execute through workflows), `6.0-dashboard-assistant.md` (moves onto the registry defined here)**Author:** Damian Legawiec (design driven with Claude)@@ -654,6 +654,29 @@ unaffected beyond the rebase.4. `spree_mcp` (step 4 of the Migration Path) starts from `main` once step1 is in; it never branches from the assistant.+### What the build changed against the design++Three things the design did not anticipate, recorded so the assistant rebase+and any later adapter inherit them rather than rediscovering them:++- **Tenancy is injected like a principal.** Several create workflows take+ `store:`, which is the credential's answer and not the caller's, so the+ adapter fills it from the context and never offers it. `CONTEXT_PARAMETERS`+ sits beside the principal list for exactly this.+- **The injected actor keywords come from `acted_by`, not a list.** That macro+ already records every actor association per model so a sweep needs no list+ (`Spree::ActedBy.models`), and a hand-written list proved both over-broad and+ incomplete — it missed `reviewed_by` and `reopened_by`, which were therefore+ offered to callers. The four associations not yet converted to `acted_by`+ (6.1 in `6.0-action-actors.md`) are named in+ `UNCONVERTED_PRINCIPAL_PARAMETERS` and drop off as they convert.+- **The derived map fills on first read, not in `to_prepare`.** Deriving it+ eager-loads the application; doing that on every code reload would make every+ Spree developer pay a full load per file save for an optional feature. A+ resource served by two controllers under different scopes resolves to the+ narrower one and stays read-only, since the controllers do not agree on who+ may write it.+## Constraints on Current Work- **Do not add tool classes under `Spree::Assistant::Tools`** on the