MCP Adapter

Beschreibung

Teil der Initiative AI Building Blocks for WordPress.

Der MCP Adapter verbindet die Abilities API von WordPress mit der Spezifikation des Model Context Protocol (MCP) und bietet KI-Agenten damit einen standardisierten Weg, mit WordPress-Funktionen zu interagieren. Er unterstützt HTTP- und STDIO-Transport, umfassende Fehlerbehandlung und eine erweiterbare Architektur für individuelle Integrationen.

Funktionen:

  • Umwandlung von Fähigkeiten in MCP – Wandelt WordPress-Fähigkeiten automatisch in MCP-Tools, -Ressourcen und -Prompts um.
  • Verwaltung mehrerer Server – Mehrere MCP-Server mit eigenen Konfigurationen erstellen und verwalten.
  • Erweiterbare Transportschicht – Integrierte HTTP- und STDIO-Transporte sowie Unterstützung für individuelle Transportprotokolle.
  • Flexible Fehlerbehandlung – Standardmäßig WordPress-kompatibles Fehler-Logging mit Unterstützung für individuelle, serverspezifische Handler.
  • Observability – Metrik-Erfassung ohne Overhead mit konfigurierbaren Handlern.
  • Berechtigungskontrolle – Granulare, konfigurierbare Berechtigungsprüfung für alle bereitgestellten Funktionen.

Installation

  1. Gehe in deinem WordPress-Admin zu Plugins > Plugin hinzufügen, suche nach „MCP Adapter“ und klicke auf Jetzt installieren.
  2. Aktiviere das Plugin über die Ansicht „Plugins“ in WordPress.
  3. Registriere die Fähigkeiten, die du bereitstellen möchtest, oder installiere ein Plugin, das sie für dich registriert.

Du kannst die Plugin-ZIP-Datei auch über Plugins > Plugin hinzufügen > Plugin hochladen hochladen oder das Plugin mit WP-CLI installieren:

wp plugin install mcp-adapter --activate

FAQ

Was ist MCP?

Das Model Context Protocol ist ein offener Standard, um KI-Agenten mit externen Systemen zu verbinden. Statt dass jeder KI-Client eine eigene Integration braucht, stellt ein System seine Möglichkeiten als MCP-Tools, -Ressourcen und -Prompts bereit, und jeder MCP-kompatible Client kann sie nutzen. Die Spezifikation steht auf modelcontextprotocol.io.

Was ist MCP Adapter?

MCP Adapter ist die Server- und Transportschicht. Er bietet selbst keine KI-Funktionen.

Was er bereitstellt, stammt aus der WordPress Abilities API. Eine Fähigkeit ist eine einzelne Funktion, die vom WordPress-Core oder von einem anderen Plugin registriert wird, etwa das Lesen von Beiträgen oder das Ändern einer Einstellung. MCP Adapter nimmt die auf deiner Website registrierten Fähigkeiten, stellt sie MCP-Clients zur Verfügung und kümmert sich um Protokollaushandlung, Berechtigungen und Fehlerbehandlung.

Das heißt, damit du das nutzen kannst, brauchst du auch Fähigkeiten auf der Website – von WordPress selbst oder von einem Plugin, das eigene registriert.

Wie verbinden sich KI-Agenten mit meiner Website?

Der Adapter registriert MCP-Endpunkte über den integrierten HTTP-Transport. Verbinde einen MCP-kompatiblen Client mit dem Endpunkt und authentifiziere dich als WordPress-Benutzer. Der Adapter unterstützt genau die MCP-Revisionen 2025-11-25 und 2026-07-28. Details zu den Endpunkten findest du in der Einstiegsanleitung.

Wird jede registrierte Fähigkeit automatisch bereitgestellt?

Nein, die Bereitstellung ist Opt-in. Eine Fähigkeit ist über MCP nur erreichbar, wenn sie als öffentlich markiert wurde, und vor jeder Ausführung werden weiterhin die Berechtigungen des aktuellen Benutzers geprüft. Wie du Fähigkeiten ein- und ausschließt, steht in der Dokumentation.

Wo kann ich Fehler melden oder Funktionen vorschlagen?

Im GitHub-Repository. Sicherheitsprobleme sollten nicht öffentlich gemeldet werden, sondern nach dem Prozess in SECURITY.md.

Plugin-Entwickler sollten MCP Adapter als Abhängigkeit deklarieren, indem sie Requires Plugins: mcp-adapter in ihren Plugin-Header aufnehmen. Optionen für WP-CLI und wp-env findest du in der README.

Rezensionen

Alle 0 Rezensionen lesen

Mitwirkende und Entwickler

„MCP Adapter“ ist Open-Source-Software. Folgende Menschen haben an diesem Plugin mitgewirkt:

Mitwirkende

„MCP Adapter“ wurde in 5 Sprachen übersetzt. Danke an die Übersetzer für ihre Mitwirkung.

Übersetze „MCP Adapter“ in deine Sprache.

Interessiert an der Entwicklung?

Durchstöbere den Code, sieh dir das SVN-Repository an oder abonniere das Entwicklungsprotokoll per RSS.

Änderungsprotokoll

0.7.1 – 2026-10-15

Fixed

  • Bound stored session initialization parameters to 4 KiB and automatically recover oversized session data, preventing repeated database failures and excessive logging. Affected clients need to reconnect once. Client icons are excluded from storage so large inline icons do not prevent connections.
  • Register the installed plugin’s autoloader before checking for bundled copies, allowing version selection before an older bundled class is loaded.
  • Unknown ability names from MCP clients no longer generate WordPress developer notices.

Changed

  • Unavailable abilities return clearer errors with relevant available ability names or a pointer to discovery. Abilities not exposed through MCP return the same ability_not_found error as unknown names.

Added

  • A site-owner guide covers connecting an AI client, Application Passwords, and troubleshooting.

0.7.0 – 2026-10-02

Breaking Changes

  • The adapter serves exactly two MCP schema revisions, 2025-11-25 and 2026-07-28. Clients that propose 2025-06-18 or 2024-11-05 still connect and are served through the 2025-11-25 schema.
  • The generated DTO classes, the McpToolValidator, McpResourceValidator, and McpPromptValidator classes, and the mcp_adapter_validation_enabled filter have been removed. Wire validation always runs through the selected schema.
  • Invalid protocol fields are no longer silently dropped or repaired. Components that no supported revision can represent are rejected.
  • Custom transports must delegate to HttpRequestHandler or McpWireOrchestrator. JSON-RPC batch requests are rejected.
  • WP\MCP\Cli classes are final.

Added

  • MCP 2026-07-28 support, including the sessionless server/discover lifecycle and the new HTTP headers.
  • Direct callable tools can request elicitation input under 2026-07-28 by returning McpInputRequired.
  • McpRequestContext, an immutable per-request context with the selected schema, transport, and session data.

Changed

  • Using MCP Adapter as a bundled library is deprecated. Install the MCP Adapter plugin instead.

Fixed

  • mcp-adapter/get-ability-info serializes an empty input_schema as {} instead of [].
  • Default abilities register when another plugin initializes the Abilities API before the MCP server initializes.

See the 0.7.0 migration guide and CHANGELOG.md for the full list of changes.

0.6.1 – 2026-08-13

Fixed

  • The release ZIP no longer ships a Jetpack Autoloader class map pointing at files the ZIP omits. In 0.6.0 the class map listed test-only global classes, including WP_CLI and WP_CLI_Command, and mapped them to files under tests/phpunit/, which the release artifact excludes. Any plugin calling class_exists( 'WP_CLI' ) on a normal web request could therefore trigger an uncaught fatal error. class_exists( 'WP_CLI' ) now returns false when WP-CLI is unavailable (#283).

No API, hook, or protocol behavior changed. Upgrading from 0.6.0 requires no migration. Installations built from source or required through Composer were unaffected.

0.6.0 – 2026-08-12

Breaking Changes

  • WordPress 6.9 or newer is now required. The standalone Abilities API plugin is no longer a supported installation path.
  • Abilities with meta.public: true are now exposed through the default MCP server unless meta.mcp.public explicitly opts out. Existing permission callbacks and capability checks still apply.
  • On multisite only, active Streamable HTTP sessions must reconnect once after upgrading, because session storage moves from a network-wide key to separate per-site keys. Single-site installations are unaffected.
  • The MIME validation helpers previously exposed by McpValidator have been removed. Integrations calling them directly should apply their own application-specific MIME validation.

Added

  • Support for resources/templates/list, returning an empty template list when no templates are available.
  • Blocked direct execution of plugin PHP files.
  • Expanded automated compatibility, dependency, and Plugin Check coverage.

Changed

  • Jetpack Autoloader is now used so the newest available WP\MCP classes win when the standalone adapter and another plugin bundle different versions.
  • Session storage is scoped by blog on WordPress multisite.
  • Concurrent session mutations are protected with bounded retries, reducing the risk of one request overwriting another session.
  • Documentation clarifies that the Abilities API is included in WordPress 6.9 and newer, documents the required ability category field, and improves examples throughout.

Fixed

  • _meta is preserved on resource contents, embedded resources, content blocks, and prompt messages.
  • Malformed _meta is omitted without discarding the payload it accompanies.
  • mimeType is emitted exactly as declared, including values with parameters such as text/html;profile=mcp-app.
  • Blob-only resource contents are handled correctly.
  • Resource URI schemes are matched case-insensitively, so clients can read resources even when they normalize the scheme to lowercase.
  • Empty arguments are normalized for schema-defining abilities, allowing valid zero-argument tool calls to execute.
  • wp mcp-adapter serve keeps JSON-RPC stdout clean when selecting the default server.
  • WP-CLI’s global --user argument is used instead of registering a conflicting local option.

For older releases, see CHANGELOG.md.