Testing and Updating WordPress MCP with Claude and VS Code

Testing and Updating WordPress MCP with Claude and VS Code

·

·

,

👁 5 views

Over the past several weeks, I’ve been working on establishing a functional WordPress MCP (Model Context Protocol) integration. This post documents the testing and updating workflow that emerged from using Claude and VS Code together for this development project.

The Development Environment

My setup involves a local WordPress installation running on Local by Flywheel (wp-mcp-blueprint.local) for safe testing, with the goal of eventually deploying to production. The MCP system exposes 72 WordPress abilities through a standardized protocol that AI assistants can use to perform administrative tasks.

The Testing Workflow

Testing the MCP abilities follows a systematic approach:

Phase 1: Discovery — Using Claude to discover all available abilities and understand their input/output schemas. This involves calling the discover-abilities function and reviewing what parameters each ability expects.

Phase 2: Creation Tests — Testing create operations for posts, pages, categories, tags, users, menus, and media. Each test saves the resulting ID for subsequent phases.

Phase 3: Retrieval and Update — Verifying that created items can be retrieved correctly and that update operations work as expected.

Phase 4: Search and List — Testing search and list functions, which proved to be more problematic than single-item operations.

Phase 5: Cleanup — Deleting all test items to leave the system clean.

Claude’s Role in Testing

Claude serves as both the testing tool and the debugging partner. Through the web interface with MCP tools enabled, Claude can directly execute WordPress abilities, observe the results, and help diagnose issues when things don’t work as expected.

The workflow typically looks like this: I describe what I want to test, Claude executes the appropriate abilities, we review the results together, and if something fails, Claude helps me understand why and suggests fixes.

VS Code for Code Updates

When testing reveals issues that require code changes, VS Code becomes the primary tool. This might involve:

  • Modifying the plugin files to fix bugs discovered during testing
  • Adding new abilities or parameters
  • Adjusting the MCP adapter configuration
  • Reviewing debug logs and error messages

The back-and-forth between Claude (for testing and analysis) and VS Code (for implementation) creates a tight feedback loop that accelerates development.

Lessons Learned

Cache management is critical. Many seemingly broken abilities turned out to be cache issues. Flushing WordPress cache using the rewrite_rules approach often resolves ability registration problems.

Single-item vs. array operations behave differently. Retrieving a single post by ID works reliably, but list operations returning arrays of items sometimes have serialization issues.

Parameter naming matters. The MCP system requires exact parameter names matching WordPress conventions. Small mismatches cause silent failures.

Test systematically. Instead of random testing, following a structured test plan that covers create, read, update, and delete for each resource type provides comprehensive coverage.

Current Status

The local development environment now has 72 registered abilities spanning site management, content creation, user management, comments, media handling, cache management, and menu operations. Most CRUD operations work reliably, though taxonomy operations (categories and tags) have some persistent issues with list functions.

The combination of Claude for interactive testing and VS Code for code updates has proven to be an effective workflow for this kind of AI-assisted WordPress development.

Next Steps

Once you have the workflow down, the next challenge is setting up the environment itself. Check out my companion post, Configuring VS Code for MCP with AI Agents, for a guide on automating the configuration process.

Stay in the loop

Get WordPress + AI insights delivered to your inbox. No spam, unsubscribe anytime.

We respect your privacy. Read our privacy policy.


Recommended Posts