Search by

hryvinskyi / magento2-mcp-server-activity-log

hryvinskyi

Records every MCP ability call in the activity log: who called it through which client, what it did, and what it changed

Package info

github.com/hryvinskyi/magento2-mcp-server-activity-log

Type:magento2-module

pkg:composer/hryvinskyi/magento2-mcp-server-activity-log

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.0 2026-10-23 00:20 UTC

This package is auto-updated.

Last update: 2026-10-23 05:34:22 UTC


README

Records every call an MCP client makes to the MCP server in the activity log: who called which ability, through which client, how the call ended and why, and what the ability changed.

What it does

  • Records each ability call as an activity of the MCP channel. The action and the subject are the ability; the outcome is how the call ended. A call the server refused (the caller's ACL, the deny-list, read-only mode, an ability open to anyone, an argument guard) is denied, and so is a call waiting for the client's confirmation.
  • Attributes the call to the account whose ACL it ran with, via the client that sent it: "jane via Claude Desktop 0.9". Everything the ability does while the call runs (the entity changes another channel records, for example) shares the call's correlation id and the same actor, so Show related lists the call with its changes.
  • Keeps the call's detail beside the activity: client, version, transport, the ability's source, access and required ACL, why it was refused, and the arguments and the result. Secrets are masked by the activity log's sanitizer before anything is stored, and each value is cut to 256 KB. A call waiting for confirmation keeps no message: it would carry the one-time confirmation token.
  • On the search page, a refused call of an ability that writes reads "tried to change", of one that deletes "tried to delete"; any other call "performed" its ability. The ability links to the MCP Server page.
  • Shows the call on its activity's page (for an admin with View the MCP Server page), two dashboard widgets (Top abilities and Denied MCP calls), and the clients of the last 24 hours on the MCP Server page.
  • Adds MCP Calls and MCP Server to the Activity Log menu, and MCP activity to the MCP Server menu.

Requirements

Installation

composer require hryvinskyi/magento2-mcp-server-activity-log
bin/magento module:enable Hryvinskyi_McpServerActivityLog
bin/magento setup:upgrade

Configuration

Stores › Configuration › Hryvinskyi › MCP Server › Activity Log:

  • Keep MCP Calls (days): 90 by default; 0 keeps them for good. The journal removes older MCP activities, and their detail with them.

The activity log's own settings apply: when Record Activity is off, no call is recorded, and the secret field names it lists are masked in arguments and results.

How it plugs in

  • An invocation listener of the MCP server (listeners on Hryvinskyi\McpServer\Model\AbilityInvoker).
  • An actor resolver of the activity log, asked first (resolvers on ActorContext, sortOrder 5).
  • The channel mcp, a detail provider for the search page, two dashboard widgets and the mcp activity panel.
  • Table hryvinskyi_mcp_activity_call, one row per activity, removed with its activity.

License

MIT. See LICENSE.