Skip to content

feat(mcp-server): expand MCP tools from 7 to 14 - #183

Merged
jasperf merged 6 commits into
mainfrom
feature/expand-mcp-tools
Aug 6, 2026
Merged

feat(mcp-server): expand MCP tools from 7 to 14#183
jasperf merged 6 commits into
mainfrom
feature/expand-mcp-tools

Conversation

@jasperf

@jasperf jasperf commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

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/, and wp-cli/ for the same gap and added the tools that clear the bar set in docs/go-mcp-parity.md: "the MCP server gets a tool only if agent access adds something."

New tools

Tool Wraps Gating
monitor scripts/monitoring/monitor.sh (bundles all 5 sibling scripts into a throwaway remote temp dir, so it works whether or not setup-monitoring.yml provisioned the site) read-only
server_status server-monitor.sh read-only
broken_link_audit 404-checker.sh read-only
remote_ttfb_audit remote-ttfb-ua.sh read-only
ip_reputation_check check-ips.sh + check-deny-ips.sh (native fetch, not curl/jq) read-only
admin_user_create admin-user-create.sh (lockout recovery) confirm: true
db_pull db-pull.sh's workflow, ported to composable calls against the registry (reuses wp_cli's dispatch and db_backup's export logic) instead of one big remote bash -c string confirm: true
files_pull files-pull.yml's rsync of Trellis shared/uploads/ into Bedrock's local web/app/uploads/ confirm: true only if delete: true

Deliberately not implemented

db_push, files_push, and a site_backup wrapper — pushing into or writing to a production server carries more blast radius than this pass takes on. Reasoning is left in mcp-server/README.md and CHANGELOG.md next to each tool it's paired with, so the omission reads as a decision, not an oversight.

Notes

  • Each tool is its own commit; the changelog is bumped once (5.3.0 → 5.4.0) since this is one coherent batch of work.
  • mcp-server/README.md's tool list, permissions section, and tool count are all updated to match.
  • Builds clean (npm run build in mcp-server/) after every commit.

jasperf and others added 6 commits August 6, 2026 09:47
…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>
@jasperf
jasperf merged commit de8d9ad into main Aug 6, 2026
1 check passed
@jasperf
jasperf deleted the feature/expand-mcp-tools branch August 6, 2026 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant