mcp-adapter
Сообществоот WordPress
An MCP adapter that bridges the Abilities API to the Model Context Protocol, enabling MCP clients to discover and invoke WordPress plugin, theme, and core abilities programmatically.
Установка
{Описание
# MCP Adapter Part of the [**AI Building Blocks for WordPress** initiative](https://make.wordpress.org/ai/2025/07/17/ai-building-blocks) The official WordPress package for MCP integration that exposes WordPress abilities as [Model Context Protocol (MCP)](https://modelcontextprotocol.io) tools, resources, and prompts for AI agents. ## Overview This adapter bridges WordPress's Abilities API with the [MCP specification](https://modelcontextprotocol.io/specification/2025-06-18/), providing a standardized way for AI agents to interact with WordPress functionality. It includes HTTP and STDIO transport support, comprehensive error handling, and an extensible architecture for custom integrations. ## Features ### Core Functionality - **Ability-to-MCP Conversion**: Automatically converts WordPress abilities into MCP tools, resources, and prompts - **Multi-Server Management**: Create and manage multiple MCP servers with unique configurations - **Extensible Transport Layer**: - **HTTP Transport**: Unified transport implementing [MCP 2025-06-18 specification](https://modelcontextprotocol.io/specification/2025-06-18/basic/transports.md) for HTTP-based communication - **STDIO Transport**: Process-based communication via standard input/output for local development and CLI integration - **Custom Transport Support**: Implement `McpTransportInterface` to create specialized communication protocols - **Multi-Transport Configuration**: Configure servers with multiple transport methods simultaneously - **Flexible Error Handling**: - **Built-in Error Handler**: Default WordPress-compatible error logging included - **Custom Error Handlers**: Implement `McpErrorHandlerInterface` for custom logging, monitoring, or notification systems - **Server-specific Handlers**: Different error handling strategies per MCP server - **Observability**: - **Built-in Observability**: Default zero-overhead metrics tracking with configurable handlers - **Custom Observability Handlers**: Implement `McpObservabilityHandlerInterface` for integration with monitoring systems - **Validation**: Built-in validation for tools, resources, and prompts with extensible validation rules - **Permission Control**: Granular permission checking for all exposed functionality with configurable [transport permissions](docs/guides/transport-permissions.md) ### MCP Component Support - **[Tools](https://modelcontextprotocol.io/specification/2025-06-18/server/tools.md)**: Convert WordPress abilities into executable MCP tools for AI agent interactions - **[Resources](https://modelcontextprotocol.io/specification/2025-06-18/server/resources.md)**: Expose WordPress data as MCP resources for contextual information access - **[Prompts](https://modelcontextprotocol.io/specification/2025-06-18/server/prompts.md)**: Transform abilities into structured MCP prompts for AI guidance and templates - **Server Discovery**: Automatic registration and discovery of MCP servers following MCP protocol standards - **Built-in Abilities**: Core WordPress abilities for system introspection and ability management - **CLI Integration**: WP-CLI commands supporting STDIO transport as defined in MCP specification ## Understanding Abilities as MCP Components The MCP Adapter transforms WordPress abilities into MCP components: - **Tools**: WordPress abilities become executable MCP tools for AI agent interactions - **Resources**: WordPress abilities expose data as MCP resources for contextual information - **Prompts**: WordPress abilities provide structured MCP prompts for AI guidance For detailed information about MCP components, see the [Model Context Protocol specification](https://modelcontextprotocol.io/specification/2025-06-18/). ## Architecture ### Component Overview ``` ./includes/ │ # Core system components ├── Core/ │ ├── McpAdapter.php # Main registry and server management │ ├── McpServer.php # Individual server configuration │ ├── McpComponentRegistry.php # Component registration and management │ └── McpTransportFactory.php # Transport instantiation factory │ │ # Built-in abilities for MCP functionality ├── Abilities/ │ ├── DiscoverAbilitiesAbility.php # Ability discovery │ ├── ExecuteAbilityAbility.php # Ability execution │ └── GetAbilityInfoAbility.php # Ability introspection │ │ # CLI and STDIO transport support ├── Cli/ │ ├── McpCommand.php # WP-CLI commands │ └── StdioServerBridge.php # STDIO transport bridge │ │ # Business logic and MCP components ├── Domain/ │ │ # MCP Tools implementation │ ├── Tools/ │ │ ├── McpTool.php # Base tool class │ │ ├── RegisterAbilityAsMcpTool.php # Ability-to-tool conversion │ │ └── McpToolValidator.php # Tool validation │ │ # MCP Resources implementation │ ├── Resources/ │ │ ├── McpResource.php # Base resource class │ │ ├── RegisterAbilityAsMcpResource.php # Abili
Отзывы (0)
Пока нет отзывов. Будьте первым!
Статистика
Информация
Технологии
Похожие серверы
mcp-chain-of-draft-server
Chain of Draft Server is a powerful AI-driven tool that helps developers make better decisions through systematic, iterative refinement of thoughts and designs. It integrates seamlessly with popular AI agents and provides a structured approach to reasoning, API design, architecture decisions, code reviews, and implementation planning.
mcp-use-ts
mcp-use is the framework for MCP with the best DX - Build AI agents, create MCP servers with UI widgets, and debug with built-in inspector. Includes client SDK, server SDK, React hooks, and powerful dev tools.
mesh
Define and compose secure MCPs in TypeScript. Generate AI workflows and agents with React + Tailwind UI. Deploy anywhere.
rhinomcp
RhinoMCP connects Rhino 3D to AI Agent through the Model Context Protocol (MCP)