--- AI TRACKER METADATA ---
Update Summary: Use a real MCP Client PHP library
Check-in Date: MM/DD/YYYY (US format) [When we should see progress/get an update]
Due Date: MM/DD/YYYY (US format) [When the issue should be fully completed]
Blocked by: [#XXXXXX] (New issues on new lines)
Additional Collaborators: @username1, @username2
AI Tracker found here: https://www.drupalstarforge.ai/
--- END METADATA ---
Problem/Motivation
Right now, to implement the MCP client-side, we write it ourselves. Adopting a PHP library to use the MCP will save us a lot of maintenance.
Client Libraries
Server Libraries
The server libraries may involve a client but I don't think that will be the case long term.
Maybe we build the symfony MCP client?
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | Screenshot 2025-11-06 at 17.51.45.png | 416.26 KB | robertoperuzzo |
Issue fork mcp_client-3534518
Show commands
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
robloachHad a first attempt at this over at https://git.drupalcode.org/project/mcp_client/-/merge_requests/1 . It seems the Drupal request out to the MCP servers is broken. Still need to investigate.
The PHP library also supports SSE, STDIO, or HTTP requests, so we should likely add that as options in the MCP entity type.
Comment #3
marcus_johansson commented@robloach - I think https://github.com/symfony/mcp-sdk will be more interesting going forward, if they keep up the work.
Comment #4
yautja_cetanu commentedComment #5
yautja_cetanu commentedComment #6
marcus_johansson commentedSince it will take some time to get a first stable tagged verison from Symfony AI, I think we should implement it using SwisNL for now so we have an MCP Client that you can setup without a npm middle layer.
Comment #7
marcus_johansson commentedComment #8
robertoperuzzoComment #10
robertoperuzzoI made the first integration with the SwisNL library, and the STDIO connection seems to work properly (see the screencast)
Comment #11
robertoperuzzoComment #12
marcus_johansson commentedI could get it to setup via STDIO as well. SSE does not work, I did not try streamable http. Also the execution doesn't work yet, just the tool listing.
Also there are a lot of .ddev, .copilot that shouldn't be in there. But its a good start!
Comment #13
robertoperuzzoThank you very much, Marcus, for your feedback.
slack_post_messagetool.ddevfolder is used by the ddev-drupal-contrib addon to simplify contributions..copilotone is a temporary folder where I store documentation, context, and prompts to help me with coding. I'll remove it when the job is complete.Comment #14
robertoperuzzoComment #15
robertoperuzzoComment #16
robertoperuzzoChanges made:
Comment #18
marcus_johansson commentedThank you so much Roberto!!! We know have something that can have a alpha release as soon as we have Tool integration also.