Skip to content

Extending the MCP Server

Extending the MCP Server

You can add three capability types to the MCP server: tools, prompts, and resources. There are three ways to implement them: as an app (webhook-based, works in Shopware Cloud), a plugin (in-process PHP, full DAL access), or a Symfony bundle (in-process, always active, no install lifecycle).

Compatibility with earlier Shopware versions

When using MCP on a Shopware 6.7 version earlier than 6.7.14.0, enable the server by setting MCP_SERVER=1 in the environment. Starting with Shopware 6.7.14.0, the feature flag is removed and the MCP server is always enabled.

Register extension capabilities normally in both cases. The flag controls the MCP server itself; extension services do not need a shopware.feature tag.

This page is a quick reference. For step-by-step guides, see:

Working examples:

Tools

Tools let the AI agent call your code to take action or fetch data.

Prompts

Prompts give the AI context and instructions before tool calls start. Return an array of {role, content} message objects.

Resources

Resources expose read-only reference data via a URI without consuming the tool's call budget. Return {uri, mimeType, text}.

Summary

AppPluginBundle
Tool<mcp-tool> in mcp.xml + webhook handlerAttributes + shopware.mcp.tool service tagSame as plugin
Prompt<mcp-prompt> in mcp.xml + webhook returns message array#[McpPrompt] class + shopware.mcp.prompt tagSame as plugin
Resource<mcp-resource> in mcp.xml + webhook returns {uri, mimeType, text}#[McpResource] class + shopware.mcp.resource tagSame as plugin
Context accessVia source.shopId in webhook bodyMcpContextProvider::getContext()Same as plugin
DAL accessNo (remote process)FullFull
LifecycleApp install/updatePlugin install/activateAlways active
Was this page helpful?
UnsatisfiedSatisfied
Be the first to vote!
0.0 / 5  (0 votes)