When I first heard about MCP (Model Context Protocol), I thought it was a reference to something from Tron. Turns out, it’s something equally cool—but way more practical. After diving deep into setting up a WordPress MCP server with Claude Code, I’ve learned that MCP is far more complex than the introductory videos suggest.
What is MCP?
MCP is a protocol that allows AI assistants like Claude to interact with external tools and services through a standardized interface. Think of it as a bridge between Claude and your applications. In my case, I wanted Claude to be able to create and manage WordPress blog posts directly.
The Setup Journey
I started with the WordPress MCP quickstart script in Docker, which seemed straightforward. Run the script, configure credentials, start the server—what could go wrong?
Everything.
The Problem: Version Incompatibility
The first issue hit immediately: ImportError: cannot import name 'ToolResult' from 'mcp.types'
The server code was written for an older version of the MCP SDK, but the Docker image had installed a newer version. The MCP library had restructured its type exports, and ToolResult no longer existed where the code expected it.
Initial attempts to fix it:
- Tried importing
CallToolResultfrommcp.server.models— nope - Checked what was actually available in the installed package — found
CallToolResultinmcp.types - Updated all return statements to use the correct type
The Second Problem: Async Context Manager
After fixing the imports, the next error: TypeError: 'Server' object does not support the asynchronous context manager protocol
The server’s main() function was trying to use the old SDK pattern with async with server:, but the newer MCP SDK had changed how you initialize and run the server. The solution was to switch to using stdio_server() from mcp.server.stdio.
Key Learnings
- MCP is complex. It’s not just “connect and go.” There’s a real protocol, request/response handling, and tool schema definitions involved.
- Version compatibility matters. The MCP ecosystem is still evolving, and different versions have breaking changes. Pin your dependencies or expect debugging sessions.
- Error messages are your friend. When the imports failed, the errors told me exactly what was wrong and where to look.
- SDK patterns change. What worked in version 0.1 might not work in 0.4. Always check the latest documentation.
Why This Matters
Once everything was working, I could post to my WordPress blog directly from Claude Code. That’s the power of MCP—extending Claude’s capabilities to control your own tools and systems.
But the path to get there revealed something important: MCP isn’t magic, and it’s not trivial. If you’re planning to set up an MCP server, expect debugging. Read those error messages carefully. They tell you what changed.
What’s Next?
Now that the WordPress MCP server is running with auto-restart enabled, I have a workflow where Claude can manage my blog posts. The server will survive reboots, and I can scale this to other MCP servers for different services.
If you’re interested in MCP and considering your own setup, my advice: start simple, expect version issues, and don’t hesitate to dig into the actual SDK code to see what’s available. The documentation is still catching up with the implementation.
Thanks to Claude Code for debugging my code faster than I could have done it myself.