定制 wiswes/shopware-mcp 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

wiswes/shopware-mcp

Composer 安装命令:

composer require wiswes/shopware-mcp

包简介

WisWes chat widget integration for Shopware 6 — one-click connect, storefront script injection, PHP MCP endpoints (cart, catalog, checkout, orders), admin status page

README 文档

README

One-click install of the WisWes AI shopping-assistant chat widget on a Shopware 6 storefront. The widget guides shoppers from product discovery through cart to checkout via natural-language conversation, backed by your store's live catalog.

What this plugin gives you

Capability Status
Storefront chat widget ✅ injected automatically on every page (driven by Shopware system_config — no Twig editing)
One-click "Install with WisWes" button in Shopware admin ✅ Settings → Plugins → WisWes
PHP-side MCP tool surface that the WisWes chat backend calls into ✅ 13 endpoints under /wiswes/_mcp/*, bearer-token authed
Cart toolscart_info cart_add cart_update cart_remove
Catalog toolsproduct_filter product_get category_list product_filter_options
Checkout tools (guest flow) — payment_methods shipping_methods set_address place_order
Sales toolsorder_info (guest order lookup by order# + email)
Admin push-catalog button (replaces external indexer with merchant-side sync) 🚧 roadmap

The plugin is structurally aligned with the WisWes Magento extension — same install button, same MCP tool surface, same merchant UX. The implementations differ because Magento has gaps in its native API that Shopware's Store API already fills, but the contract chat_agent talks to is identical.

Requirements

  • Shopware 6.5 or 6.6
  • A merchant account at app.wiswes.com (the install button auto-creates one if your shop's hostname doesn't match an existing tenant)
  • Outbound HTTPS access from your Shopware server to https://app.wiswes.com
  • Inbound HTTPS access from app.wiswes.com to your storefront — chat_agent calls back into /wiswes/_mcp/* to operate the cart/catalog/checkout

Install

From your Shopware project root:

composer require wiswes/shopware-mcp
bin/console plugin:refresh
bin/console plugin:install --activate WiswesWidget
bin/console cache:clear
bin/build-administration.sh    # rebuilds the Vue admin so the WisWes module shows up

Connect (one click)

  1. Open your Shopware admin → Settings → Plugins → WisWes.
  2. Confirm your shop's URL (auto-filled from the current admin host).
  3. Enter your email — used as the contact for the auto-provisioned WisWes tenant.
  4. Click Install with WisWes.

That's it. The widget appears on your storefront within a minute. Behind the scenes the plugin:

  1. Calls chat_agent's install endpoint with the shop URL and your email.
  2. Receives back a widget_token + per-tenant mcp_secret + tenant_slug.
  3. Persists all three into Shopware's system_config (under the WiswesWidget.config.* namespace) so they survive cache clears + restarts.
  4. The WidgetInjectionSubscriber reads them on every storefront render and injects the <script src="…/embed.js?user_token=…"> tag.
  5. chat_agent uses the same mcp_secret as a bearer token whenever the LLM needs to call back into your storefront's tool surface.

Disconnect

Same admin page → Disconnect button. Stops the storefront from loading the widget. Your WisWes tenant on app.wiswes.com is preserved (so re-installing later restores conversation history); only the local Shopware credentials are cleared.

Architecture

                      ┌─────────────────────────────────────────┐
   Shopper            │     app.wiswes.com (chat_agent)         │
   in browser  ──────▶│  - LLM picks a tool                      │
       │              │  - HTTP POST + Bearer mcp_secret to ─┐   │
       │              │                                      │   │
       │              └──────────────────────────────────────┼───┘
       │                                                     │
       │  storefront with embed.js loaded                    │
       │                                                     ▼
   ┌──────────────────────────────────────────────────────────┐
   │  Your Shopware (this plugin)                              │
   │  ─────────────────────────────────────────                │
   │  /wiswes/_mcp/cart/{info,add,update,remove}               │
   │  /wiswes/_mcp/catalog/{product_filter,product_get,...}    │
   │  /wiswes/_mcp/checkout/{payment_methods,...}              │
   │  /wiswes/_mcp/sales/order_info                            │
   │                                                            │
   │  Each route → BearerTokenSubscriber gate →                 │
   │              Symfony controller → Shopware Store API       │
   │              services (CartService, ProductListingRoute,  │
   │              CartOrderRoute, etc.)                         │
   └────────────────────────────────────────────────────────────┘

File map

Path Purpose
src/Resources/config/services.xml DI registration for all controllers + the bearer-auth subscriber
src/Resources/config/routes.xml Imports Controller/Admin + Controller/Mcp annotated routes
src/Resources/config/config.xml system_config schema (chatAgentBaseUrl, widgetToken, tenantSlug, tenantSecret, injectOnStorefront)
src/Service/ConfigReader.php Wraps SystemConfigService so callers don't drift on the WiswesWidget.config.* key prefix
src/Storefront/Subscriber/WidgetInjectionSubscriber.php StorefrontRenderEvent listener that puts widget config on the render context
src/Resources/views/storefront/base.html.twig Renders <script src="…/embed.js?user_token=…"> from the subscriber-set parameters
src/Controller/Admin/InstallController.php Backs the "Install with WisWes" / "Disconnect" admin buttons. Routes: /api/_action/wiswes/{status,install,disconnect}
src/Mcp/Http/BearerTokenSubscriber.php kernel.controller listener that 401s any /wiswes/_mcp/* request without a matching tenantSecret
src/Controller/Mcp/CartController.php 4 cart routes — info / add / update / remove
src/Controller/Mcp/CatalogController.php 4 catalog routes — product_filter / product_get / category_list / product_filter_options
src/Controller/Mcp/CheckoutController.php 4 checkout routes — payment_methods / shipping_methods / set_address / place_order
src/Controller/Mcp/SalesController.php 1 sales route — order_info
src/Resources/app/administration/src/module/wiswes-widget/ Vue admin module — single page with status display + install/disconnect buttons

Roadmap

  • Push catalog from admin — admin button to push the merchant's product catalog into chat_agent's per-tenant Qdrant collection (replaces the external Python indexer with a merchant-controlled action).
  • Customer-aware tools — currently guests-only; once the WisWes app's customer-context flow is settled we'll expose customer_info, order_history, etc. for logged-in shoppers.
  • Marketplace listing — submit to the Shopware Store once Phase 7's push service lands and a few merchants have run on production.

License

MIT — see LICENSE.

wiswes/shopware-mcp 适用场景与选型建议

wiswes/shopware-mcp 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 05 月 09 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「ecommerce」 「shopware」 「ai」 「mcp」 「chatbot」 「shopware6」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 wiswes/shopware-mcp 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 wiswes/shopware-mcp 我们能提供哪些服务?
定制开发 / 二次开发

基于 wiswes/shopware-mcp 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 44
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-05-09