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

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 handler#[McpTool] class + shopware.mcp.tool 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)