TypeScript Ecommerce MCP Starter Project
Short answer
The MCP commerce starter is a free, MIT-licensed TypeScript project from Agent Commerce Optimization: a read-only Model Context Protocol (MCP) server with four tools over a synthetic 21-product catalog, built on MCP TypeScript SDK v2 (@modelcontextprotocol/server 2.4.0). Its 20 stdio tests passed on Node 24.14.0 on 2026-11-29. It has no auth, writes, or real data.
Key takeaways
- Synthetic demo: fictional brand, products, prices, and stock. It is not a client project or a store integration.
- Four read-only tools:
list_categories,search_products,get_product,check_variant_stock. - Pinned: Node 24.14.0 (tested),
@modelcontextprotocol/server2.4.0,@modelcontextprotocol/client2.4.0, zod 4.6.7, TypeScript 6.0.3. npm testspawns the server over stdio and runs 10 tests under MCP revision 2026-07-28 and 10 under the 2025-era handshake. 20 of 20 passed.- Not production-ready by design: no authentication, no HTTP transport, no cart or checkout.
What is in the ecommerce MCP starter?
The starter is a small Node.js project you can read in fifteen minutes and run in two. It is the code walked through line by line in Build an Ecommerce MCP Server with TypeScript. The zip contains source only, with no node_modules.
mcp-commerce-starter.zip
Version 0.1.0, 2026-11-29. Source, synthetic catalog, test, and README. About 10 KB compressed.
Download .zip →
README.md
Install steps, pinned versions, tool table, test prompts, and production boundaries.
View README →
| File | Purpose |
|---|---|
| package.json | Pinned dependencies, engines, and the start, test, and typecheck scripts |
| tsconfig.json | Strict NodeNext config with erasableSyntaxOnly so Node can run the .ts files directly |
| src/server.ts | MCP server: tool registration, zod schemas, read-only annotations, stdio transport |
| src/catalog.ts | Pure read-only search and lookup functions over the catalog |
| src/catalog.json | Synthetic catalog: 21 products, 46 variants, 8 categories, prices in cents |
| test/smoke.test.ts | End-to-end test: spawns the server over stdio and calls each tool under two protocol eras |
How do you install and run the starter?
Unzip it, install dependencies, and run the tests. Node runs the TypeScript files directly through its built-in type stripping, so there is no build step.
- 1
Check Node
Run
node -v. We tested 24.14.0.package.jsondeclares>=22.18.0, but only 24.14.0 was tested. - 2
Install
In the unzipped
mcp-commerce-starterfolder, runnpm install. - 3
Test
Run
npm test. Expect 20 passing tests. - 4
Type-check (optional)
Run
npm run typecheck, which runstsc --noEmit. - 5
Start
Run
npm start. The server waits silently for an MCP client on stdin. Press Ctrl+C to stop. - 6
Connect a host (optional)
Configure an MCP-capable host to launch
node /absolute/path/to/mcp-commerce-starter/src/server.ts. Check your host's documentation for its config format. We did not test a specific host.
npm install
npm test
npm run typecheck
npm startWhat do the tests prove?
The tests prove that the server starts, speaks MCP over stdio, exposes exactly four read-only tools, returns correct results from the synthetic data, and rejects malformed input. They do not prove anything about real catalogs, AI hosts, or commercial channels.
| Check | Result | Evidence label |
|---|---|---|
npm install in a clean copy | 0 vulnerabilities reported by npm | Tested |
npm test, MCP revision 2026-07-28 pinned | 10 of 10 passed; negotiated 2026-07-28 | Tested |
npm test, SDK client default handshake | 10 of 10 passed; negotiated 2025-11-25 | Tested |
npm run typecheck | No errors | Tested |
| Install and test from the published zip | 20 of 20 passed | Tested |
| Node 22.18 to 24.13 | Not run | Inferred from Node's type-stripping support; unverified |
| Desktop or cloud AI hosts | Not run | Unknown |
| macOS and Linux | Not run | Unknown, though nothing in the code is platform-specific |
Which versions does the starter depend on?
Every dependency is pinned to an exact version checked on npm on 2026-11-29. The starter uses MCP TypeScript SDK v2, which the package README describes as the stable line implementing MCP revision 2026-07-28.
| Dependency | Pinned version | Constraint |
|---|---|---|
| Node.js | 24.14.0 tested | Needs built-in TypeScript type stripping; engines says >=22.18.0. The SDK v2 server package declares node >=20. |
@modelcontextprotocol/server | 2.4.0 | SDK v2 server. Requires zod ^4.2.0. |
@modelcontextprotocol/client | 2.4.0 | Dev only, for the test client |
zod | 4.6.7 | Imported as zod/v4 |
typescript | 6.0.3 | Dev only. TypeScript 6 needs "types": ["node"] in tsconfig, which the project sets. |
@types/node | 24.19.4 | Dev only |
Which tool patterns are safe for a prototype?
Read-only lookups over data you are willing to make public are the safe starting point. Anything that writes, spends, or reveals customer-specific data needs authorization and a reviewed design first.
| Pattern | Prototype-safe? | Why |
|---|---|---|
| Catalog search and product detail | Yes | Same information as a public product page |
| Availability label (in stock / low / out) | Yes | Coarse; reveals little |
| Exact stock counts | Decide first | Reveals inventory depth to anyone who can call the tool |
| Customer-specific or B2B prices | No, not without auth | Requires knowing who the caller is |
| Cart creation | No, not without auth | Creates state; handles must be bound to a verified user |
| Checkout, orders, refunds, price edits | No | Money and fulfillment; needs a full checkout design |
For the reasoning behind each row, see the MCP server guide for ecommerce and MCP server authentication for ecommerce.
What does the starter deliberately leave out?
It leaves out everything that makes a server safe to put on a network, because those choices depend on your platform and data.
- No authentication. Any process that can launch it can call it. A remote deployment needs MCP authorization, and the MCP security best practices say servers must not accept tokens that were not issued for them.
- No HTTP transport. It uses stdio only, which the MCP security guidance recommends for locally run servers.
- No writes. No cart, checkout, order, or price tools.
- No real data. The catalog is synthetic. There is no sync, freshness, or caching logic.
- No rate limiting, metrics, or audit logs.
- No platform integration. If you run Shopify or WooCommerce, check their native MCP options before writing a custom server.
When you are ready to connect a real catalog, our MCP server development service scopes the data sources, auth model, and tool set. Checkout work is a separate, eligibility-checked engagement; see agentic checkout integration.
Frequently asked questions
Is this a real store or a client project?
No. The brand "Example Outfitters (synthetic)" and all of its products, prices, and stock levels are invented for testing. Nothing in the project comes from a client or a real store.
Can I use the starter in a commercial project?
Yes. It is MIT licensed. Replace the synthetic catalog and add the production controls on this page before connecting it to real data or a network.
Is there a public Git repository?
Not at this time. The zip and the individual files on this page are the release. Each file is linked above so you can read it before downloading.
Will this get my products into AI shopping results?
No. An MCP server is a tool interface that a connected client can call. Inclusion in ChatGPT, Google AI Mode, or other surfaces follows each platform's own feed and program rules.
Does it work with older MCP clients?
In our test, yes. The v2 server's serveStdio answered the SDK client's default 2025-era handshake, which negotiated revision 2025-11-25, and all ten tool tests passed.
How often is the starter updated?
We plan to re-check pinned versions monthly and after MCP spec or SDK releases. The version and date on this page and in the README show what was last tested.
Need this on your real catalog?
Tell us your platform, where product, price, and stock data live, and which AI clients matter to you.
Related
- Build an Ecommerce MCP Server with TypeScriptThe line-by-line walkthrough of this project.
- MCP Servers for EcommerceWhen a store needs MCP and what to expose.
- MCP Server AuthenticationWhat to add before a network deployment.
- MCP Tool InspectorReview tool names, descriptions, and schemas.
- MCP Server DevelopmentProduction servers on your real catalog.
Sources
- MCP security best practices (revision 2026-07-28)
- MCP specification, revision 2026-07-28
- @modelcontextprotocol/server on npm
- @modelcontextprotocol/sdk on npm (v1.x maintenance line)
- MCP TypeScript SDK v2 documentation
- Agent Commerce Optimization: mcp-commerce-starter v0.1.0 (synthetic demo)
Platform capabilities, eligibility, and specifications change. Sources were checked on 2026-11-29; confirm the current primary documentation before scoping an implementation. See our editorial policy and methodology.