Closed (fixed)
Project:
MCP Server
Version:
1.x-dev
Component:
Code
Priority:
Major
Category:
Task
Assigned:
Reporter:
Created:
28 Nov 2025 at 14:42 UTC
Updated:
1 Jan 2026 at 17:10 UTC
Jump to comment: Most recent
Task is to migrate and merge the mcp module plugin system (especially tools) into the mcp_server module.
Introduce a dedicated Tool plugin system in the mcp_server module and migrate all existing mcp tools to it, integrating with configuration pages and making sure it is compatible with new features like LLM Sampling.
Tool (wording can be suggested as there is already a Tool plugin provided by the Tool API module) plugin attribute, with a plugin interface and plugin base.mcp module tools to the newly created plugin system.There are no user interface changes.
The Tool plugin gives the user the possibility to define custom MCP tools without defining the Tool API tools. This gives us more flexibility over time, so we are not completely dependent on the Tool API.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
e0ipsoVoice transcription, apologies for any mistakes.
One of the things that I believe it's important to have in order to comply with the industry standards is keeping MCP tool authorization to OAuth scopes. This is because we will present them (during the authorization) to the user, so they can allow the MCP client. Note that we are exposing scopes, not permissions. So even though we will have tool plugins checking for permissions, as usual, we need to be able to know which scopes the authorization system needs.
Right now the authorization goes like this:
As you can see in order to have the user access the tools with normal permissions, first we need to ensure that tools have the scopes associated to them that will provide those permissions. A big wrinkle in all this is that scopes are entities and entities exist per site. This means that an MCP tool developer cannot know what will be the scopes available in the site. This is why we need a site builder to make that connection between the scopes (that they created earlier) and the permissions the tools need to operate.
Comment #4
e0ipsoI haven't looked into this yet, but I noticed a test failure:
https://git.drupalcode.org/project/mcp_server/-/jobs/7493279
Comment #5
gagosha commentedMerged the changes. The plugin discovery system was migrated from the mcp module to mcp_server, with one plugin that exposes the Drupal Tool API tools as MCP tools.
I will create a separate ticket to migrate the existing mcp module plugins and UX.
Comment #7
gagosha commented