magebitcom/magento2-mcp-customer-tools
Composer 安装命令:
composer require magebitcom/magento2-mcp-customer-tools
包简介
Customer-domain MCP tools for Magebit_Mcp (read + write over customers, addresses, groups, account management)
README 文档
README
This is a sub-module for the Magento2 MCP module
Customer-domain MCP tools for Magebit_Mcp. Reads and writes against
customer accounts, addresses, customer groups, and account management
flows (password reset, confirmation).
Each tool is a thin wrapper over a Magento service contract
(CustomerRepositoryInterface, AddressRepositoryInterface,
GroupRepositoryInterface, AccountManagementInterface) and composes its
read response from field resolvers that 3rd-party modules can extend.
Install
composer require magebitcom/magento2-mcp-customer-tools bin/magento module:enable Magebit_McpCustomerTools bin/magento setup:upgrade bin/magento setup:di:compile bin/magento cache:flush
Tool catalog
Read tools
| Tool | What it does |
|---|---|
customer.customer.list |
Paginated customer search; filter by email (exact / glob / array), firstname/lastname substring, group_id, website_id, store_id, created_at range, updated_at range, dob range. |
customer.customer.get |
Single customer by numeric id or by email (+ optional website_id for email lookup in per-website scope). |
customer.address.list |
Paginated address search; filter by customer_id, country_id, region_id, postcode, city, telephone. |
customer.address.get |
Single customer address by id. |
customer.group.list |
Paginated group search; filter by code (exact / glob / array) and tax_class_id. |
customer.group.get |
Single customer group by id. |
customer.account.confirmation_status |
Returns account_confirmed, account_confirmation_required, or account_confirmation_not_required. |
Write tools
All writes require the global magebit_mcp/general/allow_writes flag and
the token's own allow_writes flag to be 1. Destructive operations
additionally set requires_confirmation so MCP clients (Claude Desktop,
etc.) prompt before firing.
| Tool | Confirm? | Delegates to | Underlying ACL |
|---|---|---|---|
customer.customer.create |
yes | AccountManagementInterface::createAccount() |
Magento_Customer::manage |
customer.customer.update |
yes | CustomerRepositoryInterface::save() (PATCH) |
Magento_Customer::manage |
customer.customer.delete |
yes | CustomerRepositoryInterface::delete() |
Magento_Customer::delete |
customer.address.create |
yes | AddressRepositoryInterface::save() |
Magento_Customer::manage |
customer.address.update |
yes | AddressRepositoryInterface::save() (PATCH) |
Magento_Customer::manage |
customer.address.delete |
yes | AddressRepositoryInterface::delete() |
Magento_Customer::manage |
customer.account.reset_password |
yes | AccountManagementInterface::initiatePasswordReset() |
Magento_Customer::reset_password |
customer.account.resend_confirmation |
no | AccountManagementInterface::resendConfirmation() |
Magento_Customer::manage |
Every write tool also implements Magebit\Mcp\Api\UnderlyingAclAwareInterface
so the handler blocks calls from admins who wouldn't be allowed to perform
the same action in the admin UI.
Identity lookups
customer.customer.get, customer.customer.update, customer.customer.delete,
customer.account.confirmation_status accept either id (numeric primary
key) or email. Email lookups take an optional website_id because
customer/account_share/scope may be per-website (the Magento default), in
which case the same address can exist on multiple sites as distinct
accounts.
Address tools are keyed by numeric id only — addresses are unique per
row, not per customer+label.
PII handling
Customer and address records are PII-heavy by design. Every read tool
exposes the fields / exclude arguments so callers can narrow the
payload:
customer.customer.get { fields: ["identity", "scope"] }— just id / email / website / group.customer.customer.get { exclude: ["addresses", "profile"] }— skip the full address book and the dob/gender/taxvat triplet.customer.customer.listships with a lean default set (identity,scope,timestamps) —addresses,custom_attributes, andextension_attributesare omitted from list responses to avoid multiplying the payload by the size of each customer's attribute set.
Audit summaries stored in magebit_mcp_audit_log contain identifiers only
(id, email, website_id, row counts) — never the full record.
Extending
See docs/EXTENDING.md for:
- adding a new field to any tool response via
CustomerFieldResolverInterface/AddressFieldResolverInterface/GroupFieldResolverInterface; - adding a new filter to any list tool via
CustomerFilterTranslatorInterface/AddressFilterTranslatorInterface/GroupFilterTranslatorInterface; - the ACL layering rules for custom write tools.
License
Released under the MIT License.
Have questions or need help? Contact us at info@magebit.com
magebitcom/magento2-mcp-customer-tools 适用场景与选型建议
magebitcom/magento2-mcp-customer-tools 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 341 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 05 月 06 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 magebitcom/magento2-mcp-customer-tools 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 magebitcom/magento2-mcp-customer-tools 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 341
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 48
- 依赖项目数: 0
- 推荐数: 1
其他信息
- 授权协议: MIT
- 更新时间: 2026-05-06