Shopware · News from · Published · Stefan Hamann

Shopware 6.7.16.1 validates custom MCP tool responses

Shopware 6.7.16.1 checks custom MCP tool output against its declared schema and tightens browser origin checks. Here’s how to test an integration.

ShopwareShopping agentsProduct dataTrustMerchant operations

A browser shows a stock lookup with two different response formats beside a parcel.
Illustration: Agentic Commerce

What happens when a stock lookup finds nothing?

An assistant asks whether a particular product variant is available. With stock on hand, everything works. When there’s nothing to report, the plugin sends an empty array even though it says the response will be an object. To a person, both can look like nothing. For the assistant it can mean the difference between understanding that the result is empty and getting an error.

Shopware released version 6.7.16.1 on 18 November. Its MCP server now uses mcp/sdk 0.9 and symfony/mcp-bundle 0.15. Custom tools with declared output schemas are checked against them. I’d use the update to try the least impressive query in the whole demo. What comes back when the item you asked for isn’t there?

What changes for MCP plugins and browser clients?

If a tool declares an outputSchema, the structured data it sends back has to match. According to Shopware’s release notes, the server returns a tool error when structuredContent fails that check. Where the schema permits an empty object, the notes use PHP’s new stdClass() to produce one. An empty PHP array becomes a JSON array. Tools with incorrectly shaped properties or required entries in their input schemas are rejected at registration.

The other change concerns where browser requests come from. Shopware matches the Origin header exactly, including the scheme and port. Origins from APP_URL and configured sales channel domains are accepted. If an assistant runs at another address, you can add its specific origin with shopware.mcp.allowed_origins. Clients without an Origin header are unaffected by this particular change, according to the release notes. I’d still test the browser interface even if the desktop client connects.

The response has to fit and the tool has to be allowed

Since Shopware 6.7.16.0, integrations and users without administrator privileges need an explicit allowlist to use MCP capabilities. That’s a separate check. A browser can come from an accepted origin and send the right shape of input. The integration still needs permission to use that particular tool.

In Chapter 13 of my book, I explain how readable data and permission to act work together. Dimensions, prices and delivery dates can be retrieved as fields and checked for format. The system carrying out a change still has to check the rights for that particular task. Our assistant may be able to tell that a variant is out of stock. Whether it may put a substitute in the cart depends on what the customer asked it to do and the permission it has.

What I’d test after updating Shopware

I’d run the same stock query through the interface customers or staff actually use. Try one variant that’s available, one that’s sold out and one the shop doesn’t recognise. The tool should make each result clear and the assistant should understand the difference. Then log in with the same integration and check that it can see the tools it was explicitly allowed to use. That helps you tell a browser origin problem from a response format or permissions problem.

My Shopware guide from product feed to test purchase walks through the separate jobs of product discovery, buying and internal work. The MCP update concerns the tools an assistant calls in those jobs. Give it a useful result when the shelf is empty and it can help the customer work out what to do next.

Source and further reading

Read the original announcement ↗

Read the related Agentic Commerce guide ↗

The Agentic Commerce handbook ↗

Save and share