{"id":302274,"date":"2026-05-11T12:42:02","date_gmt":"2026-05-11T12:42:02","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/mcp-log\/"},"modified":"2026-05-11T12:41:51","modified_gmt":"2026-05-11T12:41:51","slug":"activity-log-for-mcp","status":"publish","type":"plugin","link":"https:\/\/ru.wordpress.org\/plugins\/activity-log-for-mcp\/","author":14834133,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.0.0","stable_tag":"1.0.0","tested":"6.9.4","requires":"6.9","requires_php":"7.4","requires_plugins":null,"header_name":"Activity Log for MCP","header_author":"Riaan Knoetze","header_description":"Monitor, secure, and govern AI agent activity on your WordPress site. Logs MCP (Model Context Protocol) requests, detects threats, and gives you a kill switch. Not affiliated with Anthropic or the Model Context Protocol project.","assets_banners_color":"3b4e7a","last_updated":"2026-05-11 12:41:51","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"https:\/\/profiles.wordpress.org\/riaanknoetze","rating":0,"author_block_rating":0,"active_installs":0,"downloads":42,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"riaanknoetze","date":"2026-05-11 12:41:51"}},"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3528770,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3528770,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3528770,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3528770,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3528770,"resolution":"1","location":"assets","locale":"","width":3412,"height":1684},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3528770,"resolution":"2","location":"assets","locale":"","width":3442,"height":1692},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3528770,"resolution":"3","location":"assets","locale":"","width":3410,"height":1692},"screenshot-4.png":{"filename":"screenshot-4.png","revision":3528770,"resolution":"4","location":"assets","locale":"","width":3416,"height":920}},"screenshots":{"1":"Real-time log view with date, ability, and user filters.","2":"Request detail modal with collapsible request and response panels.","3":"Three-dot overflow menu for CSV export and clearing logs."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[8531,246305,8534,242115,253991],"plugin_category":[],"plugin_contributors":[252203],"plugin_business_model":[],"class_list":["post-302274","plugin","type-plugin","status-publish","hentry","plugin_tags-activity-log","plugin_tags-ai-agents","plugin_tags-audit-log","plugin_tags-mcp","plugin_tags-model-context-protocol","plugin_contributors-riaanknoetze","plugin_committers-riaanknoetze"],"banners":{"banner":"https:\/\/ps.w.org\/activity-log-for-mcp\/assets\/banner-772x250.png?rev=3528770","banner_2x":"https:\/\/ps.w.org\/activity-log-for-mcp\/assets\/banner-1544x500.png?rev=3528770","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/activity-log-for-mcp\/assets\/icon-128x128.png?rev=3528770","icon_2x":"https:\/\/ps.w.org\/activity-log-for-mcp\/assets\/icon-256x256.png?rev=3528770","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/activity-log-for-mcp\/assets\/screenshot-1.png?rev=3528770","caption":"Real-time log view with date, ability, and user filters."},{"src":"https:\/\/ps.w.org\/activity-log-for-mcp\/assets\/screenshot-2.png?rev=3528770","caption":"Request detail modal with collapsible request and response panels."},{"src":"https:\/\/ps.w.org\/activity-log-for-mcp\/assets\/screenshot-3.png?rev=3528770","caption":"Three-dot overflow menu for CSV export and clearing logs."},{"src":"https:\/\/ps.w.org\/activity-log-for-mcp\/assets\/screenshot-4.png?rev=3528770","caption":""}],"raw_content":"<!--section=description-->\n<p>AI agents are starting to talk to WordPress sites directly. Claude Desktop, ChatGPT custom GPTs, and a growing list of MCP clients can connect to your site, browse content, place orders, edit posts, or call any custom tool you expose. The Model Context Protocol (MCP) is the open standard that makes this possible.<\/p>\n\n<p>The problem: by default, you can't see any of it. Requests come in, things change, and there's no record of what an agent actually did, when it did it, or which user it acted as.<\/p>\n\n<p>Activity Log for MCP records every MCP request the moment it hits your site. You see the route, the ability that was called, the user it acted as, the request body, the response, and whether it succeeded. Everything is browsable in a clean React admin page that feels like the rest of WordPress.<\/p>\n\n<p>If you're running an AI integration, debugging a custom MCP server, or just want a paper trail before letting agents touch your data \u2014 this is the visibility layer.<\/p>\n\n<h4>What you get<\/h4>\n\n<p>A real-time log of every MCP request, with filters for date range, ability name, and user. Click any row to inspect the full request and response, copy bodies to your clipboard, or trace a single agent session end-to-end. Sortable columns, configurable per-page counts (10 to 500), and full-text search across request and response bodies. Export to CSV when you need to share findings or feed them into another tool.<\/p>\n\n<p>The whole interface is built with <code>@wordpress\/components<\/code> so it inherits the WordPress design language \u2014 no jarring custom UI to learn.<\/p>\n\n<h4>Built for both halves of the audience<\/h4>\n\n<p>If you're a site owner: install, activate, and click into Tools \u2192 MCP Logs. There's no setup screen and no configuration \u2014 the plugin starts logging the moment an MCP client makes a request.<\/p>\n\n<p>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 \u2014 it registers an MCP server with seven abilities, so an AI agent can introspect its own activity log programmatically. Source ships under <code>src\/<\/code> and builds with <code>npm run build<\/code>.<\/p>\n\n<h4>Why you'd want this<\/h4>\n\n<ul>\n<li>Debug a custom MCP integration without tailing server logs<\/li>\n<li>Audit AI agent activity on production sites before something goes wrong<\/li>\n<li>Review per-tool error rates to spot which abilities are flaky<\/li>\n<li>Trace a single agent session end-to-end when something breaks<\/li>\n<li>Export logs for compliance reviews or external analysis<\/li>\n<li>Let an AI agent monitor its own activity through the MCP server<\/li>\n<\/ul>\n\n<h4>REST API<\/h4>\n\n<p>Every admin feature is exposed under <code>\/wp-json\/activity-log-for-mcp\/v1\/<\/code>:<\/p>\n\n<ul>\n<li><code>GET \/requests<\/code> \u2014 list with filters, sort, and pagination<\/li>\n<li><code>GET \/stats<\/code> \u2014 totals, success rate, and calls per ability<\/li>\n<li><code>GET \/sessions\/{id}<\/code> \u2014 every request in a session, in order<\/li>\n<li><code>GET \/search<\/code> \u2014 full-text across routes, abilities, and bodies<\/li>\n<li><code>GET \/errors<\/code> \u2014 recent failed executions and HTTP errors<\/li>\n<li><code>GET \/tool-performance<\/code> \u2014 per-ability call count, error rate, and unique users<\/li>\n<li><code>GET \/filters<\/code> \u2014 distinct ability names and users for dropdowns<\/li>\n<li><code>GET \/export-csv<\/code> \u2014 server-side streamed CSV download<\/li>\n<li><code>DELETE \/requests<\/code> \u2014 clear all logs<\/li>\n<li><code>DELETE \/retention<\/code> \u2014 delete logs older than a given date<\/li>\n<\/ul>\n\n<h4>MCP abilities<\/h4>\n\n<p>The plugin registers itself as an MCP server (<code>activity-log-for-mcp-server<\/code>) with seven abilities agents can call directly:<\/p>\n\n<ul>\n<li><code>get-activity<\/code> \u2014 paginated log retrieval with filters<\/li>\n<li><code>get-stats<\/code> \u2014 summary metrics with optional date range<\/li>\n<li><code>get-activity-by-session<\/code> \u2014 full session trace, with optional body exclusion for lighter payloads<\/li>\n<li><code>search-activity<\/code> \u2014 full-text search across stored requests and responses<\/li>\n<li><code>analyze-errors<\/code> \u2014 recent errors with full details<\/li>\n<li><code>get-tool-performance<\/code> \u2014 per-ability performance metrics<\/li>\n<li><code>clear-old-logs<\/code> \u2014 date-based retention cleanup<\/li>\n<\/ul>\n\n<h4>Privacy and data handling<\/h4>\n\n<p>All data stays in your WordPress database \u2014 nothing is sent anywhere. Logs live in a custom table named <code>{prefix}alfmcp_requests<\/code>. 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.<\/p>\n\n<h4>Disclaimer<\/h4>\n\n<p>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.<\/p>\n\n<h3>Privacy Policy<\/h3>\n\n<p>Activity Log for MCP records REST API requests that contain the <code>Mcp-Session-Id<\/code> header. Logged data includes request routes, methods, headers, bodies, response data, user IDs, and timestamps. All data is stored in your WordPress database and is never transmitted to external services.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>activity-log-for-mcp<\/code> folder to <code>\/wp-content\/plugins\/<\/code>, or install through the WordPress plugin directory.<\/li>\n<li>Activate the plugin from the Plugins screen.<\/li>\n<li>Open Tools \u2192 MCP Logs and start watching activity as it happens.<\/li>\n<\/ol>\n\n<p>No configuration is required. The first MCP request to hit your site will appear in the log immediately.<\/p>\n\n<!--section=faq-->\n<dl>\n<dt id=\"i%27ve%20never%20heard%20of%20mcp.%20do%20i%20need%20this%20plugin%3F\"><h3>I've never heard of MCP. Do I need this plugin?<\/h3><\/dt>\n<dd><p>If you don't have any AI agents connecting to your site, probably not. This plugin is for sites that expose MCP servers \u2014 either through custom code or via other plugins \u2014 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.<\/p><\/dd>\n<dt id=\"does%20the%20plugin%20slow%20down%20my%20site%3F\"><h3>Does the plugin slow down my site?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"will%20this%20modify%20or%20block%20requests%3F\"><h3>Will this modify or block requests?<\/h3><\/dt>\n<dd><p>No. The plugin only observes and records. Requests pass through untouched.<\/p><\/dd>\n<dt id=\"where%20is%20the%20data%20stored%3F\"><h3>Where is the data stored?<\/h3><\/dt>\n<dd><p>In a custom database table named <code>{prefix}alfmcp_requests<\/code>. Nothing is transmitted externally \u2014 not to Anthropic, not to any third party, not anywhere.<\/p><\/dd>\n<dt id=\"how%20do%20i%20authenticate%20api%20requests%3F\"><h3>How do I authenticate API requests?<\/h3><\/dt>\n<dd><p>WordPress Application Passwords (Users \u2192 Your Profile \u2192 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 <code>manage_options<\/code> capability.<\/p><\/dd>\n<dt id=\"what%20exactly%20gets%20logged%3F\"><h3>What exactly gets logged?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"can%20i%20delete%20old%20logs%20automatically%3F\"><h3>Can I delete old logs automatically?<\/h3><\/dt>\n<dd><p>Yes. Hit the <code>DELETE \/retention<\/code> endpoint or call the <code>clear-old-logs<\/code> ability with a <code>before_date<\/code>, either manually or from a scheduled cron job, to remove entries older than your chosen cutoff.<\/p><\/dd>\n<dt id=\"my%20mcp%20client%20doesn%27t%20appear%20in%20the%20logs%20%E2%80%94%20why%3F\"><h3>My MCP client doesn't appear in the logs \u2014 why?<\/h3><\/dt>\n<dd><p>The plugin only logs requests that include the <code>Mcp-Session-Id<\/code> header, which is part of the MCP transport spec. Most clients send it automatically. If yours doesn't, requests will pass through silently \u2014 that's a client-side configuration issue, not a plugin issue.<\/p><\/dd>\n<dt id=\"does%20it%20work%20with%20woocommerce%3F\"><h3>Does it work with WooCommerce?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.0<\/h4>\n\n<p>Initial release.<\/p>\n\n<ul>\n<li>React admin UI built with <code>@wordpress\/components<\/code><\/li>\n<li>MCP request detection via the <code>Mcp-Session-Id<\/code> header<\/li>\n<li>10 REST API endpoints with full filtering, search, and pagination<\/li>\n<li>7 MCP abilities exposed via the plugin's MCP server<\/li>\n<li>WordPress Application Password and WooCommerce API key authentication<\/li>\n<li>Full-text search across stored request and response bodies<\/li>\n<li>Server-side streamed CSV export<\/li>\n<li>Per-ability performance metrics<\/li>\n<li>Session-based log grouping with optional body exclusion<\/li>\n<li>Date-based retention management<\/li>\n<li>Object caching on all database reads<\/li>\n<\/ul>","raw_excerpt":"See exactly what AI agents do on your WordPress site. A complete activity log for every Model Context Protocol (MCP) request.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ru.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/302274","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ru.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/ru.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/ru.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=302274"}],"author":[{"embeddable":true,"href":"https:\/\/ru.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/riaanknoetze"}],"wp:attachment":[{"href":"https:\/\/ru.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=302274"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/ru.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=302274"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/ru.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=302274"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/ru.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=302274"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/ru.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=302274"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/ru.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=302274"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}