Skip to content

Add support for connecting to multiple MCP servers #29

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Mar 23, 2025
Merged

Conversation

swissspidy
Copy link
Collaborator

@swissspidy swissspidy commented Mar 16, 2025

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:

  • WP-CLI
  • WordPress (if in a WordPress installation)

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:

  • Image generation and editing (with WpAiClient class)
  • Resource handling

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

@swissspidy swissspidy force-pushed the try/mcp-sdk branch 2 times, most recently from 29b0be5 to edf729b Compare March 16, 2025 16:11
@swissspidy swissspidy changed the title MCP SDK Add support for connecting to multiple MCP servers Mar 17, 2025
@swissspidy swissspidy marked this pull request as ready for review March 23, 2025 17:02
@swissspidy swissspidy merged commit 09cf764 into main Mar 23, 2025
5 checks passed
@swissspidy swissspidy deleted the try/mcp-sdk branch March 23, 2025 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add hooks for adding and modifying tools Supporting multiple MCP servers Extensibility by other plugins Improve debugging output
1 participant