feat(mcp-server): expand MCP tools from 7 to 14 - #183
Merged
Conversation
…r log analysis Wraps scripts/monitoring/monitor.sh as an MCP tool. Bundles all five monitoring scripts into a throwaway remote temp dir per run instead of assuming setup-monitoring.yml already deployed them, since that playbook only copies traffic-monitor.sh and security-monitor.sh — not ai-bot-monitor.sh or error-monitor.sh. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…udit tools Three more read-only tools, same shape as the existing audit tools: - server_status wraps scripts/monitoring/server-monitor.sh (live resource snapshot over SSH; the script itself issues the ssh calls, so this just runs it locally with the registry-resolved sshHost as its argument). - broken_link_audit wraps scripts/monitoring/404-checker.sh. - remote_ttfb_audit wraps scripts/monitoring/remote-ttfb-ua.sh, run in a throwaway local temp dir since the script writes its report to a file instead of stdout. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Wraps trellis/security/check-ips.sh and check-deny-ips.sh. Uses Node's native fetch against the AbuseIPDB API instead of shelling out to curl/jq, reading the same trellis/security/.env ABUSEIPDB_KEY (or WP_OPS_ABUSEIPDB_KEY as an override). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Wraps wp-cli/security/admin-user-create.sh's lockout-recovery flow (check username/email free, create with a generated password shown once). Reuses wp_cli's runWpCliRaw for dispatch rather than reimplementing local/SSH/VM execution. Requires confirm: true. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Ports scripts/backup/db-pull.sh's workflow to composable calls against the registry's resolved entries (read URLs via wp_cli's runWpCliRaw, back up dev via db_backup's own implementation, stream the remote export straight into 'trellis vm shell -- wp db import -', search- replace, optional multisite fixup, cache flush) instead of assembling one large remote bash -c string. Requires confirm: true. db_push is deliberately not implemented — pulling into production carries too much blast radius for a first pass. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Wraps trellis/backup/files-pull.yml's rsync of a Trellis site's shared/uploads/ into development's Bedrock web/app/uploads/ on the host directly (no VM shell needed). Additive by default; delete: true mirrors the remote exactly and requires confirm: true. files_push is deliberately not implemented, for the same production-risk reason as db_push. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Expands the wp-ops MCP server from 7 tools to 14, closing a gap found in practice: asking an agent (Mistral Vibe) to "use wp-ops mcp monitor" fell back to nine ad-hoc bash/ssh steps because no MCP tool existed for it — only a CLI-catalog script did. Surveyed the rest of
scripts/,trellis/, andwp-cli/for the same gap and added the tools that clear the bar set indocs/go-mcp-parity.md: "the MCP server gets a tool only if agent access adds something."New tools
monitorscripts/monitoring/monitor.sh(bundles all 5 sibling scripts into a throwaway remote temp dir, so it works whether or notsetup-monitoring.ymlprovisioned the site)server_statusserver-monitor.shbroken_link_audit404-checker.shremote_ttfb_auditremote-ttfb-ua.ship_reputation_checkcheck-ips.sh+check-deny-ips.sh(nativefetch, not curl/jq)admin_user_createadmin-user-create.sh(lockout recovery)confirm: truedb_pulldb-pull.sh's workflow, ported to composable calls against the registry (reuseswp_cli's dispatch anddb_backup's export logic) instead of one big remotebash -cstringconfirm: truefiles_pullfiles-pull.yml's rsync of Trellisshared/uploads/into Bedrock's localweb/app/uploads/confirm: trueonly ifdelete: trueDeliberately not implemented
db_push,files_push, and asite_backupwrapper — pushing into or writing to a production server carries more blast radius than this pass takes on. Reasoning is left inmcp-server/README.mdandCHANGELOG.mdnext to each tool it's paired with, so the omission reads as a decision, not an oversight.Notes
mcp-server/README.md's tool list, permissions section, and tool count are all updated to match.npm run buildinmcp-server/) after every commit.