Getting started for AI agents
If you are an AI agent — or you are wiring one up — this is the map. StateSet is built to be operated by agents rather than only by people, and MCP is the primary interface. There are 10 MCP servers exposing roughly 950 tools across commerce, EDI, voice, mail, decisions, automation, and computer use. Read this page first. It tells you which server to connect, what you can do with it, and the four rules that separate a useful agent from an expensive one.Human wiring this up? Every config below goes in your MCP host’s config file —
claude_desktop_config.json
for Claude Desktop, or claude mcp add for Claude Code. Full per-server detail is in
MCP Servers.Start here: pick one server
Do not connect all ten. Pick the one that matches the job.The fastest useful start
stateset-commerce is the broadest surface and needs no server running — the commerce engine is
embedded and operates directly against a SQLite file.
The four rules
These are what actually matter. Everything else is detail.1. Send an idempotency key on every write
An agent retries. That is its nature — a timeout, a rate limit, a re-plan after an ambiguous response. Without an idempotency key a retry creates a second order.2. Know which calls cannot be undone
Reads are free. Writes are not, and a few are irreversible:
Treat the right column as requiring an explicit decision, not an inference from context. Which brings
us to the rule that matters most.
3. Do not decide authorization yourself — ask the gate
This is the part of StateSet built specifically because agents are persuasive and wrong. An agent asked “can I refund this $400 order?” will reason its way to an answer, and a customer who argues will move that answer. The decision gate replaces that reasoning with a verified decision: a symbolic rule engine returnsapproved, denied, or refused, with
the rules it cited as proof.
- Refuse by default. If nothing proves the action is permitted, the answer is
refused— not a guess, and not a best effort. - Deny wins. A firing denial cannot be diluted by adding permissions beside it.
- It degrades into refusing. Under budget exhaustion it can lose conclusions but never gain a false one.
4. Read the error, do not retry blindly
Errors tell you whether retrying can possibly help:
Branch on the
code field, never on message — messages get reworded. Log request_id; it is what
support needs to trace one call. Full catalogue in Errors.
Skills: the layer above tools
MCP gives an agent tools. Skills give it procedure — the ordered steps, the field names, and the gotchas for a specific job, written for an agent to read. The distinction matters. An agent with 719 commerce tools and no skill knows every call and no workflow: it can create a cart, but not that you set the shipping address before fetching rates, and complete checkout only after a payment method exists. A skill encodes that sequence. 38 public skills ship for iCommerce, one per domain:
Each skill is a
SKILL.md with a name, a description saying when to use it, and reference files
alongside. Hosts that support skills load the description up front and pull the body only when it
becomes relevant, so installing all 38 does not flood your context the way connecting several MCP
servers does.
Two skills are also published as readable documents, for hosts that prefer fetching over installing:
Reading these docs directly
If you would rather read than install, this site is already machine-readable — no scraping and no HTML parsing.
Both index files are generated automatically and stay current, and are also served from
/.well-known/llms.txt and /.well-known/llms-full.txt.
Scope before you connect
A large server can be narrowed, which improves both safety and tool-selection accuracy.- Read-only first. Expose only read tools until the agent has demonstrably correct behaviour.
- Restrict by domain. An agent handling returns does not need the general ledger.
- Put the destructive tools behind a review step, not behind a prompt instruction. A prompt is a request; a review gate is a control.
What is behind the tools
MCP is a wrapper. If you need the underlying surface:
Both REST surfaces are generated from OpenAPI specs, so the documented shapes are the shapes the code
serves.
A sensible first hour
1
Connect one server against a copy of your data
stateset-commerce with DB_PATH pointing at a duplicate.2
Do only reads
List orders. Look up inventory. Confirm the data is what you expect.
3
Write one reversible thing
Create a draft. Add a note. Verify it landed, and undo it.
4
Wire the gate before anything irreversible
Route refunds, cancellations, and sends through decisions.
5
Then widen
Add a second server, or unlock write tools, one domain at a time.
Related
- MCP Servers — all ten, with transports and per-server config
- Decision gate — verified authorization
- Formal verification — what is actually proven
- Why StateSet — what makes this different from an API with an SDK
- Errors · Rate limiting