VOOZH about

URL: https://deepwiki.com/WordPress/mcp-adapter/2-getting-started

⇱ Getting Started | WordPress/mcp-adapter | DeepWiki


Loading...
Menu

Getting Started

This document provides an overview of the initial steps required to install and configure the MCP Adapter on a WordPress site. It covers prerequisites, installation paths, and verification procedures to ensure the system is operational.

For detailed installation instructions, see Installation. For local development environment configuration, see Development Environment Setup. For practical code examples, see Basic Examples.

Prerequisites

Before installing MCP Adapter, ensure your environment meets these requirements:

RequirementVersionPurpose
PHP>= 7.4Runtime environment
WordPress>= 6.8Core platform
WordPress Abilities APILatestAbility registration system
ComposerLatestDependency management (recommended)

The WordPress Abilities API must be installed and active before MCP Adapter can function, as all MCP components derive from registered abilities via the wp_register_ability() function.

Sources: docs/getting-started/installation.md247-257

Installation Paths

MCP Adapter supports two installation methods, each suited for different use cases:


Composer Package Installation

This method integrates MCP Adapter as a dependency in your plugin or theme:

  1. Add the package via Composer
  2. Optionally include Jetpack Autoloader for version conflict prevention
  3. Initialize McpAdapter::instance() in your code

WordPress Plugin Installation

This method treats MCP Adapter as a standalone plugin:

  1. Clone the repository to wp-content/plugins/
  2. Run composer install to download dependencies
  3. Activate via WordPress admin or WP-CLI

Upon activation, the plugin automatically initializes and creates a default MCP server accessible at /wp-json/mcp/mcp-adapter-default-server.

Sources: docs/getting-started/installation.md7-168

Key Code Entities

When working with MCP Adapter, you will interact with these primary code entities:


Core Function and Class Mapping

Code EntityTypePurposeFile Path
wp_register_ability()FunctionRegisters a new abilityAbilities API
McpAdapterClassSingleton registrysrc/Core/McpAdapter.php
McpAdapter::instance()MethodGets singleton instancesrc/Core/McpAdapter.php
McpAdapter::create_server()MethodCreates MCP serversrc/Core/McpAdapter.php
HttpTransportClassHTTP transport layersrc/Transport/HttpTransport.php
ErrorLogMcpErrorHandlerClassDefault error handlersrc/Infrastructure/ErrorHandling/ErrorLogMcpErrorHandler.php

Sources: docs/getting-started/installation.md26-34 docs/getting-started/installation.md84-106 docs/getting-started/installation.md113-125

Initialization Flow

MCP Adapter follows a specific WordPress hook sequence to initialize properly:


Hook Sequence

  1. plugins_loaded: MCP Adapter plugin loads and initializes the McpAdapter singleton
  2. wp_abilities_api_init: Developer code registers abilities using wp_register_ability()
  3. mcp_adapter_init: Developer code creates custom MCP servers via McpAdapter::create_server()

The default server is automatically created by the plugin if no custom servers are defined.

Sources: docs/getting-started/installation.md62-81 docs/getting-started/installation.md109-125

Verification Steps

After installation, verify that MCP Adapter is operational:

Method 1: WP-CLI Verification


Method 2: REST API Test


Expected response structure:


Method 3: Code Verification

Add this temporary check to verify class availability:


Sources: docs/getting-started/installation.md169-203

Common Installation Issues

IssueCauseResolution
Plugin not foundInstallation incompleteVerify plugin directory exists and run composer install
Abilities API unavailableMissing dependencyInstall and activate WordPress Abilities API plugin
REST API not respondingPermalink configurationSet permalink structure to anything except "Plain"
Autoloader missingDependencies not installedRun composer install in plugin directory
Class not found errorsAutoloader not loadedEnsure vendor/autoload.php or vendor/autoload_packages.php is required

For detailed troubleshooting procedures, see Installation.

Sources: docs/getting-started/installation.md205-237

Development Workflow

The typical development workflow when building MCP-enabled WordPress functionality:


Each step in this workflow is documented in detail:

Sources: docs/getting-started/installation.md83-107 docs/getting-started/installation.md113-125

Next Steps

Once MCP Adapter is installed and verified:

  1. Installation: Detailed installation instructions and Jetpack Autoloader configuration
  2. Development Environment Setup: Configure wp-env for local development
  3. Basic Examples: Hands-on examples of creating tools, resources, and prompts

For architectural understanding, see Architecture. For in-depth ability creation, see Abilities System.

Sources: docs/getting-started/installation.md239-246