Short answer: start with four read-only tools (search products, get product, check price and stock, get product options) and one handoff tool that returns a checkout link for the shopper to confirm. Keep the list to about five to eight tools, keep results compact, and leave payment to the human or to your existing checkout.

An MCP server lets AI assistants call your store's capabilities directly instead of scraping pages. The hard design question is not the protocol. It is deciding which few things to expose. This guide gives a starting tool list for an online store, with the reasoning, so you can adapt it to your catalog.

First, the ground rules

The MCP specification defines tools as named operations with a description and a JSON Schema for inputs, which a model can discover and call. Check the current version of the spec before you build, because it evolves.

Axidort's guide to building an MCP server gives advice that fits commerce well:

  • Choose three to eight tasks agents most need. Design tools around what a shopper asks for, not around database tables.
  • Name tools with a verb and a noun, describe when to use each, and define inputs with JSON Schema.
  • Return compact, structured results with identifiers the next call can use.
  • Mark tools that change something, and require confirmation for purchases.

The tool list

1. search_products

The entry point. A shopper says "waterproof hiking boots under 150 euros, size 42" and the agent needs candidates.

Inputs worth supporting: a free-text query, optional filters (category, price range, size or variant attributes, in-stock only), a sort option and a limit. Return a short list: product id, name, price with currency, availability, and a URL. Do not return full descriptions here, since long results waste the model's context and slow the answer.

{
  "name": "search_products",
  "description": "Search the catalog by text and filters. Use first when the shopper describes what they want.",
  "inputSchema": {
    "type": "object",
    "properties": {
      "query": { "type": "string" },
      "max_price": { "type": "number" },
      "in_stock_only": { "type": "boolean" },
      "limit": { "type": "integer", "maximum": 20 }
    },
    "required": ["query"]
  }
}

2. get_product

Given a product id, return the detail the agent needs to compare and explain: title, description, key attributes, variants (size, colour) with their own ids, images, and the canonical product URL. For B2B catalogs add units of measure and minimum order quantities, which are the details people most often get wrong when they are only in prose.

3. check_price_and_stock

Split this from get_product on purpose. Price and availability change often and depend on the variant, quantity and sometimes the shopper's region, so they should be a fresh call, not a cached part of the description. Return the exact price, currency, whether tax is included, stock status per variant, and the quantity limits. If an answer depends on location or account, say so in the response instead of guessing.

A stale or ambiguous price is the fastest way to lose an agent's trust, and a wrong one is worse than none.

4. get_shipping_options (optional)

Only if you can answer it without a full cart. Many shoppers ask "does it arrive by Friday?" before buying. If you cannot compute it from a postcode and a product id, leave this out and link to your shipping policy in the product response.

5. create_cart_handoff

This is the one that changes state, so design it carefully. A good pattern is a handoff: the agent submits product ids and quantities, and the tool returns a cart or checkout URL that the shopper opens to review and pay. The shopper stays in control, you reuse your existing checkout, fraud checks and tax logic, and the agent never touches payment details.

Mark it clearly as an action, describe that it does not charge anyone, and return the cart contents and totals so the agent can confirm them with the user before sending the link.

Direct checkout from inside an agent is possible, and emerging protocols cover it (see Axidort's overview of agentic commerce protocols), but a handoff is a sensible first step. Add direct payment later if the business case is clear.

What to leave out at first

  • Anything that reveals other customers' data, or order history, unless the shopper is authenticated.
  • Admin or inventory-write tools. A shopping server has no reason to expose them.
  • A tool for every endpoint you already have. More tools make it harder for a model to pick the right one.

Transport and authorization

Per the Axidort guide, serve the server over Streamable HTTP at a public HTTPS endpoint (for example /mcp on your domain), and design it stateless so requests do not depend on a single machine. The older HTTP+SSE transport is described there as deprecated.

Read-only catalog tools can be public. Tools tied to an account, such as order status or saved carts, need OAuth: the server acts as a protected resource, validates the access token on every request, uses narrow scopes such as orders:read, and must never accept a token issued for another service. See the MCP authorization section of the spec for the current rules.

Also put rate limits on the public tools. An open search endpoint is an obvious target for scraping.

Test it like an agent would

Before launch, connect a real MCP client and run the shopper journey end to end: search, open, price and stock, handoff. Watch for three failure modes: tool descriptions that are too vague for the model to choose correctly, results so long they are truncated, and errors that return a stack trace instead of a message the agent can act on. Fix the descriptions first, since that is usually where the problems are.

FAQ

Do I need an MCP server if my site already works for agents? Not necessarily. An agent that can read your pages may be enough for some stores. An MCP server gives a cleaner, more reliable path, especially for B2B catalogs with account-specific prices. It is an addition, not a requirement.

How many tools is too many? There is no fixed limit, but the guide above suggests three to eight. If you cannot describe in one sentence when to use a tool, merge or remove it.

Should the agent be able to pay directly? Start with a handoff link. Direct payment adds fraud, liability and consent questions that are worth solving deliberately.

Can my catalog be public if prices are not? Yes. Expose search and product detail publicly, and put account-specific pricing behind OAuth.

Where to go next

If you are building one yourself, the full MCP server guide covers the build steps in more detail.

If your business needs one built, Axidort builds MCP servers and agent APIs, with scope and price agreed before any work starts. We have no case studies to show yet, and say so plainly. You can tell the team what you need.

Disclosure: ByteSprint is published by the team behind Axidort, which offers MCP server development.