Add support for connecting to multiple MCP servers #29
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uses https://github.com/logiscape/mcp-sdk-php to allow connecting to multiple MCP servers. It's not exactly great, but there aren't really any other options right now.
Note: This was originally started at the hackathon but now I've completely refactored it.
There are two MCP servers that are always enabled:
They are written in a way that they could be extracted or also exposed via HTTP in the future.
Additional servers can be added via
wp mcp add
, e.g.wp mcp server add filesystem "npx -y @modelcontextprotocol/server-filesystem /Users/pascalb/Desktop"
Things that don't work yet as I haven't fully ported them over:
WpAiClient
class)Documentation is also not updated yet.
The tool collection and repository part I have removed for now to keep things simpler while this is still in flux. It can be reintroduced later if needed.
Fixes #14
Fixes #19
Fixes #25
Fixes #26
Fixes #46