Problem/Motivation
mcp_sentinel_server has no test that goes through MCP Server itself. McpServerRegistrationTest checks that the Sentinel tools are discoverable by plugin.manager.tool (Tool API), that they instantiate, and that each derives a valid scope. It never asks MCP Server's tool plugin manager or McpServerFactory what would be listed by tools/list.
MCP Server 2.0.0-beta3 moved tool plugin discovery from src/Plugin/Tool to src/Plugin/mcp_server/Tool (mcp_server #3585914). With a Tool Bridge commit from before its matching move (mcp_server_tool_bridge #3618722), the bridge's ToolApi plugin is not discovered, and every Sentinel tool disappears from /mcp. initialize and tools/list still return HTTP 200, with no tools and no error.
On that pairing McpServerRegistrationTest passes: 8 tests, 136 assertions, the same as on a working pairing. The Tool Bridge's own ToolApiRegistrationTest fails there, so the break is detectable. Sentinel's suite does not detect it.
Steps to reproduce
- Install MCP Sentinel 2.22.0 with
mcp_sentinel_server,drupal/mcp_server2.0.0-beta4 anddrupal/mcp_server_tool_bridgeat 1.x commit569be5d1. - Run
modules/mcp_sentinel_server/tests/src/Kernel/McpServerRegistrationTest.php. It passes. - Request
tools/liston/mcpwith a token for a designated consumer holdingmcp_read mcp_write mcp_config mcp_config_read. The catalog is empty. With the bridge atbe13f9ffthe same request lists 11 tools.
Proposed resolution
Add a Kernel test in mcp_sentinel_server that enables mcp_server and mcp_server_tool_bridge, runs the setup that creates the bridge configs, and asserts that plugin.manager.mcp_server.tool has a tool_api__<id> definition for every entry in McpSentinelServerCommands::TOOLS. If practical, also build the server with McpServerFactory under a designated-consumer request and assert the listed names, since discovery access is decided per request.
Remaining tasks
- Write the test and confirm it fails on the pairing above and passes on a matching one.
- Decide whether the test lane should pin the Tool Bridge commit or follow 1.x.
User interface changes
None.
API changes
None.
Data model changes
None.
Comments
Comment #2
jmcerdaLanded on 1.x-dev and shipped in 2.22.1. Kernel coverage now asks MCP Server whether mcp-sentinel:setup registrations are in the catalog (tool_api__id). Tool API discovery alone stayed green when a mismatched Tool Bridge left tools/list empty. See https://www.drupal.org/project/mcp_sentinel/releases/2.22.1