magebitcom/magento2-mcp-report-tools
Composer 安装命令:
composer require magebitcom/magento2-mcp-report-tools
包简介
Report-domain MCP tools for Magebit_Mcp (admin Reports menu + admin Dashboard + statistics refresh)
README 文档
README
This is a sub-module for the Magento2 MCP module
Report-domain MCP tools for Magebit_Mcp. Exposes the admin Reports menu
(sales, tax, customer, product, review, search-term, cart, newsletter), the
admin Dashboard summary, a Customers Online live view, and the
Statistics refresh machinery — all as MCP tools.
Each read tool is a thin wrapper over the same Magento collection or service
the admin grid uses, so row counts and totals match the admin UI exactly.
Statistics refresh tools dispatch the same aggregation models as
Magento\Reports\Controller\Adminhtml\Report\Statistics\RefreshRecent /
RefreshLifetime.
Install
composer require magebitcom/magento2-mcp-report-tools bin/magento module:enable Magebit_McpReportTools bin/magento setup:upgrade bin/magento setup:di:compile bin/magento cache:flush
Tool catalog
Shopping cart (live)
| Tool | What it does |
|---|---|
reports.cart.products |
Products currently sitting in open carts with quantities and carts count. |
reports.cart.abandoned |
Quotes that started checkout but were not converted. |
Marketing (live)
| Tool | What it does |
|---|---|
reports.marketing.search_terms |
Storefront search queries with popularity and number of matching products. |
reports.marketing.newsletter_problems |
Newsletter queue problem reports (bounces, send failures). |
Reviews (live)
| Tool | What it does |
|---|---|
reports.reviews.by_product |
Products ranked by review count with average rating. |
reports.reviews.by_customer |
Customers ranked by review count. |
Sales (aggregated)
All sales reports read from the *_aggregated_created / *_aggregated_updated
tables populated by reports.statistics.refresh_*. Arguments are shared:
from, to, period (day/month/year), store_id?, show_empty?,
order_statuses?.
| Tool | What it does |
|---|---|
reports.sales.orders |
Revenue / profit / quantity / tax / shipping / discount per period. |
reports.sales.tax |
Tax collected per rate, per period. |
reports.sales.invoiced |
Invoiced vs. paid vs. outstanding per period. |
reports.sales.shipping |
Shipping revenue per carrier / method / period. |
reports.sales.refunds |
Online and offline refunds per period. |
reports.sales.coupons |
Coupon usage and discount amount per rule / period. |
Customers
| Tool | What it does |
|---|---|
reports.customers.orders |
Order count per customer, date-ranged. |
reports.customers.totals |
Lifetime / period spend per customer. |
reports.customers.new |
Newly registered customer accounts per period. |
reports.customers.online |
Live snapshot of visitors (logged in or guest), with cart contents and last activity. |
Products
| Tool | What it does |
|---|---|
reports.products.viewed |
Most-viewed products, aggregated (daily/monthly/yearly). |
reports.products.bestsellers |
Bestselling products by quantity sold, aggregated. |
reports.products.low_stock |
Products at or below their notify-stock threshold. |
reports.products.ordered |
Quantity ordered per product within a date range. |
reports.products.downloads |
Downloadable-product link purchases and downloads. |
Dashboard
| Tool | What it does |
|---|---|
reports.dashboard.summary |
One-call roll-up that mirrors the admin Dashboard — lifetime sales, average order, revenue for a period, recent orders, top search terms, top bestsellers. |
Statistics refresh (write)
Write tools require the global magebit_mcp/general/allow_writes flag and
the token's own allow_writes flag to be 1. Both refresh tools require
explicit confirmation so MCP clients prompt before firing.
| Tool | Confirm? | What it does |
|---|---|---|
reports.statistics.status |
no (read) | Last-refresh timestamp and flag state per aggregation code. |
reports.statistics.refresh_recent |
yes | Aggregates the last 25 hours (default) for the selected report codes. Mirrors admin Refresh Statistics for Last Day. |
reports.statistics.refresh_lifetime |
yes | Aggregates all time for the selected report codes. Mirrors admin Refresh Lifetime Statistics. Heavy — on stores with 500k+ orders this can take several minutes and will elevate DB load. Run off-peak. |
Both refresh tools also implement Magebit\Mcp\Api\UnderlyingAclAwareInterface
with Magento_Reports::statistics as the underlying Magento admin resource,
so they block calls from admins who wouldn't be allowed to refresh stats in
the admin UI.
Extending
See docs/EXTENDING.md for:
- adding a new report tool that reuses the shared search-builder pattern;
- registering a new aggregation code with
AggregationRegistry(e.g. a payment-module-specific settlement report); - adding a field resolver to enrich an existing report row.
License
Released under the MIT License.
Have questions or need help? Contact us at info@magebit.com
magebitcom/magento2-mcp-report-tools 适用场景与选型建议
magebitcom/magento2-mcp-report-tools 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 339 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 05 月 06 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 magebitcom/magento2-mcp-report-tools 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 magebitcom/magento2-mcp-report-tools 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 339
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 47
- 依赖项目数: 0
- 推荐数: 1
其他信息
- 授权协议: MIT
- 更新时间: 2026-05-06