Repository navigation
fix(mcp): run beside the mcp adapter 0.7.0 instead of fatalling (#340) - #342
Merged
Merged
Conversation
MCP Adapter 0.7.0 (2026-10-02) broke Saddle two ways (#340): - Activating it on a Saddle site redeclared WP\MCP\Autoloader: the bundled copy was already loaded and the plugin's require_once is a different path. The bundle now stays off whenever an official plugin folder (mcp-adapter*/mcp-adapter.php) is installed, active or not, so activation can't collide and its Jetpack Autoloader can't pick up the plugin's newer classes. - With both active, every request fatalled: get_tools(), get_resources() and get_prompts() now require the request's protocol schema. A server with that API is not "current" (adapter_is_current() probes it), so the built-in transport serves /saddle/v1/mcp, as with WooCommerce's 0.1.0. Saddle's own server-list calls go through server_list(), which skips a method that wants arguments. Full 0.7.0 support (the typed records, a re-vendor) is a follow-up. Closes #340 Co-Authored-By: Claude Opus 5.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.
Closes #340. Follow-up for full 0.7.0 support: #341
The bug
MCP Adapter 0.7.0 (2026-10-02) took down any Saddle site that installed it:
Cannot declare class WP\MCP\Autoloader. The bundle was already loaded; the plugin'srequire_onceis a different path.Too few arguments to McpServer::get_tools(). 0.7.0 madeget_tools(),get_resources()andget_prompts()require the request's protocol schema; Saddle called them bare inrecord_server_health()andfilter_adapter_initialize().The fix
Saddle_Bundled_Adapter::standalone_installed(): with an official plugin folder present (mcp-adapter*/mcp-adapter.php, active or not), the bundle stays off. Activation can't collide, and the bundle's autoloader never meets the newer copy.Saddle::adapter_is_current()also probesMcpServer::get_tools(): if it wants arguments (0.7.0), the adapter is treated like WooCommerce's too-old 0.1.0 and the built-in transport serves/saddle/v1/mcp. The adapter's own default server keeps running for other plugins (Bridle's abilities included).Saddle_MCP::server_list()wraps every server-list call and skips a method that wants arguments, so a stray path can't fatal again.Verified
wp plugin activate mcp-adapternow succeeds (was the fatal); home, wp-json,/saddle/v1/mcpand the adapter's default server all answer;adapter_available=false,standalone_installed=true. A real session on/saddle/v1/mcplists 94 tools (16 Bridle / Bridle KB);mcp-adapter-execute-abilityrunsbridle/list-conversationson the adapter's server.server_list(), the guard (temp plugins dir,mcp-adapter-0.7.0folder).composer test: 1453 OK (1 skipped, as on main). phpcs: no new findings inincludes/saddle.php.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.