@stateset/embedded 1.35.1 locally. You need Node.js 20.20.0+ and
npm 10+. You do not need a hosted StateSet key. The optional agent step needs an MCP-capable
host with its own model connection.
This is a local practice workflow. It creates commerce records and reserves stock in your
database. It does not connect a store, charge a card, or ship goods. If your first task is
customer support, use the ResponseCX quickstart; for existing business systems,
start with the service directory.
1. Create a project
Use a new directory so the fixture is separate from existing commerce data:2. Create the operational fixture
Save this assetup-operation.mjs:
operations.db, so an accidental second run does not
create another order. If setup fails partway through, keep the failure for diagnosis and start
again in a new directory rather than assuming the partial fixture is complete.
3. Verify the result independently
Save this asinspect-operation.mjs:
4. Give an AI agent the same task
Open the generatedmcp-config.json. Copy its stateset-commerce entry into your MCP host’s
configuration, following that host’s configuration format. Merge it with any existing servers.
The file already contains the absolute database path, so there is no example path to replace.
Restart or reconnect the server in the host, then paste the contents of agent-task.txt into
the conversation. The task includes the exact order ID created on your machine; you do not need
to give the agent filesystem access to read the handoff files.
The configuration selects the core profile and omits --apply. In CLI 1.35.1, write calls
remain preview-only; read tools can inspect the database. The
MCP setup guide explains host executable paths,
profiles, and the separate trusted configuration required to enable writes.
5. Check the agent’s evidence
Run
node inspect-operation.mjs again after the agent responds. Its assertions confirm that
the fixture’s order count, order state, total, and stock quantities still match. They do not
audit every possible record or external system; inspect the host’s tool trace as well.
A plausible answer without tool calls is not a successful connection test. An empty result is
not an invitation to create replacement data: compare the configured database path and order
ID first.
Move from the example to your operation
Use Connect Your Operation to choose data owners, check service access, and map real IDs before replacing this fixture with business data. Choose one next outcome and the system that owns its data:
For an existing business, identify the source of truth and how data reaches the selected
service before replacing fixture IDs with real ones. StateSet services have separate setup and
credentials; connecting one MCP server does not configure the others.
Use the agent operating procedure for task handoffs and the
integration test plan to verify the workflow as you expand it.
Get unblocked
Share the package version, failed step, and redacted error using the support checklist.