From Clone to Conformant in a Sprint: Using the Reference Server
How early implementers stood up a compliant endpoint faster than expected.
"Conformant in a sprint" sounds like the kind of claim that gets walked back the first time someone actually tries it. It holds up here for a boring reason: the reference server already does most of the work that would normally eat your first two weeks of effort. You're not implementing the Model Context Protocol layer, you're not designing a schema for orders and fulfillments from scratch, and you're not guessing at what an AI agent expects back from a query tool. All of that already exists and already runs. It’s done for you.
What's left is the part that's actually yours: mapping your system's data onto it.
That's a smaller job than most teams assume going in, which is the whole reason the timeline holds.
What you're actually starting from
Clone the reference server and you get a working MCP server out of the box, backed by a mock adapter so you can run it and see traffic flow through all 12 tools before you've written a line of your own code.
git clone https://github.com/commerce-operations-foundation/mcp-reference-server.git
cd mcp-reference-server/server
npm install
cp .env.example .env
npm run build
npm start
That gets you a server answering the standard onX tool set: five action tools that write (create-sales-order, update-order, cancel-order, fulfill-order, create-return) and seven query tools that read (get-orders, get-customers, get-products, get-product-variants, get-inventory, get-fulfillments, get-returns).
Point an MCP client at it and it behaves like a real onX endpoint, because it is one. It just happens to be talking to a mock backend instead of your back-end.
The adapter is where your actual work starts, and the repo hands you a starting point for that too.
cp -r adapter-template your-fulfillment-adapter
cd your-fulfillment-adapter
npm install
npm run dev
From here the job is translation, not invention. Each of those 12 tools has a defined shape it expects in and a defined shape it returns. Your adapter's job is to take that call, turn it into whatever your OMS or IMS actually does under the hood, and shape the response back into the standard schema. You're not deciding what an order object looks like. That decision's already made. You're deciding how your order object becomes that one.
Where the sprint actually goes
Start with the query tools before the action tools, even though the action tools tend to feel more urgent. Reading your own data out in the right shape surfaces every awkward mismatch between your internal model and the standard one, and it's a much cheaper place to find those mismatches than in the middle of implementing create-sales-order and discovering your order states don't map cleanly onto what the spec expects.
- Most teams find
get-productsandget-inventorystraightforward, since those tend to be close to whatever their existing API already exposes. get-fulfillmentsandget-returnsare usually where the real modeling work shows up. Fulfillment and return states vary more from system to system than order states do, and getting the mapping right matters more here than anywhere else in the surface. This is the exact data an agent needs to answer a shopper's "where's my order" question honestly. Give this attention to ensure shoppers are getting accurate responses.
The action tools go faster once the query side is solid, mostly because you've already done the hard thinking about how your domain model lines up with the standard one.
create-sales-orderandupdate-orderare usually a matter of routing into whatever create/update logic you already have.cancel-orderandcreate-returnare where edge cases live: partial cancellations, partial returns, orders that are mid-fulfillment when a cancellation request comes in. Budget real time for those, not because the tool interface is complicated, but because your own business logic around them probably has more branches than you remember until you're staring at all of them at once.
None of this requires new infrastructure. It requires sitting down with your existing order and fulfillment logic and writing the translation layer between it and a schema someone else already designed well.
Testing as you go, not at the end
The repo ships with test tooling at every level, and the teams that move fastest through this use it continuously instead of saving it for the end.
npm test
npm run test:unit
npm run test:integration
npm run test:coverage
Run these against your adapter as you build each tool, not after you've built all twelve. Catching a schema mismatch on get-fulfillments the day you write it costs you an hour. Catching the same mismatch after you've built the other eleven tools on top of an assumption that turned out to be wrong costs you a lot more than an hour, and it tends to show up right when you thought you were done.
This also happens to be the answer to a question brands are increasingly asking their vendors directly: not "do you support onX," but "can you show me how onX works with your solution." A build that ran against this test suite and this reference implementation is a very different claim than a proprietary layer that says the right words on a spec sheet. If your sales team is fielding that question already, this is the paper trail that backs up a real “yes” instead of a hopeful one.
After conformance
Standing up a compliant endpoint is the technical milestone. It's worth pairing with the non-technical one: getting someone on your team connected to the Commerce Operations Foundation Technical Steering Committee, or at least tracking its updates. The spec isn't frozen, and the adapter you ship this sprint should be built with the expectation that it'll need small updates as the standard evolves, the same way any API client needs occasional maintenance against a service that's still actively developed. Teams that treat this as a one-time build tend to be the ones surprised by a schema change eighteen months from now. Teams that treat it as an ongoing relationship with the standard aren't.
Either way, the hard part isn't the sprint. It's remembering that a sprint was ever all it took.
Sources
- commerce-operations-foundation/mcp-reference-server: setup commands, adapter template workflow, full tool list, test scripts, and environment configuration