[Tracker]
Update Summary: We have settled on the php mcp sdk, and Tool API not node and bringing that into the MCP module itself. Details and roadmap TBC
Check-in Date: 08/12/2025
Metadata is used by the AI Tracker. Docs and additional fields here.
[/Tracker]

Problem/Motivation

There are two approaches to an MCP we can take:

- One that uses Drupal and php itself to be the MCP server (This one)
- The other that uses the official spec and node.js to be the official server and Drupal communicates with it via JSON. (e0ipso's approach)

There are a number of advantages and disadvantages of each.

- Drupal + php approach will work with a larger number of hosts and has a simpler hosting infrastructure. It would be easier to put directly into Drupal CMS.
- The Node approach is the "official" approach and so will be more compatible with the MCP community and benefit from updates faster. It also allows for long-running processes which is the MCP approach to connecting MCP tools with their agents.

Note also there are 3 different steps for MCP:

- 1) The actual code that makes a tool able to do something with Drupal.
- 2) The configuration about the code that creates an MCP tool with things like title and description needed for that situation. (A single code tool might have many derivatives. For example a "Create Entity" tool could be configured and contrained to become a "Create Blog Post" tool).
- 3) The actual functionality that makes that tool available to the outside world and handles the communication between the two.

This discussion is about 3).
Both approaches can collaborate on 1 and 2.

Attempts to solve this are happening here https://www.drupal.org/project/tool/. However the dream is that we can bring lots of the Tool API into core as an improvement on Actions in Core.
e0ipso's current approach uses JSON-RPC.

If we had Tool in core, it could work with JSON-RPC and GraphQL and so these wouldn't necessarily be different approaches.

Conversation happened about it here:
https://drupal.slack.com/archives/CDL2YPBNX/p1762531228277609

Proposed resolution

Remaining tasks

- Arrange a call with interested parties
- Decide on the Drupal CMS MCP approach.

API changes

Data model changes

Comments

yautja_cetanu created an issue. See original summary.

yautja_cetanu’s picture

Issue summary: View changes
yautja_cetanu’s picture

Another thing to think about is the SM module to use symfony messenger to handle async communication with MCP but still in Drupal.

yautja_cetanu’s picture

Issue summary: View changes
yautja_cetanu’s picture

Issue summary: View changes
yautja_cetanu’s picture

Issue summary: View changes

It looks like there is a descision to make use of the Official Php MCP SDK which is lead by the Symfony AI team. We have had an initial conversation and have started contributing directly to the SDK.

We can close this issue when a proper roadmap is released.

Things we likely want to do:

Immediate term:

  • Integrate the php MCP SDK with the MCP module.
  • Get a tagged version of the MCP SDK.
  • Integrate MCP with the Tools API module.
  • Create the UI so that Drupal Tools can be exposed in MCP.
  • Create a UI so that Drupal resources can be exposed via MCP (These might just be tools but the UI might be different as its more about selecting content_
  • Create a simple recipe for potential inclusion into Drupal CMS
  • MCP Sampling (Still don't fully understand this!)

Longer Term:

  • Get MCP working with Oauth.
  • Get an MCP Client working so Agents can make use of MCP, into the symfony AI framework (We have one with a different framework).