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

  1. Install MCP Sentinel 2.22.0 with mcp_sentinel_server, drupal/mcp_server 2.0.0-beta4 and drupal/mcp_server_tool_bridge at 1.x commit 569be5d1.
  2. Run modules/mcp_sentinel_server/tests/src/Kernel/McpServerRegistrationTest.php. It passes.
  3. Request tools/list on /mcp with a token for a designated consumer holding mcp_read mcp_write mcp_config mcp_config_read. The catalog is empty. With the bridge at be13f9ff the 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

jmcerda created an issue. See original summary.

jmcerda’s picture

Assigned: Unassigned » jmcerda
Status: Active » Fixed

Landed 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

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.