| 开发者 | riaanknoetze |
|---|---|
| 更新时间 | 2026年5月11日 21:42 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 6.9 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
@wordpress/components so it inherits the WordPress design language — no jarring custom UI to learn.
Built for both halves of the audience
If you're a site owner: install, activate, and click into Tools → MCP Logs. There's no setup screen and no configuration — the plugin starts logging the moment an MCP client makes a request.
If you're a developer: there's a full REST API for every admin feature, authenticated via WordPress Application Passwords or WooCommerce API keys. The plugin is also itself MCP-aware — it registers an MCP server with seven abilities, so an AI agent can introspect its own activity log programmatically. Source ships under src/ and builds with npm run build.
Why you'd want this
/wp-json/activity-log-for-mcp/v1/:
GET /requests — list with filters, sort, and paginationGET /stats — totals, success rate, and calls per abilityGET /sessions/{id} — every request in a session, in orderGET /search — full-text across routes, abilities, and bodiesGET /errors — recent failed executions and HTTP errorsGET /tool-performance — per-ability call count, error rate, and unique usersGET /filters — distinct ability names and users for dropdownsGET /export-csv — server-side streamed CSV downloadDELETE /requests — clear all logsDELETE /retention — delete logs older than a given dateactivity-log-for-mcp-server) with seven abilities agents can call directly:
get-activity — paginated log retrieval with filtersget-stats — summary metrics with optional date rangeget-activity-by-session — full session trace, with optional body exclusion for lighter payloadssearch-activity — full-text search across stored requests and responsesanalyze-errors — recent errors with full detailsget-tool-performance — per-ability performance metricsclear-old-logs — date-based retention cleanup{prefix}alfmcp_requests. You control retention and can clear everything from the admin UI or via REST. There's no telemetry, no third-party calls, no external dependencies at runtime.
Disclaimer
Activity Log for MCP is not affiliated with, endorsed by, or sponsored any AI provider or the Model Context Protocol project. "MCP" and "Model Context Protocol" are referenced solely to describe the open protocol that this plugin observes.
activity-log-for-mcp folder to /wp-content/plugins/, or install through the WordPress plugin directory.If you don't have any AI agents connecting to your site, probably not. This plugin is for sites that expose MCP servers — either through custom code or via other plugins — and want visibility into how agents are using them. If you've started exploring AI integrations for WordPress, installing this before something goes wrong is much easier than reconstructing what happened afterward.
No measurable impact on regular page loads. The logger only fires on MCP REST endpoints, writes a single row per request, and all subsequent reads are object-cached. There's no front-end JavaScript and no admin overhead outside the plugin's own page.
No. The plugin only observes and records. Requests pass through untouched.
In a custom database table named {prefix}alfmcp_requests. Nothing is transmitted externally — not to Anthropic, not to any third party, not anywhere.
WordPress Application Passwords (Users → Your Profile → Application Passwords) work out of the box via HTTP Basic Auth. WooCommerce API keys are also supported when WooCommerce is active. Either method maps to a real WordPress user; the user must have the manage_options capability.
Route, HTTP method, request headers, request body, response status, response body, ability name, execution status (success / error / unknown), user ID, MCP session ID, and timestamp. Request and response bodies are stored in full so you can see exactly what was sent and returned.
Yes. Hit the DELETE /retention endpoint or call the clear-old-logs ability with a before_date, either manually or from a scheduled cron job, to remove entries older than your chosen cutoff.
The plugin only logs requests that include the Mcp-Session-Id header, which is part of the MCP transport spec. Most clients send it automatically. If yours doesn't, requests will pass through silently — that's a client-side configuration issue, not a plugin issue.
Yes. The plugin logs MCP requests regardless of which other plugins are active, and adds first-class support for WooCommerce API key authentication on top of Application Passwords.
@wordpress/componentsMcp-Session-Id header