Admin MCP Server
A Model Context Protocol server for the back office, so any MCP client (Claude Code, Claude Desktop, Cursor, in-house agents) can merchandise the catalog, manage orders and fulfilment, query the reporting engine and manage store setup in plain language, under the same tenancy and permission rules as the Admin API. The server is a thin protocol adapter over a Spree-owned agent-tool registry in spree_core; the dashboard chat assistant becomes the second adapter over that registry once this ships. Writes are the workflows themselves: each exposed workflow is one tool with a schema derived from its perform signature.
Status: Draft — design finalized 2026-09-16, nothing built.
Depends on: spree api CLI (shipped), Admin API key scopes (shipped), admin RBAC permission catalog, service workflows, analytics semantic layer, dashboard assistant plan (rebases onto this).
Steps
- Move the tool registry into
spree_coreasSpree::AgentTool/Spree.agent_tools, with a principal-based context; derive the resource map from the admin controllers. - Reporting tools over
Spree.reporting. - Workflow tools: an allowlist in core exposing the workflows the admin controllers call, one tool per workflow with a derived schema, a contract spec against the controllers; generic record writes only for resources without a workflow.
- New optional gem
spree_mcpmounting the officialmcpgem's Streamable HTTP transport at/api/v3/admin/mcp, secret-key auth, scope-filtered tool list. - Docs page and agent-skill cross-reference.
Plan: https://github.com/spree/spree/blob/main/docs/plans/6.0-mcp-server.md
Tracked in Linear as V-3645
Source: spree/spree