Resource · Synthetic demo v0.1.0

TypeScript Ecommerce MCP Starter Project

By Michael E.Updated Sources checked

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/server 2.4.0, @modelcontextprotocol/client 2.4.0, zod 4.6.7, TypeScript 6.0.3.
  • npm test spawns 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.

Files (each links to the published copy)
FilePurpose
package.jsonPinned dependencies, engines, and the start, test, and typecheck scripts
tsconfig.jsonStrict NodeNext config with erasableSyntaxOnly so Node can run the .ts files directly
src/server.tsMCP server: tool registration, zod schemas, read-only annotations, stdio transport
src/catalog.tsPure read-only search and lookup functions over the catalog
src/catalog.jsonSynthetic catalog: 21 products, 46 variants, 8 categories, prices in cents
test/smoke.test.tsEnd-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. 1

    Check Node

    Run node -v. We tested 24.14.0. package.json declares >=22.18.0, but only 24.14.0 was tested.

  2. 2

    Install

    In the unzipped mcp-commerce-starter folder, run npm install.

  3. 3

    Test

    Run npm test. Expect 20 passing tests.

  4. 4

    Type-check (optional)

    Run npm run typecheck, which runs tsc --noEmit.

  5. 5

    Start

    Run npm start. The server waits silently for an MCP client on stdin. Press Ctrl+C to stop.

  6. 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.

Commands
npm install
npm test
npm run typecheck
npm start

What 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.

Test results recorded on 2026-11-29 (Windows 11, Node 24.14.0)
CheckResultEvidence label
npm install in a clean copy0 vulnerabilities reported by npmTested
npm test, MCP revision 2026-07-28 pinned10 of 10 passed; negotiated 2026-07-28Tested
npm test, SDK client default handshake10 of 10 passed; negotiated 2025-11-25Tested
npm run typecheckNo errorsTested
Install and test from the published zip20 of 20 passedTested
Node 22.18 to 24.13Not runInferred from Node's type-stripping support; unverified
Desktop or cloud AI hostsNot runUnknown
macOS and LinuxNot runUnknown, 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.

DependencyPinned versionConstraint
Node.js24.14.0 testedNeeds built-in TypeScript type stripping; engines says >=22.18.0. The SDK v2 server package declares node >=20.
@modelcontextprotocol/server2.4.0SDK v2 server. Requires zod ^4.2.0.
@modelcontextprotocol/client2.4.0Dev only, for the test client
zod4.6.7Imported as zod/v4
typescript6.0.3Dev only. TypeScript 6 needs "types": ["node"] in tsconfig, which the project sets.
@types/node24.19.4Dev 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.

PatternPrototype-safe?Why
Catalog search and product detailYesSame information as a public product page
Availability label (in stock / low / out)YesCoarse; reveals little
Exact stock countsDecide firstReveals inventory depth to anyone who can call the tool
Customer-specific or B2B pricesNo, not without authRequires knowing who the caller is
Cart creationNo, not without authCreates state; handles must be bound to a verified user
Checkout, orders, refunds, price editsNoMoney 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.

Sources

  1. MCP security best practices (revision 2026-07-28)
  2. MCP specification, revision 2026-07-28
  3. @modelcontextprotocol/server on npm
  4. @modelcontextprotocol/sdk on npm (v1.x maintenance line)
  5. MCP TypeScript SDK v2 documentation
  6. 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.